Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Jul 2008 01:22:21 -0700 (PDT)
From:      Unga <unga888@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   Library mapping question
Message-ID:  <310032.41745.qm@web57009.mail.re3.yahoo.com>

next in thread | raw e-mail | index | archive | help
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?

Appreciate your reply.

Kind regards
Unga





      



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?310032.41745.qm>