Bug 123490 - [16 regression] Build of Ada library broken
Summary: [16 regression] Build of Ada library broken
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 16.0
: P1 normal
Target Milestone: 16.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
: 123497 (view as bug list)
Depends on:
Blocks:
 
Reported: 2026-01-09 01:02 UTC by Sam James
Modified: 2026-01-10 15:05 UTC (History)
9 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2026-01-09 00:00:00


Attachments
build.log.xz (358.70 KB, application/x-xz)
2026-01-09 01:02 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James 2026-01-09 01:02:03 UTC
Created attachment 63289 [details]
build.log.xz

I've seen this on two machines today but of course it sometimes builds fine on those. Guess it started with r16-6442-g7a9b0d73fe6095.

```
make[2]: Entering directory '/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools'
rm -rf ../gcc/ada/tools
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools'
make[2]: Entering directory '/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools'
mkdir -p ../gcc/ada/tools
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools'
make[2]: Entering directory '/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools'
Cannot build gnattools while gnatlib is out of date or unbuilt
make[2]: *** [Makefile:162: ../gcc/stamp-gnatlib-rts] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools'
make[2]: *** Waiting for unfinished jobs....
```


I've attached the full log, I've not looked at the Makefiles.

```
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/build/gnattools # ../gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=../gcc/xgcc
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/16 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include/g++-v16 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/16/python --enable-libphobos --enable-objc-gc --enable-languages=c,c++,d,objc,obj-c++,fortran,ada,rust --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=yes,extra,rtl,df --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 16.0.9999 p, commit 105e7a429a1b55bdbf23b82f444a1079ea9b8070' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-tls=gnu2 --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-offload-defaulted --enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp --enable-libada --enable-cet --disable-systemtap --enable-valgrind-annotations --enable-valgrind-interop --disable-vtable-verify --disable-libvtv --with-zstd --without-isl --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-gxx-libcxx-include-dir=/usr/include/c++/v1 --enable-linker-build-id --enable-linker-build-id --enable-linker-build-id --enable-linker-build-id --with-build-config='bootstrap-lto bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.0 20260108 (experimental) 25c8599ad467f73953a6c4b838b1122c4803b1a1 (Gentoo 16.0.9999 p, commit 105e7a429a1b55bdbf23b82f444a1079ea9b8070)
```
Comment 1 Sam James 2026-01-09 06:46:09 UTC
Nevermind, it's the 32 commit: https://inbox.sourceware.org/gcc-patches/yddms2ncnc6.fsf@CeBiTec.Uni-Bielefeld.DE/
Comment 2 Andrew Pinski 2026-01-09 06:46:30 UTC
*** Bug 123497 has been marked as a duplicate of this bug. ***
Comment 3 Jakub Jelinek 2026-01-09 06:58:01 UTC
I've reverted r16-6584 in my build and it still failed the same way.
So I suspect r16-6582 instead.
./xgcc -B ./ -print-multi-directory
.
before and after, I suspect the
@@ -597,7 +614,8 @@ else
 fi
 
 if [ -z "${with_multisubdir}" ]; then
-  ml_subdir=
+  ml_top_subdir=`${CC-gcc} --print-multi-directory 2>/dev/null`
+  ml_subdir=/$ml_top_subdir
   ml_builddotdot=
   : # ml_srcdotdot= # already set
 else
hunk in config-ml.in.  If that hunk is really needed, then I think it needs to special case ml_top_subdir being . and unset ml_subdir in that case, rather than setting it to /.
which is what appears in these gcc/ada/rts_. (where there was
RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
).
Comment 4 Eric Botcazou 2026-01-09 08:32:20 UTC
How can such a change be accepted at this stage in the first place?
Comment 5 GCC Commits 2026-01-10 10:37:06 UTC
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:5079424ade2deddfa8d39a48a892f60679e4e32d

commit r16-6678-g5079424ade2deddfa8d39a48a892f60679e4e32d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sat Jan 10 11:36:25 2026 +0100

    toplevel: Unbreak Ada build [PR123490]
    
    As written earlier, the config-ml.in change from the
    --with-multi-buildlist patch broke build of Ada, Ada uses
    RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
    and expects that the primary multilib will result in rts
    rather than rts_. it results in after the --with-multi-buildlist
    changes.
    
    The following patch fixes it by restoring previous behavior for
    ml_subdir / MULTISUBDIR such that for primary multilib it is
    still empty rather than /.
    
    2026-01-10  Jakub Jelinek  <jakub@redhat.com>
    
            PR ada/123490
            * config-ml.in: Restore ml_subdir being empty instead of /.
            for the primary multilib.
Comment 6 Eric Botcazou 2026-01-10 15:05:00 UTC
Thanks for the stopgap fix.