bug-glibc
[Top][All Lists]
Advanced

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

Desperate for Help


From: Jeffrey Stephens
Subject: Desperate for Help
Date: Sat, 29 Sep 2001 09:30:46 -0400

I have spent many hours compiling and installing a new gcc and glibc,
but I still can't get them to work. I have made posts to a number of
news groups, but without success.  You are my last resort. I am cut/and
pasting a post that I made to one of the newsgroups below. I am hoping
you have the time to respond.  Thanks much.

Regards,
Jeff Stephens

******copy of newsgroup post**********

Jeffrey Stephens wrote:

> I am running Redhat Linux 6.2, kernel 2.2.14-5.0, XFree86 4.1.0, and
> KDE 1.1.2.  I decided I wanted to update gcc and glibc, so I
downloaded
> gcc 2.95.3 and glibc 2.2.4.  I first compiled and installed gcc, then
> glibc.
> Both are installed in /usr/local.  I still have the original gcc (egcs

> 2.91.66)
> and glibc (2.1.3) installed in /usr.  I quickly found out something
was
> wrong. Even trying to compile the simple 'hello world' program
produces
> the
> following error:
>
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> /usr/local/lib/libc.so.6: undefined reference to
address@hidden'
>
> /usr/local/lib/libc.so.6: undefined reference to
> address@hidden'
> collect2: ld returned 1 exit status
>
> I started reading the gcc doc and tried compiling with the -v switch.
I
> got the
> same as above along with the below listed info. As you can see,
> everything
> seems to be pointing to /usr/local except '-dynamic-linker' which is
> pointing
> at /lib/ld-linux.so.2.  I investigated and discovered several things:
1)
> /lib/ld-linux.so.2
> is a symbolic link to /lib/ld-2.1.3.so ; 2) there is also a
> ld-linux.so.2 in /usr/local/lib
> (the 2.2.4 install) and it points to /usr/local/lib/ld-2.2.4.so ; 3)
so,
> I figured, since
> all these errors begin with _dl_ which I believe to be dynamic linker,

> the dl must
> be the problem.  gcc must be using the wrong one. So, I think, why
don't
> I just
> change the link in /lib (ld-linux.so.2 to point to ld-2.2.4.so in
> /usr/local/lib. So, I
> first DELETED /lib/ld-linux.so.2 intending to recreate it pointing to
> ld-2.2.4.so.
> WRONG!!!!  Everything went belly up after I deleted this link. The
only
> way I was
> able to recreate it was by booting another complete Linux installation
I
> have on
> the same system, mounting the / partition from the installation I had
> just screwed
> up, and recreating the link.  Now, at least, I'm back where I started,
a
> little wiser,
> but still with the same question.  HOW can I get gcc 2.95.3 to use the

> right linker so
> I can compile something?
>
> Thanks for any help you can give.
>
> Regards,
> Jeff Stephens
>
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> $ gcc -v verglibc.c
> Reading specs from
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
>
> gcc version 2.95.3 20010315 (release)
>  /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/cpp0 -lang-c -v
> -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__EL
> F__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__
> -D__linux__ -D__unix -D__linux -Asystem(po
> six) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686
> -Dpentiumpro -D__i686 -D__i686__ -D__
> pentiumpro -D__pentiumpro__ verglibc.c /tmp/ccl06xcJ.i
> GNU CPP version 2.95.3 20010315 (release) (i386 Linux/ELF)
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/local/include
>
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../i686-pc-linux-gnu/include

>
>  /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/include
>  /usr/include
> End of search list.
> The following default directories have been omitted from the search
> path:
> n -o /tmp/ccalbrcl.s
> GNU C version 2.95.3 20010315 (release) (i686-pc-linux-gnu) compiled
by
> GNU C version 2.95.3 20010315 (release).
>  /usr/local/i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/ccHApIk2.o
> /tmp/ccalbrcl.s
> GNU assembler version 2.11.2 (i686-pc-linux-gnu) using BFD version
> 2.11.2
>  /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/collect2 -m elf_i386
> -dynamic-linker /lib/ld-linux.so.2 /usr/local/lib/crt1.o
> /usr/local/lib/crti.o
> /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtbegin.o
> -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3
> -L/usr/local/i686-pc-linux-gnu/lib -L/usr/local/lib /tmp/ccHApIk2.o
> -lgcc -lc -lgcc
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtend.o
> /usr/local/lib/crtn.o

I thought I might have discovered my problem when I read the glibc FAQ.
I tried the
following:

$ gcc --dynamic-linker=/usr/local/lib/ld-linux.so.2 verglibc.c

No luck! Got this error.

cc1: Invalid option `-fdynamic-linker=/usr/local/lib/ld-linux.so.2'

Then I tried:

$ gcc -Wl,--dynamic-linker=/usr/local/lib/ld-linux.so.2 verglibc.c
#that's W(small ell)

This doesn't work either!

/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
/usr/local/lib/libc.so.6: undefined reference to address@hidden'
/usr/local/lib/libc.so.6: undefined reference to address@hidden'
/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
/usr/local/lib/libc.so.6: undefined reference to address@hidden'
/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
/usr/local/lib/libc.so.6: undefined reference to address@hidden'

/usr/local/lib/libc.so.6: undefined reference to
address@hidden'
collect2: ld returned 1 exit status

Still hoping for some help. Thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]