https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120496

            Bug ID: 120496
           Summary: adaint.h:324:8: error: unknown type name 'cpu_set_t'
           Product: gcc
           Version: 15.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dclarke at blastwave dot org
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

This is fairly consistent and repeatable.

With Alpine Linux and MUSL LibC on a Raspberry Pi5 we may configure just
fine thus : 

admsys@hermes$ uname -a 
Linux hermes.bw.genunix.com 6.12.13-0-rpi #1-Alpine SMP PREEMPT Thu Feb 13
22:15:47 UTC 2025 aarch64 Linux
admsys@hermes$ which ldd
/usr/bin/ldd
admsys@hermes$ ldd --version
musl libc (aarch64)
Version 1.2.5
Dynamic Program Loader
Usage: /lib/ld-musl-aarch64.so.1 [options] [--] pathname
admsys@hermes$ 
admsys@hermes$ which gcc
/usr/bin/gcc
admsys@hermes$ gcc --version 
gcc (Alpine 14.2.0) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

admsys@hermes$ 

hermes$ ../gcc-15.1.0/configure --prefix=/opt/bw/imed/gcc15 \
> --mandir=/opt/bw/imed/gcc15/share/man \
> --infodir=/opt/bw/imed/gcc15/share/info \
> --build=aarch64-alpine-linux-musl \
> --host=aarch64-alpine-linux-musl \
> --target=aarch64-alpine-linux-musl \
> --with-gnu-as --with-as=/opt/bw/imed/bin/as \
> --with-gnu-ld --with-ld=/opt/bw/imed/bin/ld \
> --disable-cet --disable-fixed-point --disable-libstdcxx-pch \
> --disable-multilib --disable-nls --disable-werror \
> --disable-symvers --enable-__cxa_atexit --enable-default-pie \
> --enable-default-ssp \
> --enable-languages=ada,c,c++,fortran,go,lto,objc,obj-c++ \
> --enable-stage1-languages=c,c++ \
> --enable-link-serialization=2 --enable-linker-build-id \
> --with-arch=armv8-a --with-tune=cortex-a76 \
> --with-abi=lp64 --disable-libquadmath --disable-libssp \
> --disable-libsanitizer --enable-shared \
> --enable-threads=posix --enable-tls --with-system-zlib \
> --with-linker-hash-style=gnu \
> --with-build-time-tools=/opt/bw/imed/bin \
> --enable-bootstrap \
> --with-default-libstdcxx-abi=new \
> --enable-compressed-debug-sections=none \
> --enable-libada --enable-lto \
> --disable-isl-version-check \
> --enable-host-pie --enable-gnu-unique-object \
> --enable-default-pie \
> --enable-stage1-checking=misc \
> --enable-checking=misc \
> --with-pkgversion='GENUNIX Fri May 30 20:08:20 UTC 2025'
checking build system type... aarch64-alpine-linux-musl
checking host system type... aarch64-alpine-linux-musl
checking target system type... aarch64-alpine-linux-musl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libvtv support... yes
checking for libphobos support... yes
checking for libgcobol support... yes
checking for aarch64-alpine-linux-musl-gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... none needed
checking for /usr/bin/gcc option to accept ISO C99... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for aarch64-alpine-linux-musl-gnatbind... no
checking for gnatbind... gnatbind
checking for aarch64-alpine-linux-musl-gnatmake... no
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada and is recent enough... yes
checking for aarch64-alpine-linux-musl-gdc... no
checking for gdc... no
checking whether the D compiler works... no
checking for cargo... no
checking how to compare bootstrapped objects... cmp $$f1 $$f2 16 16
checking for objdir... .libs
configure: WARNING: using in-tree isl, disabling version check
checking whether to enable libgdiagnostics... no
checking for library containing dlopen... none required
checking for library containing pthread_create... none required
The following languages will be built: c,ada,c++,fortran,go,lto,objc,obj-c++
*** This configuration is not supported in the following subdirectories:
     zlib target-libquadmath libgrust target-libgcobol target-libphobos
