Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Shlib major bumps and UPDATE builds

On Wed, Jan 14, 2009 at 04:23:36PM +0100, Havard Eidnes wrote:
> I've finally found out what causes this, and it is the way we
> link our shared libraries.  As an example I use lib/libdns, where
> a MAKEVERBOSE=2 build resulted in:
> /u/build/HEAD/tools/sgimips/bin/mipseb--netbsd-gcc  -Wl,-nostdlib 
> -B/u/build/HEAD/dest/sgimips/usr/lib/ -B/u/build/HEAD/dest/sgimips/usr/lib/   
> -Wl,-rpath-link,/u/build/HEAD/dest/sgimips/lib:/u/build/HEAD/dest/sgimips/usr/lib
>   -L/u/build/HEAD/dest/sgimips/lib  -Wl,-x -shared -Wl,-soname, 
> -Wl,--warn-shared-textrel -o  -Wl,--whole-archive libdns.a  
> -Wl,--no-whole-archive  -L/u/build/HEAD/obj/sgimips/lib/libpthread -lpthread 
> -L/u/build/HEAD/obj/sgimips/lib/libcrypto -lcrypto  -Wl,--fatal-warnings   
> -L/u/build/HEAD/dest/sgimips/usr/lib
> You will note that -L${DESTDIR}/usr/lib and -L${DESTDIR}/lib
> comes before the shared libraries it wants to use, and even
> though care is taken to point to the OBJDIRS of those shared
> libraries, the previous -L.../usr/lib and -L.../lib will override
> those directories if the shared library is already installed in
> DESTDIR, as it typically will be with an UPDATE build.

One option would to be to explicitly give the filename of the .so.
Probably by replacing the:
    -L/u/build/HEAD/obj/sgimips/lib/libpthread -lpthread

Then the linker doesn't so the lib-search at all.


David Laight:

Home | Main Index | Thread Index | Old Index