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

Bug#291641: libtool: resolves dependencies to the install tree rather than the build tree



Scott James Remnant <scott@netsplit.com> writes:

> Except gcc *does* know where the version it's supposed to be looking at
> is located, the path to it is sitting in the shared library's RPATH
> field:
>
>   NEEDED      libtestc.so.0
>   RPATH       /home/scott/tmp/lt-test/c/.libs:/usr/local/lib
>
> At this point, gcc is checking the symbol references of libtestb.so
> against those libraries listed in its NEEDED lines *without* honouring
> the RPATH line.
>
> In summary:
>
>   When finding/loading a dependency of a shared library, gcc should
>   honour the RPATH of that shared library.

I'm not a compiler expert, but does gcc ever see that information?  I
think gcc, via collect2, invokes the ld linker to do the link and so
gcc never sees any of the NEEDED or RPATH data.  The ld linker is part
of the binutils package, not gcc.

-- 
Philip Martin



Reply to: