This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld: warning: ld-linux.so.2, needed by /lib/libc.so.6, not found
On Sun, Apr 27, 2003 at 03:20:03PM +0300, Kai Ruottu wrote:
> So, why the 'linked' shared libraries are not found from the
> normal search places (pointed with '-L') or not even from the
> same place where the libraries needing them exist? Ok, adding
> the '-rpath-link <library-dir>' helps, but why adding it is
> obligatory ? On Windows/MinGW host not even this helps and
Because the runtime linker will not be searching -L paths, so if the
static linker does, you can get even more confusing results.
> For me, adding the '-rpath-link' into 'specs' in cross-GCCs
> is not a serious issue, but generally a cross-GCC should work
> with the same 'specs' as the native one (excluding all the
> Solaris2 etc. targets with their '/usr/ccs/lib', '/usr/ucblib'
> etc. absolute search places listed in the LIB_SPEC), or what?
As I said, the new solution to this old problem is configure
--with-sysroot. But it won't be available until binutils 2.14 (very
soon now) and gcc 3.4 (probably six months yet).
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer