Re: Repost: error--/lib/libc.so.6: undefined reference to '__libc_stack_end@GLIBC_2.1'

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

 



On Tue, 1 Apr 2003, John Ketchum wrote:

> Sorry for the repost, but I didn't get a response the first time, so I'll
> try again.

I suspect most of us aren't finding this reproducible.  I certanly don't,
but then I don't have gcc 3.1 either.

> I have a machine running RH8.0, custom compiled 2.4.20 kernel, with gcc 3.1
> installed from tarball sources in /usr/local/bin, glibc 2.3.1 installed
> from tarball sources in /usr/local/lib, plus gcc 3.2 that comes with RH 8.0
> in /usr/bin, and the new glibc 2.3.2 installed from RH rpms.
>
> Now when I try to compile and link even the most basic c code with gcc 3.2,
> I get the following error:
>
> /lib/libc.so.6: undefined reference to '__libc_stack_end@xxxxxxxxx'
>
> For example, a file containing the following code:
>
> main(void)
> {
>          int i;
>          for(i=0; i<10; ++i) {
>                  continue;
>          }
> }
>
> compiled at the command line with
>
> /usr/bin/gcc -o test test.c
>
> yields the above error.
> I can compile the same code with gcc 3.1, with no errors.
>
> Here's how I got where I am.
> Installed gcc 3.1 from tarball sources on RH 7.3 machine. (with custom
> compiled 2.4.19 kernel)
> Upgraded machine to RH 8.0 still running 2.4.19 kernel
> Now I had an 8.0 machine with gcc 3.1 in /usr/local/bin, and gcc 3.2 in
> /usr/bin
> Installed glibc 2.3.1 from tarball sources in /usr/local/lib
> Now I could compile sources with gcc 3.1 with no problem, presumably link
> still with glibc 2.2.93 in /usr/lib.
> However, when I tried to compile with gcc 3.2, I got a link error:
> /lib/libc.so.6: undefined reference to '__libc_stack_end@xxxxxxxxx'
> I could resolve this undefined reference by adding '-L/usr/local/lib' to
> the gcc command line, so I was still functional, and could build code that
> required glibc 2.3.1
> Now, I have installed glibc 2.3.2 from newly released RedHat rpms, and I
> still have the above problem when compiling with gcc 3.2, except that
> referring to -L/usr/local/lib no longer solves the problem, because I get a
> different set of unresolved references.

When you installed 3.1, did you change any configuration stuff so that the
appropriate libraries would be linked?  When I had two versions of the
compiler, I needed a $LD_LIBRARY_PATH definition when using the local one
but not when I used the system one.

>
> I would like to have a clean install of gcc 3.2 and glibc 2.3.2, but I
> don't want to resort to the extreme solution of reformatting and
> reinstalling 8.0

You can force a reinstall of glibc and gcc with "rpm -Uvh --force
<rpm-file>".  That's about as clean as it gets without a reinstall.  But
if you made changes to non-RPM config files, that still won't fix the
problem.

>
> Any suggestions would be greatly appreciated.
>
>
>
> John Ketchum
> Qualcomm Inc.
>
>
>
>

-- 
		Matthew Saltzman

Clemson University Math Sciences
mjs@xxxxxxxxxxx
http://www.math.clemson.edu/~mjs



-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux