[MacPorts] #16165: rrdtool: RRDs Perl module fails to load librrd library
#16165: rrdtool: RRDs Perl module fails to load librrd library ---------------------------------+------------------------------------------ Reporter: vinc17@macports.org | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: | ---------------------------------+------------------------------------------ Just after installing rrdtool 1.3.1_1, I get the following error: {{{ Can't load '/opt/local/lib/perl5/site_perl/5.8.8/darwin- 2level/auto/RRDs/RRDs.bundle' for module RRDs: dlopen(/opt/local/lib/perl5/site_perl/5.8.8/darwin- 2level/auto/RRDs/RRDs.bundle, 1): Library not loaded: /opt/local/lib/librrd.2.dylib Referenced from: /opt/local/lib/perl5/site_perl/5.8.8/darwin- 2level/auto/RRDs/RRDs.bundle Reason: image not found at /opt/local/lib/perl5/5.8.8/darwin- 2level/DynaLoader.pm line 230. }}} Indeed /opt/local/lib/librrd.2.dylib doesn't exist: the library is librrd.4.dylib. -- Ticket URL: <http://trac.macports.org/ticket/16165> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ----------------------------------+----------------------------------------- Comment (by blb@macports.org): Did you do an upgrade of rrdtool or was this the first install? Also, is RRDs part of rrdtool? If yes to both, sounds like the upgrade caused the new bundle to link against the library of the old version. -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ----------------------------------+----------------------------------------- Comment (by vinc17@macports.org): Yes, this was an upgrade, and RRDs.pm is part of rrdtool. I've done a test with a fresh install (i.e. with no activated rrdtool during the installation), and it works. I've tried again the upgrade from version 1.2.27_0, and loading the library fails again. In the build output, I can see: {{{ env MACOSX_DEPLOYMENT_TARGET=10.3 cc -L/opt/local/lib -bundle -undefined dynamic_lookup RRDs.o -L../../src/.libs/ -lrrd -o blib/arch/auto/RRDs/RRDs.bundle }}} Could the -L/opt/local/lib '''before''' -L../../src/.libs/ be the problem? -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ----------------------------------+----------------------------------------- Changes (by blb@macports.org): * owner: macports-tickets@lists.macosforge.org => markd@macports.org Comment: That definitely could be the issue. Assigning to maintainer. -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ----------------------------------+----------------------------------------- Comment (by vinc17@macports.org): Perhaps not a bug in rrdtool itself. In case the line I've quoted is incorrect, its contents come from /opt/local/lib/perl5/5.8.8/darwin- 2level/Config_heavy.pl (installed by the perl5.8 port): {{{ ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc' lddlflags='-L/opt/local/lib -bundle -undefined dynamic_lookup' }}} -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ----------------------------------+----------------------------------------- Comment (by vinc17@macports.org): I confirmed that the -L/opt/local/lib is the problem: {{{ prunille:...dings/perl-shared> sudo /opt/local/bin/perl Makefile.PL RPATH=/opt/local/lib Writing Makefile for RRDs prunille:...dings/perl-shared> grep '^LDDLFLAGS' Makefile LDDLFLAGS = -L/opt/local/lib -bundle -undefined dynamic_lookup prunille:...dings/perl-shared> sudo make [...] prunille:...dings/perl-shared> otool -L blib/arch/auto/RRDs/RRDs.bundle blib/arch/auto/RRDs/RRDs.bundle: /opt/local/lib/librrd.2.dylib (compatibility version 3.0.0, current version 3.13.0) [...] prunille:...dings/perl-shared> sudo /opt/local/bin/perl Makefile.PL RPATH=/opt/local/lib Writing Makefile for RRDs prunille:...dings/perl-shared> sudo emacs -nw Makefile prunille:...dings/perl-shared> grep '^LDDLFLAGS' Makefile LDDLFLAGS = -bundle -undefined dynamic_lookup prunille:...dings/perl-shared> sudo make [...] prunille:...dings/perl-shared> otool -L blib/arch/auto/RRDs/RRDs.bundle blib/arch/auto/RRDs/RRDs.bundle: /opt/local/lib/librrd.4.dylib (compatibility version 5.0.0, current version 5.0.0) [...] }}} -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ----------------------------------+----------------------------------------- Comment (by vinc17@macports.org): And that comes from the hints/darwin.sh file in the perl5.8 tarball: {{{ *) lddlflags="${ldflags} -bundle -undefined dynamic_lookup" case "$ld" in *MACOSX_DEVELOPMENT_TARGET*) ;; *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;; esac ;; }}} Shouldn't ${ldflags} be suppressed? (Not tested...) -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: ----------------------------------+----------------------------------------- Comment (by vinc17@macports.org): I've open a bug upstream: [http://rt.perl.org/rt3/Public/Bug/Display.html?id=57518] -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: Port: | ----------------------------------+----------------------------------------- Comment(by vinc17@macports.org): Removing ${ldflags} does not solve the problem, as it is added even when not included explicitly. -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: patch Port: | ----------------------------------+----------------------------------------- Changes (by vinc17@macports.org): * keywords: => patch Comment: Instead of patching perl5.8, I found it simpler to fix rrdtool (though I think that the real problem is in perl -- however it is badly documented) with the patch I've just attached: the idea was to include -L../../src/.libs/ early enough in the command line. Also note that this bug occurs only after some upgrades, such as from rrdtool 1.2.27, i.e. when an incompatible library is found in ${prefix}/lib and takes the precedence over the one from the build directory. -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@macports.org | Owner: markd@macports.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: patch Port: | ----------------------------------+----------------------------------------- Comment(by vinc17@macports.org): I've submitted a bug upstream: [http://oss.oetiker.ch/rrdtool- trac/ticket/192 RRDs Perl module links with wrong library under Mac OS X]. But as I said, it may be regarded as a bug in Perl. -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: markd@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: patch | Port: rrdtool ---------------------------------+------------------------------------------ Changes (by vinc17@…): * port: => rrdtool -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ---------------------------------+------------------------------------------ Reporter: vinc17@… | Owner: markd@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: patch | Port: rrdtool ---------------------------------+------------------------------------------ Comment(by markd@…): Please test current 1.3.5 rrdtool port. It has several OS X specific bug fixes. -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16165: rrdtool: RRDs Perl module fails to load librrd library ----------------------------------+----------------------------------------- Reporter: vinc17@… | Owner: markd@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: fixed | Keywords: patch Port: rrdtool | ----------------------------------+----------------------------------------- Changes (by vinc17@…): * status: new => closed * resolution: => fixed Comment: I think it is fixed, though I couldn't test under conditions where I could really test the fix. -- Ticket URL: <http://trac.macports.org/ticket/16165#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts