Bug when compiling with gcc 15

William Youmans youmans.wj at gmail.com
Tue Jul 29 06:10:55 CEST 2025


Hi,

This may overlap with known build issues but I'm not sure. Configuring GMP
with gcc 15 on a fresh Arch install fails (with essential development tools
from `base-devel` installed).

$ ./configure
checking build system type... raptorlake-pc-linux-gnu
checking host system type... raptorlake-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=64
checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 ... no, long
long reliability test 1
checking whether cc is gcc... yes
checking compiler cc -O2 -pedantic -fomit-frame-pointer -m64 ... no, long
long reliability test 1
checking ABI=x32
checking compiler gcc -O2 -pedantic -fomit-frame-pointer -mx32 ... no
checking whether cc is gcc... yes
checking compiler cc -O2 -pedantic -fomit-frame-pointer -mx32 ... no
checking ABI=32
checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler gcc -O2 -pedantic -fomit-frame-pointer ... no, long long
reliability test 1
checking compiler icc -no-gcc ... no
checking whether cc is gcc... yes
checking compiler cc -m32 -O2 -pedantic -fomit-frame-pointer ... no
checking compiler cc -O2 -pedantic -fomit-frame-pointer ... no, long long
reliability test 1
configure: error: could not find a working compiler, see config.log for
details


GMP can be installed without issue with the arch linux package manager, and
looking at the arch repository they seem to have a patch for gmp with gcc
15:
https://gitlab.archlinux.org/archlinux/packaging/packages/gmp/-/blob/main/gmp-gcc-15.patch?ref_type=heads


More info:


gmp version: gmp 6.3.0

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/15.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure
--enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol
--enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib
--mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=
https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues
--with-build-config=bootstrap-lto --with-linker-hash-style=gnu
--with-system-zlib --enable-__cxa_atexit --enable-cet=auto
--enable-checking=release --enable-clocale=gnu --enable-default-pie
--enable-default-ssp --enable-gnu-indirect-function
--enable-gnu-unique-object --enable-libstdcxx-backtrace
--enable-link-serialization=1 --enable-linker-build-id --enable-lto
--enable-multilib --enable-plugin --enable-shared --enable-threads=posix
--disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.1.1 20250425 (GCC)

$ uname -a
Linux archlinux 6.15.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Jul 2025
18:18:11 +0000 x86_64 GNU/Linux

$ ./config.guess
raptorlake-pc-linux-gnu

Compressed config.log is attached.

Best,
Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.zip
Type: application/zip
Size: 4481 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-bugs/attachments/20250729/40080902/attachment.zip>


More information about the gmp-bugs mailing list