https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121307
Bug ID: 121307
Summary: Parallel build issue with bootstrap-ubsan
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: sjames at gcc dot gnu.org
Target Milestone: ---
Created attachment 62000
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62000&action=edit
build.log.xz
```
[...]
Configuring in ./gnattools
configure: loading cache ./config.cache
checking for a BSD-compatible install...
/usr/lib/portage/python3.13/ebuild-helpers/xattr/install -c
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for x86_64-pc-linux-gnu-gcc...
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/./gcc/xgcc
-B/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/./gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
-fchecking=1
checking whether the C compiler works... no
configure: error: in
`/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [Makefile:13962: configure-gnattools] Error 1
make[1]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build'
[...]
config.status: executing gstdint.h commands
make[1]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build'
make: *** [Makefile:30927: bootstrap-lean] Error 2
* ERROR: sys-devel/gcc-16.0.9999::gentoo failed (compile phase):
* emake failed
```
I don't have the config.log anymore, sorry, but it was straightforward with
```
$ /var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/./gcc/xgcc
-B/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/./gcc/
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem
/usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include
-fchecking=1 -g -g1 -O2 -D_GENTOO_TIME64_FORCE=0 -static-libstdc++
-static-libgcc -fsanitize=undefined -static-libubsan -DUBSAN_BOOTSTRAP
-B/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/prev-x86_64-pc-linux-gnu/libsanitizer/
-B/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/prev-x86_64-pc-linux-gnu/libsanitizer/ubsan/
-B/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/prev-x86_64-pc-linux-gnu/libsanitizer/ubsan/.libs
-Wl,-O1 conftest.c
```
failing b/c it couldn't find libsanitizer.spec. It existed in previous bulid
dirs but not in build/gcc.
It looks to me like with bootstrap-ubsan, if you don't have the same compiler
version already installed w/ libsanitizer, then in some cases,
libsanitizer.spec and libubsan.a might not be found because there isn't
anything forcing a dependency on libcc1, gnattools etc on libsanitizer?
Copying libsanitizer.spec and libubsan.a into
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gcc fixed it.