Summary: | Failed to emerge app-arch/bzip2-1.0.6-r3: invalid reference to libbz2.1.dylib | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Konstantin Tokarev <annulen> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | PPC | ||
OS: | OS X | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | small change in the ebuild to get the correct install name. |
Description
Konstantin Tokarev
2013-02-02 14:13:27 UTC
Installation fails with that message for me, 1.0.6-r1 fails the same way. I believe the final linking of libbzip2 has the "wrong" name: i686-apple-darwin9-gcc -Wl,-dead_strip_dylibs -dynamiclib -install_name /Users/frb15/Desktop/Gentoo/usr/lib/libbz2.1.dylib -compatibility_version 1.0.0 -current_version 1.0.6 -o libbz2.1.0.6.dylib blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o install name should be usr/lib/libbz2.1.0.6.dylib not usr/lib/libbz2.1.dylib. I am looking at the ebuild. Hum, if I change bzip2-1.0.6-Makefile-bzip2_dylib to make the correction above, I get: * QA Notice: invalid reference to /Users/frb15/Desktop/Gentoo/usr/lib/libbz2.1.0.6.dylib in /Users/frb15/Desktop/Gentoo/bin/bzip2 * ERROR: app-arch/bzip2-1.0.6-r3 failed: * invalid install_name found, your application or library will crash at runtime Which I guess is referring to the fact that on my system I currently only have: ls -la usr/lib/libbz2* lrwxrwxrwx 1 frb15 UOCNT\domain users 24 Mar 9 2012 usr/lib/libbz2.dylib -> ../../lib/libbz2.1.dylib the real library living in lib not usr/lib, may be that's the real trouble. Testing further. I got it to install with two changes. One to the ebuild in src_compile *-darwin*) bemake PREFIX="${EPREFIX}"/lib -f Makefile-libbz2_dylib || die and one in bzip2-1.0.6-Makefile-bzip2_dylib: SOLDFLAGS=-dynamiclib -install_name $(PREFIX)/libbz2.1.dylib -compatibility_version 1.0.0 -current_version 1.0.6 I removed LIBDIR from that line. It probably could be made more elegant but it works. Not the right place to mention this but readline has exactly the same problem. install_name in /usr/lib while the real library is in /lib. Created attachment 337940 [details, diff]
small change in the ebuild to get the correct install name.
The attached patch for the ebuild solve the problem completely. The main issue is that install_name was assume to be $PREFIX/usr/lib/lib*.dylib when it should be $PREFIX/lib/lib*.dylib.
I found out what the problem was last sunday at FOSDEM. We run gen_usr_ldscript -a before bzip is moved to /bin, therefore it isn't fixed. So we should basically turn that around and then it will work as expected. Fabian made a different change that fixes the problem. This bug should be closed. fixed the other day, thanks! |