[RH73] Trying to recompile GCC 3.2.1: undefined reference to `__ctype_b_loc' ??

From: Alfred Z. Newmane (a.newmane.remove_at_eastcoastcz.com)
Date: 05/09/05

  • Next message: Jean-David Beyer: "Re: g++4/gcc4"
    Date: Mon, 9 May 2005 08:03:32 -0700
    
    

    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.


  • Next message: Jean-David Beyer: "Re: g++4/gcc4"

    Relevant Pages

    • Re: Can gcc 4.0 be used to build DBI modules if perl is bulit with gcc 3.3?
      ... My production machine still uses 10.39 and I am afraid to upgrade because of the problems we are seeing trying to install the DBI and DBD modules onto our upgraded tiger machines. ... Notice that the last line refs gcc 3.3; but the makefile refs CC to cc which is a symlink to gcc-4.0. ...
      (perl.dbi.users)
    • Re: glibc2.2 on redhat 8 has 2.3 reliance
      ... The run time linker's error message says it all: glibc 2.3 is apparently not ... Build and install glibc version 2.2.x on your Red Hat 8.0 box and then ... DO NOT USE RPMS TO "INSTALL OTHER VERSIONS" OF THE GLIBC LIBRARY ON A RED ... You might also need to build/install a different version of GCC (i.e., ...
      (alt.os.linux.redhat)
    • Re: gcc 3 versions wont compile hello.cpp
      ... I'd download the latest gcc 3.3.5 CSD1 and install it. ... The C-only 3.0.4 upgrade does work, ... it to compile and link, together with the errors it reports. ...
      (comp.os.os2.programmer.tools)
    • Installing gcc-2.95.3 and glibc-2.2.5 on Redhat 9
      ... I've got a fresh install of Redhat 9 and what I'd like to do is downgrade ... I downloaded gcc 2.95.3 and installed it into /usr/local/lib. ... So I decided to install glibc 2.2.5. ...
      (linux.redhat.install)
    • Re: GCC 2.96 and "-march=i686"
      ... >> official gcc release. ... >> Install a new native compiler and this problem should go away. ... the entire KDE depends upon glibc ...
      (comp.unix.programmer)