LD_LIBRARY_PATH has a higher precedence than RUNPATH. Setting it just hides the problem. You either need to fix the stuff pointing to /usr/gcc/4.4 to point to /usr/gcc/4.7 or vice versa.
Another option is to pick one version of the runtime and make it the default by either shipping it in the default search path or adding its to the default search path and avoid setting the RUNPATH. It’s much cleaner, easier to work with, and generally the preferred way to go. Andy. On 5 Mar 2015, at 12:31, Gabriele Bulfon via illumos-discuss <[email protected]<mailto:[email protected]>> wrote: I understand your points. But still doesn't convince me. Why ldd would show just 4.7 deps if I prepend its lib in LD_LIBRARY_PATH? Even in case of recursive check, that should be still looking for 4.4. ...unless the recursive lib requiring for 4.4 has no RPATH in /usr/gcc/4.4....? ________________________________ Da: Andy Stormont via illumos-discuss <[email protected]<mailto:[email protected]>> A: [email protected]<mailto:[email protected]> Gabriele Bulfon <[email protected]<mailto:[email protected]>> Data: 5 marzo 2015 10.49.33 CET Oggetto: Re: [discuss] library dependencies clarification On 5 Mar 2015, at 09:20, Gabriele Bulfon via illumos-discuss <[email protected]<mailto:[email protected]>> wrote: Looking better, I found that almost all of the libreoffice ".so" files ware showing a double dependengy on libs from 4.4 and 4.7, using ldd. By using "LD_LIBRARY_PATH=/usr/gcc/4.7/lib ldd name.so", double dep was gone, correctly being just 4.7. I could temporarily fix the packaging by running "LD_LIBRARY_PATH=/usr/gcc/4.7/lib gmake package", but I don't think this is ok in final installation of libreoffice libs, as thay may appear to depend on 4.4 libs also again. You need to keep in mind that ldd is recursive. It will show dependencies of dependencies. LD_LIBRARY_PATH is not the solution. So my question is, how can these libs depend on "libstdc++.so.6" first coming from 4.7 and then from 4.4? Also, why this happens even though these libs have RUNPATH and RPATH specifying correctly? Try to identify which dependency is pulling in the c++ runtime and look at its RPATH/RUNPATH. I’ve noticed that things built with libtool often have the default search path hardcoded into them at that could be causing this problem. Here is an example: bash# elfdump -d libabplo.so ... [37] RUNPATH 0x1eec2 /usr/gcc/4.7/lib:/lib:/usr/lib:/usr/lib/mps:/usr/lib/libreoffice/program:/usr/lib/libreoffice/ure-link/lib [38] RPATH 0x1eec2 /usr/gcc/4.7/lib:/lib:/usr/lib:/usr/lib/mps:/usr/lib/libreoffice/program:/usr/lib/libreoffice/ure-link/lib ... bash# ldd libabplo.so libstdc++.so.6 => /usr/gcc/4.7/lib/libstdc++.so.6 ... libgcc_s.so.1 => /usr/gcc/4.7/lib/libgcc_s.so.1 ... libstdc++.so.6 => /usr/gcc/4.4/lib/libstdc++.so.6 libgcc_s.so.1 => /usr/gcc/4.4/lib/libgcc_s.so.1 thanks for any help, Gabriele. illumos-discuss | Archives<https://www.listbox.com/member/archive/182180/=now> [https://www.listbox.com/images/feed-icon-10x10.jpg5f5aaac.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc] <https://www.listbox.com/member/archive/rss/182180/21566248-cfeafdee> | Modify<https://www.listbox.com/member/?&> Your Subscription [https://www.listbox.com/images/listbox-logo-small.png5f5aaac.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc] <http://www.listbox.com/> illumos-discuss | Archives<https://www.listbox.com/member/archive/182180/=now> [https://www.listbox.com/images/feed-icon-10x10.jpg5f5aaac.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc] <https://www.listbox.com/member/archive/rss/182180/21175541-02f10c6f> | Modify<https://www.listbox.com/member/?&> Your Subscription [https://www.listbox.com/images/listbox-logo-small.png5f5aaac.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc] <http://www.listbox.com/> illumos-discuss | Archives<https://www.listbox.com/member/archive/182180/=now> [https://www.listbox.com/images/feed-icon-10x10.jpg5f5aaac.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc] <https://www.listbox.com/member/archive/rss/182180/21566248-cfeafdee> | Modify<https://www.listbox.com/member/?&> Your Subscription [https://www.listbox.com/images/listbox-logo-small.png5f5aaac.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc] <http://www.listbox.com/> ------------------------------------------- illumos-discuss Archives: https://www.listbox.com/member/archive/182180/=now RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be Modify Your Subscription: https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4 Powered by Listbox: http://www.listbox.com
