https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121484
Bug ID: 121484
Summary: GCC 15.2.0 fails to build with previously installed
GCC 15.1.0
Product: gcc
Version: 15.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: J.Zaitseff at zap dot org.au
Target Milestone: ---
Created attachment 62088
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62088&action=edit
Full output log
When I try to compile the newly released GCC 15.2.0 using a previously
installed GCC 15.1.0, under Kubuntu 25.04 (*not* using the system GCC), the
build fails during `make` while compiling ./isl:
g++ -std=c++14 -DHAVE_CONFIG_H -I. -I../../gcc-15.2.0/isl
-I../../gcc-15.2.0/isl/include -Iinclude/
-I/data/john/src/gcc/build-gcc-15.2.0/gmp/../../gcc-15.2.0/gmp
-I/data/john/src/gcc/build-gcc-15.2.0/./gmp -UCOMPILE_ERROR -g -MT
isl_test_cpp-isl_test_cpp.o -MD -MP -MF .deps/isl_test_cpp-isl_test_cpp.Tpo -c
-o isl_test_cpp-isl_test_cpp.o `test -f 'isl_test_cpp.cc' || echo
'../../gcc-15.2.0/isl/'`isl_test_cpp.cc
In file included from
/opt/gcc-15.1.0/include/c++/15.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
from
/opt/gcc-15.1.0/include/c++/15.1.0/x86_64-pc-linux-gnu/bits/gthr.h:157,
from /opt/gcc-15.1.0/include/c++/15.1.0/ext/atomicity.h:37,
from
/opt/gcc-15.1.0/include/c++/15.1.0/bits/shared_ptr_base.h:61,
from /opt/gcc-15.1.0/include/c++/15.1.0/bits/shared_ptr.h:53,
from /opt/gcc-15.1.0/include/c++/15.1.0/memory:82,
from ../../gcc-15.2.0/isl/include/isl/cpp.h:15,
from ../../gcc-15.2.0/isl/include/isl/typed_cpp.h:13,
from ../../gcc-15.2.0/isl/isl_test_cpp.cc:16:
/opt/gcc-15.1.0/include/c++/15.1.0/ext/concurrence.h:257:32: error: cannot
convert ‘<brace-enclosed initializer list>’ to ‘unsigned int’ in initialization
257 | __gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
| ^~~~~~~~~~~~~~~~~~~
make[5]: *** [Makefile:1890: isl_test_cpp-isl_test_cpp.o] Error 1
make[5]: Leaving directory '/data/john/src/gcc/build-gcc-15.2.0/isl'
make[4]: *** [Makefile:1997: all-recursive] Error 1
make[4]: Leaving directory '/data/john/src/gcc/build-gcc-15.2.0/isl'
make[3]: *** [Makefile:1506: all] Error 2
make[3]: Leaving directory '/data/john/src/gcc/build-gcc-15.2.0/isl'
make[2]: *** [Makefile:9333: all-stage1-isl] Error 2
make[2]: Leaving directory '/data/john/src/gcc/build-gcc-15.2.0'
make[1]: *** [Makefile:35734: stage1-bubble] Error 2
make[1]: Leaving directory '/data/john/src/gcc/build-gcc-15.2.0'
make: *** [Makefile:1114: all] Error 2
To reproduce:
$ wget -N https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz
$ module load gcc/15.1.0 # Or equivalent on your system to use GCC 15.1.0
$ rm -fr gcc-15.2.0 build-gcc-15.2.0
$ tar xf gcc-15.2.0.tar.xz
$ mkdir build-gcc-15.2.0
$ cd gcc-15.2.0
$ ./contrib/download_prerequisites
$ cd ../build-gcc-15.2.0
$ ../gcc-15.2.0/configure --prefix=/opt/gcc-15.2.0 --disable-multilib \
--enable-languages=c,c++,d,fortran,go,lto,m2,objc,obj-c++
$ make
Build fails at this step. Using `make -j$(nproc)` also fails. Full log
attached. Additional information:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/gcc-15.1.0/libexec/gcc/x86_64-pc-linux-gnu/15.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-15.1.0/configure --prefix=/opt/gcc-15.1.0
--disable-multilib --enable-languages=c,c++,d,fortran,go,lto,m2,objc,obj-c++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.1.0 (GCC)
$ uname -a
Linux arcturus 6.14.0-27-generic #27-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22
17:01:58 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Please let me know if you require any additional information or if you would
like me to try anything. And thank you for your work with GCC -- much
appreciated!