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

Re: Cross compiling doesn't work anymore (was: Re: GNU libc snapshots work again on the Hurd)



On Sun, Dec 20, 1998 at 02:03:28AM +0100, Marcus Brinkmann wrote:
> Thanks, this seems to work. But now I get:
> 
> ld: warning: ld.so.1, needed by /usr/i386-gnu/lib/libc.so.0.2, not found (try using --rpath)
> ld: warning: libmachuser.so.1, needed by /usr/i386-gnu/lib/libc.so.0.2, not found (try using --rpath)
> ld: warning: libhurduser.so.0.0, needed by /usr/i386-gnu/lib/libc.so.0.2, not found (try using --rpath)
> 
> I could fix this by adding '-Xlinker "-rpath=/usr/i386-gnu/lib"' to gcc
> command line. There must be a different solution to this, as it worked
> before.

The correct fix was to add: SEARCH_DIR ( /usr/i386-gnu/lib/ )
to the linker script.

I am just curious: Why was the path hardcoded at all? The old version of the
file seems to work as well. I include it here for your reference.

/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.
   The dynamic linker defines some functions used by libc.so.0.2,
          but ld uses definitions from libc.a before examining the
   dependencies of libc.so.0.2 to find ld.so.1.  */
GROUP ( libc.so.0.2 ld.so.1 libcrt.a libmachuser.so libhurduser.so )

Thank you,
Marcus

flora:/tmp# cat /usr/lib/gcc-lib/i386-gnu/2.7.2.3/libc.so
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily.  */
GROUP ( /usr/i386-gnu/lib/libc.so.0.2 /usr/i386-gnu/lib/libcrt_nonshared.a )
SEARCH_DIR ( /usr/i386-gnu/lib/ )


-- 
"Rhubarb is no Egyptian god."        Debian GNU/Linux        finger brinkmd@ 
Marcus Brinkmann                   http://www.debian.org    master.debian.org
Marcus.Brinkmann@ruhr-uni-bochum.de                        for public  PGP Key
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       PGP Key ID 36E7CD09


Reply to: