Any GCC experts out there?

Reinhard Tartler siretart at tauware.de
Mon Aug 25 09:44:54 BST 2008


Russel Winder <russel.winder at concertant.com> writes:

> Setting LD_LIBRARY_PATH=/usr/local/apr/lib does solve the problem but:
>
> a) setting LD_LIBRARY_PATH is generally considered the wrong thing to do
> in all cases.

Well, in the debian/linux community, it is generally considered "the
wrong thing" to set rpath. The solaris community seems to suggest the
opposite.

> b) should not be needed since the compilation stage set -L and this
> should have been remembered. in the shared object.

Here is the subtle difference between gnu LD and the Solaris LD (gcc
does not really matter here). When using Solaris' LD with -L it does
pretty much the same as gnu LD's -rpath switch.

So depending on the compiler you are using (I suspect you use the gnu
toolchain for your package) you need to adjust your linker flags.

Btw, as probably easier workaround, you can set an implicit -rpath value
on the binary by setting LD_RUN_PATH at compilation time. See ld(1) (the
gnu version) for details. 

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4




More information about the bazaar mailing list