Opened 15 years ago

Closed 15 years ago

#22728 closed defect (fixed)

root links with non-MacPorts libraries

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: mattiafrancescomoro@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc:
Port: root

Description

root @5.24.00_0 links with non-MacPorts libraries. Some examples:

$ otool -L /opt/local/bin/root /opt/local/bin/rootd
/opt/local/bin/root:
	/usr/X11/lib/libXpm.4.dylib (compatibility version 16.0.0, current version 16.0.0)
	/usr/X11/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
	/usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0)
	/usr/X11/lib/libXft.2.dylib (compatibility version 4.0.0, current version 4.2.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
/opt/local/bin/rootd:
	/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 5.0.0)
	/usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
	/usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, current version 0.9.7)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

As you see, root is linking with various X libraries in /usr/X11 and rootd is linking with openssl in /usr/lib. MacPorts policy is that ports should link to libraries provided by other ports whenever possible.

Also, root declares dependencies on libpng, giflib, tiff, qt4-mac, and freetype, but doesn't appear to link with any of them (at least, not that I could determine with otool).

The root distfile seems to include its own copies of the pcre, freetype and unuran source, and the root build process appears to build and install these. This is unusual; again we would prefer root to use the existing MacPorts ports for this software. (There is no unuran port at this time but hopefully that can be quickly remedied.)

Finally, root doesn't ensure it's UsingTheRightCompiler.

Most of these problems probably stem from the configure environment variables MacPorts sets not being propagated to the Makefile for some reason.

Attachments (1)

Portfile (5.4 KB) - added by mattiafrancescomoro@… 15 years ago.
Update version (5.25.04) added new variant

Download all attachments as: .zip

Change History (9)

comment:1 Changed 15 years ago by mattiafrancescomoro@…

Modified with new configure flag, solve declared dependencies.

Unsolve unuran and x11 linking.

comment:2 Changed 15 years ago by skymoo (Adam Mercer)

Looks like you're assuming MacPorts is installed in /opt/local, you should use ${prefix} instead.

Changed 15 years ago by mattiafrancescomoro@…

Attachment: Portfile added

Update version (5.25.04) added new variant

comment:3 Changed 15 years ago by mattiafrancescomoro@…

Someone checks the new version?

comment:4 Changed 15 years ago by mf2k (Frank Schima)

ssl does not seem to be getting picked up:

$ otool -L /opt/local/bin/root /opt/local/bin/rootd
/opt/local/bin/root:
	/opt/local/lib/libXpm.4.dylib (compatibility version 16.0.0, current version 16.0.0)
	/opt/local/lib/libXext.6.dylib (compatibility version 11.0.0, current version 11.0.0)
	/opt/local/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
	/opt/local/lib/libXft.2.dylib (compatibility version 4.0.0, current version 4.13.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
/opt/local/bin/rootd:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)

Also, in the configure I see this:

Checking for libssl ... /opt/local/lib
Checking for libcrypto ... /opt/local/lib
Checking for openssl/bio.h ... no

I don't understand why bio.h is not getting seen.

comment:5 Changed 15 years ago by mf2k (Frank Schima)

I should have mentioned in my comment above that I was using the 5.25.04 version provided by mattiafrancescomoro.

comment:6 Changed 15 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

I fixed the problem linking to openssl. I also updated to the latest version 5.26.00. Let me know if that's a problem. r63704.

comment:7 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: closedreopened

Thanks, root @5.26.00_0 is an improvement, but there are still a few parts of root that are linking with non-MacPorts libraries libz, libxml2 and libicucore:

$ otool -L /opt/local/bin/xrdcp /opt/local/lib/root/libXMLParser.so
/opt/local/bin/xrdcp:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/opt/local/lib/root/libXMLParser.so:
	/opt/local/lib/root/libXMLParser.so (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
	/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.3.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
	/usr/lib/libicucore.A.dylib (compatibility version 1.0.0, current version 40.0.0)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)

libz and libxml2 are definitely provided by MacPorts and those versions should be used instead of the system versions. libicucore I'm less sure about. MacPorts provides an icu port, but it does not install a libicucore. So I don't know if this is the same software.

comment:8 Changed 15 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: reopenedclosed

r65490. I added dependencies on zlib and libxml2 - replacing xml2 which I think was not correct since it has no libraries. I also don't see where libicucore might come from in Macports.

Note: See TracTickets for help on using tickets.