gcc 4.1.2 installation problem


Results 1 to 5 of 5

Thread: gcc 4.1.2 installation problem

  1. #1
    Join Date
    Dec 2005
    Posts
    14

    gcc 4.1.2 installation problem

    I've recently installed GCC 4.1.2, to test it on some software.

    When I attempt to build the software, I get errors from another library that I also built:

    Code:
    xml4c/xerces-c-src_2_7_0/lib/libxerces-c.so: undefined reference to `operator new[](unsigned int)@GLIBCXX_3.4'
    xml4c/xerces-c-src_2_7_0/lib/libxerces-c.so: undefined reference to `__cxa_allocate_exception@CXXABI_1.3'
    and so forth. I've checked the libstdc++.so.6 that was installed, and grepped through to find the GLIBCXX tags, to no avail:
    Code:
    strings libstdc++.so.6.0.8 | grep GLIBCXX
    GLIBCXX_FORCE_NEW
    When I look at the libstdc++.so.6.0.8 from gcc 4.1.1, all the approriate GLIBCXX tags are there. It's a similar situation with the CXXABI tags.

    I assume there's something I must be doing on the installation that's wrong. GCC is configured as follows:
    Code:
    ../gcc-4.1.2/configure --prefix=/usr/local/gcc/4.1.2 --enable-shared --enable-__cxa_atexit --enable-threads=posix
    Any pointers or ideas on what I might be screwing up here?

  2. #2
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Recompile the "other library" with this same 4.1.2 compiler?

  3. #3
    Join Date
    Dec 2005
    Posts
    14
    That library was also recompiled with the 4.1.2 compiler. That's the confusing part to me; everything has been recompiled, but it's still not working.

    Additionally, when I take the libstdc++.so.6.0.8 from a gcc 4.1.1 installation and use it with the 4.1.2 compiler, everything is happy. Both compilers were configured exactly the same as well. Unfortunately, this hack isn't acceptable for my situation, or I would run with it.

  4. #4
    Join Date
    Dec 2005
    Posts
    14
    Just for future reference, I've found the problem.

    GCC 4.1.2 (and 4.2, and probably before) has a problem in the configure scripts when it's checking for binutils, in which it doesn't parse the version number properly.

    When using binutils 2.16.1 (which is what I build gcc 4.1.1 with), it works fine, and thats why that library built. However, I've upgraded to binutils 2.18. This version does not get parsed correctly; the configure script thinks it's a very old version of ld that doesn't support symbolic versioning (the GLIBCXX and CXXABI symbols).

    I edited the configure file to just assume it was new enough, but this isn't the most elegant solution. It did, however, clear up my problem.

  5. #5
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Ah, so it's one of those wonderful toolchain problems -- the kind of issue that makes me glad I don't do much with testing new toolchain versions in LFS.

    I suspect that gcc-4.2.2 works with binutils-2.18, since that's the gcc that the current LFS development book is using, and AFAIK nobody has complained about not having versioned symbols. But I don't know if anyone has looked for sure, either. Might be worth a try, anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •