Library mapping question
Mel
fbsd.questions at rachie.is-a-geek.net
Fri Jul 11 12:08:13 UTC 2008
On Friday 11 July 2008 10:22:21 Unga wrote:
> Hi all
>
> I have same name libraries in two different locations, eg.
> /usr/lib/libXXX.so and /usr/local/lib/libXXX.so. They were created using
> same sources and the same compiler.
>
> The app1 is linked with /usr/lib/libXXX.so and app2 is linked with
> /usr/local/lib/libXXX.so.
>
> When app2 is run, the dynamic linker (ld-elf.so.1) finds /usr/lib/libXXX.so
> first and ends up with following error: undefined reference to `_myxxx'
>
> This is not an issue with Linux's dynamic linker but it seems FreeBSD's
> function look up is very specific. I cannot change the dynamic linker's
> search path, then app1 fails.
>
> How do I get the app2 to refer to /usr/local/lib/libXXX.so?
>
> In FreeBSD, is there a way to instruct the dynamic linker (ld-elf.so.1) to
> continue to search for the same library name in different locations?
>
> What are the other possible options?
The best option is to bump version number of the shared library with the more
functions. FreeBSD doesn't link with .so, it links with .so.$VERSION. It
would be easier to help you though, if we wouldn't be talking about libXXX
but the actual libraries. Maybe it can be done by adding small changes to the
port that installs /usr/local/lib/libXXX.so (if this isn't your own library).
--
Mel
Problem with today's modular software: they start with the modules
and never get to the software part.
More information about the freebsd-questions
mailing list