https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123441
Bug ID: 123441
Summary: Unable to build since r16-4315-ge63cf4b130b86d with "C
compiler cannot create executables" in stage1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: remi.galanalfonso at gmail dot com
Target Milestone: ---
Since r16-4315-ge63cf4b130b86d, local build of master fails on my debian with
the following configure:
> ./configure --disable-multilib
> --prefix=/home/remi/Projects/gcc-dev-build-install --enable-languages=c,c++
> --enable-checking=yes,extra
with the error:
> checking for x86_64-pc-linux-gnu-gcc...
> /home/remi/Projects/gcc/host-x86_64-pc-linux-gnu/gcc/xgcc
> -B/home/remi/Projects/gcc/host-x86_64-pc-linux-gnu/gcc/
> -B/home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/bin/
> -B/home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/lib/ -isystem
> /home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/include
> -isystem
> /home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/sys-include
> -fno-checking
> checking whether the C compiler works... no
> configure: error: in `/home/remi/Projects/gcc/x86_64-pc-linux-gnu/libgomp':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
and in x86_64-pc-linux-gnu/libgomp/config.log:
> configure:3883: checking whether the C compiler works
> configure:3905: /home/remi/Projects/gcc/host-x86_64-pc-linux-gnu/gcc/xgcc
> -B/home/remi/Projects/gcc/host-x86_64-pc-linux-gnu/gcc/
> -B/home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/bin/
> -B/home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/lib/ -isystem
> /home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/include
> -isystem
> /home/remi/Projects/gcc-dev-build-install/x86_64-pc-linux-gnu/sys-include
> -fno-checking -g -O2 conftest.c >&5
> /usr/bin/x86_64-linux-gnu-ld: cannot find -latomic: No such file or directory
> collect2: error: ld returned 1 exit status
> configure:3909: $? = 1
> configure:3947: result: no
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "GNU Offloading and Multi Processing Runtime Library"
> | #define PACKAGE_TARNAME "libgomp"
> | #define PACKAGE_VERSION "1.0"
> | #define PACKAGE_STRING "GNU Offloading and Multi Processing Runtime Library
> 1.0"
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL "http://www.gnu.org/software/libgomp/"
> | #define PACKAGE "libgomp"
> | #define VERSION "1.0"
> | /* end confdefs.h. */
> |
> | int
> | main ()
> | {
> |
> | ;
> | return 0;
> | }
> configure:3952: error: in
> `/home/remi/Projects/gcc/x86_64-pc-linux-gnu/libgomp':
> configure:3954: error: C compiler cannot create executables
Since I was able to build in the past I was able to bisect to
r16-4315-ge63cf4b130b86d, and indeed with it reverted on top of master (and
conflicts fixed in some way) it builds again.
I'm not knowledgeable to know whether it's an issue with the script or a bug in
the tools of my debian (though I have the same issue on both my unstable and my
bookworm), but since I could bisect it seems more like a script issue.
It might also be a side effect of bug 123396 that I saw reported recently?
gcc version:
> $ g++ -v
> Using built-in specs.
> COLLECT_GCC=g++
> COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/15/lto-wrapper
> OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
> OFFLOAD_TARGET_DEFAULT=1
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v --with-pkgversion='Debian 15.2.0-12'
> --with-bugurl=file:///usr/share/doc/gcc-15/README.Bugs
> --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust,cobol,algol68
> --prefix=/usr --with-gcc-major-version-only --program-suffix=-15
> --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
> --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix
> --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-libstdcxx-time=yes
> --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace
> --enable-gnu-unique-object --disable-vtable-verify --enable-plugin
> --enable-default-pie --with-system-zlib --enable-libphobos-checking=release
> --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
> --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64
> --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
> --enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-15-15.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-15-15.2.0/debian/tmp-gcn/usr
> --enable-offload-defaulted --without-cuda-driver --enable-checking=release
> --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
> --with-build-config=bootstrap-lto-lean --enable-link-serialization=3
> Thread model: posix
> Supported LTO compression algorithms: zlib zstd
> gcc version 15.2.0 (Debian 15.2.0-12)