GCC 4.3.0 configure failure: libgcc

James Molloy jamesmol@transitive.com
Tue May 6 14:27:00 GMT 2008


Hi,

I'm attempting to build GCC 4.3.0 - and I thought I had succeeded until 
I realised that the 'all-gcc' make target (now?) doesn't build libgcc.a.

So I'm now trying to make the 'all' target, and I'm getting a configure 
error in the libgcc directory. An extract of the config.log follows:

    configure:4082: g++ -c -g -O2  conftest.cc >&5
    conftest.cc: In function 'int main()':
    conftest.cc:13: error: 'exit' was not declared in this scope
    configure:4088: $? = 1
    configure: failed program was:
    | /* confdefs.h.  */
    |
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | /* end confdefs.h.  */
    |
    | int
    | main ()
    | {
    | exit (42);
    |   ;
    |   return 0;
    | }

As you can see, the test program autoconf is generating does not include 
<cstdlib>, so g++ is perfectly correct in erroring.

I'm not certain how to fix this - is it just a case of hacking the 
config.in file? I'd appreciate any help.

Compiling GCC 4.3.0 from source using G++ 4.1.2, autoconf 2.61, and 
automake 1.10.

Thanks,

James



More information about the Gcc-help mailing list