Re: Building recent gcc (4.8.0) fails

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

 



(Resending as plain text email)


On Apr 9, 2013 10:31 AM, "jayjwa"  wrote:
>
>
> I have been facing a problem while trying to build recent versions of GCC. My goal was to build gcc-4.8.0 which was the last stable release when I started. I have gcc-4.6.3 currently. As building 4.8.0 failed (with the below errors), I worked backwards to find a version that would build. Versions 4.7.x fail with errors related to -std=xxx. 4.6.3 was the last version that built, originally starting with gcc-4.6.0. I even tried a newer 4.9.x with same results as the 4.8.x branch. As I don't use a linux distribution, there is no place to download a package from. Two different machines, both targets i686-pc-linux-gnu, get the same errors. Since my current gcc-4.6.3 has built kernels and recently glibc, I think it is working OK. How can I get gcc-4.8.0 (or latest stable) to build?
>
> Compiling 4.7.0:

Why 4.7.0 not 4.7.2?


> Configured with:
>
> ../gcc-4.7.0/configure --prefix=/usr --enable-shared --enable-static --enable-libada --enable-libssp --enable-lto --with-mpfr=/usr --with-gmp=/usr

If the gmp and mpfr libs are in /usr then you don't need to tell gcc
how to find them.


> --disable-werror --enable-__cxa_atexit --enable-threads --enable-threads=posix

Why are you wasting time adding this option *twice* when it's the
default anyway?


> libtool: compile:  g++ -I/usr/src/gcc-4.7.0/libstdc++-v3/../libgcc -I/usr/src/gcc-build-4.7.0/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/usr/src/gcc-build-4.7.0/i686-pc-linux-gnu/libstdc++-v3/include -I/usr/src/gcc-4.7.0/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=chrono.lo -std=gnu++11 -g -O2 -D_GNU_SOURCE -c ../../../../../gcc-4.7.0/libstdc++-v3/src/c++11/chrono.cc  -fPIC -DPIC -o chrono.o
> cc1plus: error: unrecognized command line option '-std=gnu++11'

This implies that your existing gcc 4.6 is being used to build the
target libraries, which means you're doing something very, very wrong.

Why is the newly built 4.7.0 compiler not being used to compile its
target libraries?

How did you run 'make'?

Do you have any strange environment settings?


> Adding -fpermissive flag to Makefile:

Don't edit the makefiles by hand, that's not going to help


> The 4.7.x errors seem to be a matter of 4.6.x not understanding latest standards used in 4.8.x, but the _M_mutex errors present in 4.8.x and 4.9.x builds have me puzzled. Can someone point out my error in building 4.8.0?

It's the same problem in every case, you're using your existing GCC
4.6 to build code that should be built with the new xg++ in the build
dir.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux