Red Hat Topics - [RH73] Trying to recompile GCC 3.2.1: undefined reference to `__ctype_b_loc' ??

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > May 2005 > [RH73] Trying to recompile GCC 3.2.1: undefined reference to `__ctype_b_loc' ??





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author [RH73] Trying to recompile GCC 3.2.1: undefined reference to `__ctype_b_loc' ??
Alfred Z. Newmane

2005-05-09, 5:46 pm

Hello, I recently tried to upgrade my glibc from 2.2* to 2.3.2 on my
RH7.3 box. glibc 2.2 is still there but I can no longer use GCC 3.2.1 (I
had both GCC 3.2.1 and 2.96 working just fine on this system prior to
the upgrade.)

When I try to recompile gcc 3.2.1 (with GCC 2.96), I get these errors
(after `make clean`, `configure`, then `make`, fro mthe "build"
directory. Also note GCC 3.2.1 is from a source rpm.) Note, before all
this, when I first installed GCC 3.2.1, it compiled just fine, never
changed any source or anything.


$ make clean; ../configure --prefix=/usr/local
$ make
[...]
jargrep.o: In function `extract_line':
/usr/src/redhat/SOURCES/gcc-3.2-20020903/build/fastjar/../../fastjar/
jargrep.c:347: undefined reference to `__ctype_b_loc'
/usr/src/redhat/SOURCES/gcc-3.2-20020903/build/fastjar/../../fastjar/
jargrep.c:349: undefined reference to `__ctype_b_loc'

jargrep.o: In function `chk_wrd':
/usr/src/redhat/SOURCES/gcc-3.2-20020903/build/fastjar/../../fastjar/
jargrep.c:386: undefined reference to `__ctype_b_loc'
/usr/src/redhat/SOURCES/gcc-3.2-20020903/build/fastjar/../../fastjar/
jargrep.c:392: undefined reference to `__ctype_b_loc'

jargrep.o: In function `mk_ascii':
/usr/src/redhat/SOURCES/gcc-3.2-20020903/build/fastjar/../../fastjar/
jargrep.c:498: undefined reference to `__ctype_b_loc'


And the existing GCC 3.2.1 seems broken now:

$ cat program.c
main(){}

# gcc 2.95
$ /usr/bin/gcc program.c

# gcc 3.2.1
$ /usr/local/bin/gcc program.c
/usr/local/lib/libc_nonshared.a(elf-init.oS): In function
`__libc_csu_init':
/usr/src/redhat/SOURCES/glibc-2.3.2-20030312/csu/elf-init.c:64:
undefined reference to `__init_array_end'
/usr/src/redhat/SOURCES/glibc-2.3.2-20030312/csu/elf-init.c:64:
undefined reference to `__init_array_start'
/usr/src/redhat/SOURCES/glibc-2.3.2-20030312/csu/elf-init.c:67:
undefined reference to `__init_array_start'

/usr/local/lib/libc_nonshared.a(elf-init.oS): In function
`__libc_csu_fini':
/usr/src/redhat/SOURCES/glibc-2.3.2-20030312/csu/elf-init.c:76:
undefined reference to `__fini_array_end'
/usr/src/redhat/SOURCES/glibc-2.3.2-20030312/csu/elf-init.c:76:
undefined reference to `__fini_array_start'
/usr/src/redhat/SOURCES/glibc-2.3.2-20030312/csu/elf-init.c:78:
undefined reference to `__fini_array_start'
/usr/local/lib/libc.so.6: undefined reference to
`__libc_stack_end@GLIBC_PRIVATE'
collect2: ld returned 1 exit status


It seems it does not like something from the glibc 2.3.2 that I tried ot
install. It installed into /usr/local/lib while the old 2.2.5 glibs
stuff remains in /lib and /usr/lib. GCC 3.2.1 had originally been
installed in /usr/local too so I'm wondering if glibc 2.3.2 install
overrided something GCC uses in there??

(I even tried reisntalling all the glibc rpms (glibc, common, devel,
utils) 2.2.5, zlib,
ncurses (devel, c++-devel) 5.2-26, and gcc (c++, chill, objc) 2.96-113,
just in case. I even reisntalled libgcc-3.2.2-5.fdr.0.rh73.i386.rpm, but
that did nothing.)

I just don't understand why GCC 3.2.1 simply stopped working. Do I need
to dump glibc 2.3.2 (if so, how is this done?) or is there a way ot keep
it and make GCC 3.2.1 point back to 2.2.5, or make it recompile???

Thanks greatly for any help.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com