2010-05-13 13:09:24 ld.so.cache question
Reggy Perrin (UNITED STATES)
Message: 89379
Hi folks,
Is there a way a runtime to adjust ld.so.cache, or control the directories searched at build time? We are splitting our image into different partitions, and the ld.so.cache is only searching /usr/lib. We'd like for it to search /usr/lib and /opt/lib as well, if possible.
RP
QuoteReplyEditDelete
2010-05-13 13:13:24 Re: ld.so.cache question
Reggy Perrin (UNITED STATES)
Message: 89380
NOTE: During the build, bfin-linux-uclibc-ldconfig won't see /opt/lib, because it is not part of the romfs image at that stage (it is mounted a runtime).
QuoteReplyEditDelete
2010-05-13 13:30:02 Re: ld.so.cache question
Robin Getz (UNITED STATES)
Message: 89383
Reggy:
I think that tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN77 should help you out.
(Although I don't think that is the correct way to do it - Mike - who would know the answer - is out for a bit) - and it should get you working.
-Robin
QuoteReplyEditDelete
2010-05-13 13:52:09 Re: ld.so.cache question
Reggy Perrin (UNITED STATES)
Message: 89384
Thanks, Robin. Actually, that works pretty well. We will use the LD_LIBRARY_PATH environment variable.
QuoteReplyEditDelete
2010-05-13 14:25:03 Re: ld.so.cache question
Robin Getz (UNITED STATES)
Message: 89386
Reggy:
Sort term - that might be OK - but I don't think it is the right long term answer...
-Robin
QuoteReplyEditDelete
2010-05-15 20:44:21 Re: ld.so.cache question
Mike Frysinger (UNITED STATES)
Message: 89440
ld.so.cache is a cache file only. it is not something you abuse to add more lookup paths.
if you have a specific app you need to search /opt/lib/, then add it to the ELF's RPATH at link time. see -rpath in the linker man page.
QuoteReplyEditDelete