target-zlib target-libgm2 target-libgrust target-libsanitizer target-libssp
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG... bootstrap-debug
checking for --enable-vtable-verify... no
checking for bison... bison -y
checking for bison... bison
checking for gm4... /usr/bin/m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... runtest
checking for ar... (cached) /opt/bw/imed/bin/ar
checking for aarch64-alpine-linux-musl-ar... (cached) /opt/bw/imed/bin/ar
checking for as... (cached) /opt/bw/imed/bin/as
checking for aarch64-alpine-linux-musl-as... (cached) /opt/bw/imed/bin/as
checking for aarch64-alpine-linux-musl-dlltool... no
checking for dlltool... no
checking for aarch64-alpine-linux-musl-dsymutil... no
checking for dsymutil... no
checking for ld... (cached) /opt/bw/imed/bin/ld
checking for aarch64-alpine-linux-musl-ld... (cached) /opt/bw/imed/bin/ld
checking for aarch64-alpine-linux-musl-lipo... no
checking for lipo... no
checking for nm... (cached) /opt/bw/imed/bin/nm -p
checking for aarch64-alpine-linux-musl-nm... (cached) /opt/bw/imed/bin/nm -p
checking for ranlib... (cached) /opt/bw/imed/bin/ranlib
checking for aarch64-alpine-linux-musl-ranlib... (cached)
/opt/bw/imed/bin/ranlib
checking for strip... (cached) /opt/bw/imed/bin/strip
checking for aarch64-alpine-linux-musl-strip... (cached) /opt/bw/imed/bin/strip
checking for aarch64-alpine-linux-musl-windres... no
checking for windres... no
checking for aarch64-alpine-linux-musl-windmc... no
checking for windmc... no
checking for objcopy... (cached) /opt/bw/imed/bin/objcopy
checking for aarch64-alpine-linux-musl-objcopy... (cached)
/opt/bw/imed/bin/objcopy
checking for objdump... (cached) /opt/bw/imed/bin/objdump
checking for aarch64-alpine-linux-musl-objdump... (cached)
/opt/bw/imed/bin/objdump
checking for aarch64-alpine-linux-musl-otool... no
checking for otool... no
checking for readelf... (cached) /opt/bw/imed/bin/readelf
checking for aarch64-alpine-linux-musl-readelf... (cached)
/opt/bw/imed/bin/readelf
checking for -plugin option... checking for aarch64-alpine-linux-musl-ar...
(cached) /opt/bw/imed/bin/ar
--plugin /usr/libexec/gcc/aarch64-alpine-linux-musl/14.2.0/liblto_plugin.so
checking for cc in /opt/bw/imed/bin... no
checking for gcc in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-cc... aarch64-alpine-linux-musl-cc
checking for c++ in /opt/bw/imed/bin... no
checking for g++ in /opt/bw/imed/bin... no
checking for cxx in /opt/bw/imed/bin... no
checking for gxx in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-c++... aarch64-alpine-linux-musl-c++
checking for gcc in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-gcc... aarch64-alpine-linux-musl-gcc
checking for gfortran in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-gfortran... no
checking for gfortran... no
checking for gccgo in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-gccgo... no
checking for gccgo... no
checking for gdc in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-gdc... no
checking for gdc... no
checking for gm2 in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-gm2... no
checking for gm2... no
checking for ar in /opt/bw/imed/bin... /opt/bw/imed/bin/ar
checking for as in /opt/bw/imed/bin... /opt/bw/imed/bin/as
checking for dlltool in /opt/bw/imed/bin... no
checking for dlltool... no
checking for dlltool in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-dlltool... no
checking for dlltool... no
checking for dsymutil in /opt/bw/imed/bin... no
checking for dsymutil... no
checking for dsymutil in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-dsymutil... no
checking for dsymutil... no
checking for ld in /opt/bw/imed/bin... /opt/bw/imed/bin/ld
checking for lipo in /opt/bw/imed/bin... no
checking for lipo... no
checking for lipo in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-lipo... no
checking for lipo... no
checking for nm in /opt/bw/imed/bin... /opt/bw/imed/bin/nm
checking for objcopy in /opt/bw/imed/bin... /opt/bw/imed/bin/objcopy
checking for objdump in /opt/bw/imed/bin... /opt/bw/imed/bin/objdump
checking for otool in /opt/bw/imed/bin... no
checking for otool... no
checking for otool in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-otool... no
checking for otool... no
checking for ranlib in /opt/bw/imed/bin... /opt/bw/imed/bin/ranlib
checking for readelf in /opt/bw/imed/bin... /opt/bw/imed/bin/readelf
checking for strip in /opt/bw/imed/bin... /opt/bw/imed/bin/strip
checking for windres in /opt/bw/imed/bin... no
checking for windres... no
checking for windres in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-windres... no
checking for windres... no
checking for windmc in /opt/bw/imed/bin... no
checking for windmc... no
checking for windmc in /opt/bw/imed/bin... no
checking for aarch64-alpine-linux-musl-windmc... no
checking for windmc... no
checking where to find the target ar... pre-installed in /opt/bw/imed/bin
checking where to find the target as... pre-installed in /opt/bw/imed/bin
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target dsymutil... host tool
checking where to find the target gcc... just compiled
checking where to find the target gfortran... just compiled
checking where to find the target gccgo... just compiled
checking where to find the target gdc... host tool
checking where to find the target gm2... host tool
checking where to find the target ld... pre-installed in /opt/bw/imed/bin
checking where to find the target lipo... host tool
checking where to find the target nm... pre-installed in /opt/bw/imed/bin
checking where to find the target objcopy... pre-installed in /opt/bw/imed/bin
checking where to find the target objdump... pre-installed in /opt/bw/imed/bin
checking where to find the target otool... host tool
checking where to find the target ranlib... pre-installed in /opt/bw/imed/bin
checking where to find the target readelf... pre-installed in /opt/bw/imed/bin
checking where to find the target strip... pre-installed in /opt/bw/imed/bin
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
configure: creating ./config.status
config.status: creating Makefile

>From here on it matters not if we perform a three stage bootstrap or even
a four stage bootstrap. The process fails after stage2 thus :

