.la files can contain -l$library arguments in the dependency_libs variable which the consumer-library itself does not directly link against. If $library is then removed, linking against the consumer-library with libtool will produce errors despite the consumer-library .so not being directly linked with $library. Solution: Expand the -l* arguments and check if a .so or .a exists to link to, mark file broken otherwise.
Created attachment 189875 [details, diff] revdep-rebuild-la.patch Patch against svn. Just s/gawk/awk/ to make it apply against gentoolkit-0.2.4.2-r1
PS: This will only become more of a problem as more people use the dev-util/lafilefixer tool to fix .la files.
$ svn commit -m "Add patch from loki_val to check -l dependencies in .la files (Bug #267898)" ChangeLog src/revdep-rebuild/revdep-rebuild Sending ChangeLog Sending src/revdep-rebuild/revdep-rebuild Transmitting file data .. Committed revision 555. Do you know of any packages off hand that do this that I can use to test?
(In reply to comment #3) > $ svn commit -m "Add patch from loki_val to check -l dependencies in .la files > (Bug #267898)" ChangeLog src/revdep-rebuild/revdep-rebuild > Sending ChangeLog > Sending src/revdep-rebuild/revdep-rebuild > Transmitting file data .. > Committed revision 555. > > Do you know of any packages off hand that do this that I can use to test? nano /usr/lib/libX11.la At the end of dependency_libs add -lgoobledegook Without the patch, revdep-rebuild will not detect the problem. Packages that , directly or indirectly, pull in /usr/lib/libX11.la with libtool will fail to build, complaining of missing -lgoobledegook. For example: /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgooblededook With the patch, libX11 is marked broken and rebuilt.
With forced --as-needed, this is a case of what I'm talking about: loki ~ # ldd -r /usr/lib64/libX11-xcb.so linux-vdso.so.1 => (0x00007fff08bfe000) libc.so.6 => /lib/libc.so.6 (0x00007f380050d000) /lib64/ld-linux-x86-64.so.2 (0x00007f3800a88000) loki ~ # grep dependency_libs /usr/lib64/libX11-xcb.la dependency_libs=' -L/usr/lib64 -lX11 -lxcb-xlib -lxcb -lXau -lXdmcp -ldl' (This system also has some extra .la removal stuff, so YMMV.)
Released in gentoolkit-0.2.4.3