Problem building older versions of gcc

Jonathan Wakely jwakely.gcc@gmail.com
Fri Jun 4 14:20:16 GMT 2021


On Fri, 4 Jun 2021 at 14:32, Kazuyoshi Furutaka via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> Dear experts...
>
> I'm having troubles building GCC 10.3.0 (and a few
> older versions) with the newer one.
>
> The system is Fedora release 34 (Thirty Four), x86_64.
> The installed gcc version is:
>   gcc (GCC) 11.1.1 20210428 (Red Hat 11.1.1-1)
>
> I downloaded gcc-10.3.0.tar.xz and expand it, and then
> did
>   `../gcc-10.3.0/configure --prefix=/usr/local/gcc/10.3.0`
> from another directory, and `make`.
>
> The make failed as the following (the same occured for
> 10.2.0, 10.1.0, and 9.4.0).
>
> ...
> make[7]: Entering directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3'
> make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CC_FOR_TARGET=/home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/xgcc -B/home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/" "CFLAGS=-g -O2  -m32" "CXXFLAGS=-g -O2 -D_GNU_SOURCE  -m32" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=-m32" "LIBCFLAGS=-g -O2  -m32" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 --split-size=5000000     " "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/usr/local/gcc/10.3.0" "infodir=/usr/local/gcc/10.3.0/share/info" "libdir=/usr/local/gcc/10.3.0/lib" "includedir=/usr/local/gcc/10.3.0/include" "prefix=/usr/local/gcc/10.3.0" "tooldir=/usr/local/gcc/10.3.0/x86_64-pc-linux-gnu" "gxx_include_dir=/usr/local/gcc/10.3.0/include/c++/10.3.0" "AR=ar" "AS=/home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/as" "LD=/home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/collect-ld" "RANLIB=ranlib" "NM=/home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/nm" "NM_FOR_BUILD=" "NM_FOR_TARGET=nm" "DESTDIR=" "WERROR=" all-recursive
> make[8]: Entering directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3'
> Making all in include
> make[9]: Entering directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include'
> mkdir -p ./x86_64-pc-linux-gnu/bits/stdc++.h.gch
> /home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/xgcc -shared-libgcc -B/home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc -nostdinc++ -L/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3/src -L/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs -L/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3/libsupc++/.libs -B/usr/local/gcc/10.3.0/x86_64-pc-linux-gnu/bin/ -B/usr/local/gcc/10.3.0/x86_64-pc-linux-gnu/lib/ -isystem /usr/local/gcc/10.3.0/x86_64-pc-linux-gnu/include -isystem /usr/local/gcc/10.3.0/x86_64-pc-linux-gnu/sys-include -fno-checking  -m32 -x c++-header -nostdinc++ -g -O2 -D_GNU_SOURCE  -m32  -I/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include/x86_64-pc-linux-gnu -I/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include -I/home/furutaka/work/gcc/gcc-10.3.0/libstdc++-v3/libsupc++  -O2 -g -std=gnu++0x /home/furutaka/work/gcc/gcc-10.3.0/libstdc++-v3/include/precompiled/stdc++.h \
> -o x86_64-pc-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch
> /home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/cc1plus: /home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/furutaka/work/gcc/gcc-10.3.0-bld/./gcc/cc1plus)
> make[9]: *** [Makefile:1824: x86_64-pc-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1
> make[9]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include'
> make[8]: *** [Makefile:563: all-recursive] Error 1
> make[8]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3'
> make[7]: *** [Makefile:488: all] Error 2
> make[7]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/32/libstdc++-v3'
> make[6]: *** [Makefile:856: multi-do] Error 1
> make[6]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/libstdc++-v3'
> make[5]: *** [Makefile:824: all-multi] Error 2
> make[5]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/libstdc++-v3'
> make[4]: *** [Makefile:563: all-recursive] Error 1
> make[4]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/libstdc++-v3'
> make[3]: *** [Makefile:488: all] Error 2
> make[3]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld/x86_64-pc-linux-gnu/libstdc++-v3'
> make[2]: *** [Makefile:19986: all-stage1-target-libstdc++-v3] Error 2
> make[2]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld'
> make[1]: *** [Makefile:28047: stage1-bubble] Error 2
> make[1]: Leaving directory '/home/furutaka/work/gcc/gcc-10.3.0-bld'
> make: *** [Makefile:1007: all] Error 2
>
>
> It seems to me that at some point of the build, for some
> reasons the already installed libstdc++ which contain
> GLIBCXX_3.4.29 was referenced or used in the currently
> building system...

Do you have LD_LIBRARY_PATH or LD_RUN_PATH set in your environment?


More information about the Gcc-help mailing list