make[7]: Entering directory
'/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/gcc/ada/rts'
Reading specs from
/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/./gcc/specs
COLLECT_GCC=/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/./gcc/xgcc
COLLECT_LTO_WRAPPER=/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/./gcc/lto-wrapper
Target: aarch64-alpine-linux-musl
Configured with: ../gcc-15.1.0/configure --prefix=/opt/bw/imed/gcc15
--mandir=/opt/bw/imed/gcc15/share/man --infodir=/opt/bw/imed/gcc15/share/info
--build=aarch64-alpine-linux-musl --host=aarch64-alpine-linux-musl
--target=aarch64-alpine-linux-musl --with-gnu-as --with-as=/opt/bw/imed/bin/as
--with-gnu-ld --with-ld=/opt/bw/imed/bin/ld --disable-cet --disable-fixed-point
--disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror
--disable-symvers --enable-__cxa_atexit --enable-default-pie
--enable-default-ssp --enable-languages=ada,c,c++,fortran,go,lto,objc,obj-c++
--enable-link-serialization=2 --enable-linker-build-id --with-arch=armv8.2-a
--with-tune=cortex-a76 --with-abi=lp64 --disable-libquadmath --disable-libssp
--disable-libsanitizer --enable-shared --enable-threads=posix --enable-tls
--with-system-zlib --with-linker-hash-style=gnu
--with-build-time-tools=/opt/bw/imed/bin --enable-bootstrap
--with-default-libstdcxx-abi=new --enable-compressed-debug-sections=none
--enable-libada --disable-isl-version-check --enable-lto --enable-host-pie
--enable-gnu-unique-object --enable-default-pie --enable-stage1-checking=misc
--enable-stage1-languages=c,c++ --enable-checking=misc
--with-pkgversion='GENUNIX Fri May 30 00:17:20 UTC 2025'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.1.0 (GENUNIX Fri May 30 00:17:20 UTC 2025) 
/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/./gcc/xgcc
-B/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/./gcc/
-B/opt/bw/imed/gcc15/aarch64-alpine-linux-musl/bin/
-B/opt/bw/imed/gcc15/aarch64-alpine-linux-musl/lib/ -isystem
/opt/bw/imed/gcc15/aarch64-alpine-linux-musl/include -isystem
/opt/bw/imed/gcc15/aarch64-alpine-linux-musl/sys-include    -c -DIN_GCC  -W
-Wall -g -O2 -g -O2 -fexceptions -DIN_RTS -DHAVE_GETIPINFO   -fPIC -fno-lto  
-iquote . -iquote .. -iquote ../.. -iquote /opt/bw/build/gcc-15.1.0/gcc/ada
-iquote /opt/bw/build/gcc-15.1.0/gcc -I/opt/bw/build/gcc-15.1.0/include 
-I./../.. adadecode.c -o adadecode.o
In file included from adadecode.c:37:
adaint.h:324:8: error: unknown type name 'cpu_set_t'
  324 | extern cpu_set_t *__gnat_cpu_alloc                 (size_t);
      |        ^~~~~~~~~
adaint.h:326:49: error: unknown type name 'cpu_set_t'
  326 | extern void   __gnat_cpu_free                  (cpu_set_t *);
      |                                                 ^~~~~~~~~
adaint.h:327:61: error: unknown type name 'cpu_set_t'
  327 | extern void   __gnat_cpu_zero                      (size_t, cpu_set_t
*);
      |                                                             ^~~~~~~~~
adaint.h:328:66: error: unknown type name 'cpu_set_t'
  328 | extern void   __gnat_cpu_set                       (int, size_t,
cpu_set_t *);
      |                                                                 
^~~~~~~~~
make[7]: *** [../gcc-interface/Makefile:291: adadecode.o] Error 1
make[7]: Leaving directory
'/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/gcc/ada/rts'
make[6]: *** [gcc-interface/Makefile:648: gnatlib] Error 2
make[6]: Leaving directory
'/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/gcc/ada'
make[5]: *** [gcc-interface/Makefile:682: gnatlib-shared-default] Error 2
make[5]: Leaving directory
'/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/gcc/ada'
make[4]: *** [gcc-interface/Makefile:718: gnatlib-shared-dual] Error 2
make[4]: Leaving directory
'/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/gcc/ada'
make[3]: *** [gcc-interface/Makefile:836: gnatlib-shared] Error 2
make[3]: Leaving directory
'/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/gcc/ada'
make[2]: *** [Makefile:107: gnatlib-shared] Error 2
make[2]: Leaving directory
'/opt/bw/build/gcc-15.1.0_alpine_linux_musl_aarch64.001/aarch64-alpine-linux-musl/libada'
make[1]: *** [Makefile:26852: all-target-libada] Error 2
make[1]: *** Waiting for unfinished jobs....

However this only happens after stage2. 

I will remove ada from the --enable-languages option and see what happens
however
thus far every attempt to bootstrap with ada/gnat has failed in the exact same
way
and only in the final stage of the bootstrap.


-- 
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken

Reply via email to