Looks like libtools.eclass is broken as it doesn't make a ltmain.sh version check. For example the patch "ELT-patches/fix-relink/1.4.0" is applied to ltmain.sh version 1.5.6 and instead of fixing things (already fixed in this libtool version) it breaks relinking. I found this in flac 1.1.1 and 1.1.2 ebuilds (bug #83485). This will also happen for every ebuild that make an unuseful thing: first call "elibtoolize --copy --force" and then calls "elibtoolize --reverse-deps". I'll suggest to check the ltmain version before applying patches, instead of making a simple dry-run check. If you think that my description is right I'll try to make a patch for it, just let me know.
For who is interested the problem is that the patch ELT-patches/fix-relink/1.4.0 is applied also to libtool 1.5.x where the relink was already fixed and this piece: @@ -2117,7 +2141,7 @@ -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) tmp_libs="$deplib $tmp_libs" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; broke it again as it reverse the -L order.
The problem is not that bit, but that the 1.5.0 patch changes some other things that the 1.4.0 do not, but for some reason still apply. Over here with the proper 1.5.0 patch it works fine: ----- nosferatu flac-1.1.2 # ldd /space/var/tmp/portage/flac-1.1.2/image/usr/lib/libFLAC++.so.5.0.0 linux-gate.so.1 => (0xffffe000) libFLAC.so.7 => not found libc.so.6 => /lib/libc.so.6 (0xb7e85000) /lib/ld-linux.so.2 (0x80000000) nosferatu flac-1.1.2 # epm -q flac flac-1.1.1 nosferatu flac-1.1.2 #
Created attachment 52258 [details, diff] libtool-eclass.patch Patch that gets the eclass to try and match version better.
*** Bug 83485 has been marked as a duplicate of this bug. ***
Created attachment 52266 [details, diff] libtool-eclass.patch Ok, this one runs revese through the patches (from larger version to smaller) and skips whatever patches if newer than libtool version.
Your patch worked. Thanks a lot!
Done.