Bug when compiling with gcc 15
William Youmans
youmans.wj at gmail.com
Wed Aug 20 19:01:44 CEST 2025
Hi Dima,
Thanks for the reply. This issue is unrelated to sage. I do have sagemath
installed using the Arch package manager which works fine, and like I
mentioned the latest gmp Arch package also works fine, which seems to be
due to the patch I linked fixing the bug with gcc 15.
The bug I am reporting is: building gmp with gcc 15 gives the previously
mentioned error. Using gcc 14 it builds fine.
Best,
Will
On Mon, Aug 18, 2025 at 1:02 PM Dima Pasechnik <dima at pasechnik.info> wrote:
> Hi,
> Thanks for the message.
> You really don't need to build any sage's spkg's from source on Arch.
> (in particular such packages like gmp, which are basically dead wood in
> the sagemath tree)
>
> Actually, Arch provides an up to date sagemath package to install, so,
> unless you want to hack on Sage source, you most probably just can use.
>
>
> You can install all the Arch packages you need by looking at the bottom
> part of the output of the main ./configure.
> Or you can get the list by
> running in terminal the following 3 commands.
>
> cat build/pkgs/[a-z]/distros/arch.txt
> cat build/pkgs/_pre*/distros/arch.txt
> cat build/pkgs/_boo*/distros/arch.txt
>
> HTH
> Dima
>
>
> On Tue, Jul 29, 2025 at 12:10:41AM -0400, William Youmans wrote:
> > 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
>
>
> > _______________________________________________
> > gmp-bugs mailing list
> > gmp-bugs at gmplib.org
> > https://gmplib.org/mailman/listinfo/gmp-bugs
>
>
More information about the gmp-bugs
mailing list