This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker errors when compiling and linking with a new glibc


Thanks for the help all of you guys! It worked. What I did was add "/lib64" to the option "--library-path" inside the "testrun.sh" script that comes with glibc. If I'm not mistaken, now the loader from my newly built glibc is able to use the "libgcc_s.so.1" that is in there to execute my test program that uses some of my modifications to glibc.

Thanks again for all of the help!

Daniel



----- Original Message ----
From: Mike Frysinger <vapier@gentoo.org>
To: libc-help@sourceware.org
Cc: Ryan Arnold <ryan.arnold@gmail.com>; Daniel De La Zerda <danieldelazerda@gmail.com>; Carlos O'Donell <carlos@systemhalted.org>; pasky@suse.cz
Sent: Friday, March 20, 2009 3:16:15 PM
Subject: Re: linker errors when compiling and linking with a new glibc

On Friday 20 March 2009 13:55:03 Ryan Arnold wrote:
> On Fri, Mar 20, 2009 at 12:48 PM, Daniel De La Zerda wrote:
> > I don't think that debugging will help. When I run /bin/ls I get a
> > segmentation fault as well, but when I run /bin/cat I don't get the
> > segmentation fault and it works as expected. I think I can't just include
> > the original "/lib/libgcc_s.so.1" that is installed in my system into my
> > new glibc tree. I'm not an expert but I think I have to get one that is
> > built with my own glibc, but I dont know how. Does anybody know?
>
> The segmentation fault when running /bin/ls is a symptom of trying to
> use LD_LIBRARY_PATH when the path you specify doesn't have  a complete
> set of libraries.  Personally I rarely ever use LD_LIBRARY_PATH.  The
> loader can't find the libraries it needs.

not so sure ... if your old glibc is in /lib, then setting LD_LIBRARY_PATH to 
the new glibc is wrong -- the old loader will still be used (since /bin/ls set 
PT_INTERP to a hardcoded path).  you need to manually execute the new loader, 
tell the new loader where the new libs are, and then tell it the binary to 
execute.

but i've only been half following this discussion ... maybe i'm completely off 
base
-mike



      


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]