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

--- Comment #9 from terryinzaghi <terryinzaghi at 163 dot com> ---
(In reply to Andrew Pinski from comment #8)
> (In reply to terryinzaghi from comment #5)
> > Created attachment 61900 [details]
> > auto-host.h    WHEN do ./configure --disable-multilib
> 
> This looks correct has the defines as expected. 
> 
> Do you have the full command line for the c-decl.cc which is failing?


[enviroment AND reproduce steps]



this TIME i use default configure , and with only options : --disable-multilib 
   ./configure --disable-multilib 

I attach  atuo-host.h config.status config.log 


BEFORE INSTALL GCC-15.1.0:
   glibc version {
         root@dev:/home/cu-lib/GCC15# ldd --version
         ldd (Ubuntu GLIBC 2.39-0ubuntu8.5) 2.39
         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.
         Written by Roland McGrath and Ulrich Drepper.   
   }
   env {
       root@dev:/home/cu-lib/GCC15/gcc-15.1.0# env
       SHELL=/bin/bash
       SUDO_GID=1000
       SUDO_COMMAND=/bin/bash
       SUDO_USER=dev
       PWD=/home/cu-lib/GCC15/gcc-15.1.0
       LOGNAME=root
       HOME=/root
       LANG=en_US.UTF-8
       LS_COLORS= /*SKIP too long*/
       LESSCLOSE=/usr/bin/lesspipe %s %s
       TERM=xterm-color
       CPLUS_INCLUDE_PATH=/usr/lib/llvm-18/include/:/usr/lib/llvm-18/include/:
       LESSOPEN=| /usr/bin/lesspipe %s
       USER=root
       LIBRARY_PATH=/usr/lib/llvm-18/lib/:/usr/lib/llvm-18/lib/
       SHLVL=1
       LD_LIBRARY_PATH=/usr/lib/llvm-18/lib/::/usr/lib/llvm-18/lib/
      
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/root/.local/bin:/root/.local/bin
       SUDO_UID=1000
       C_INCLUDE_PATH=/usr/lib/llvm-18/include/:/usr/lib/llvm-18/include/:
       MAIL=/var/mail/root
       OLDPWD=/home/cu-lib/GCC15
       _=/usr/bin/env

       root@dev:/home/cu-lib/GCC15/gcc-15.1.0# uname -a
       Linux dev 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12
23:42:21 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
       root@dev:/home/cu-lib/GCC15/gcc-15.1.0#     

   }
   two versions of GCC installed:  13.3.0  AND 14.2.0 
   {
      root@dev:/home/cu-lib/GCC15# gcc -v
      Using built-in specs.
      COLLECT_GCC=gcc
      COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/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='Ubuntu
13.3.0-6ubuntu2~24.04' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-13
--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/gcc-13-fG75Ri/gcc-13-13.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-13-fG75Ri/gcc-13-13.3.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=2
      Thread model: posix
      Supported LTO compression algorithms: zlib zstd
      gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04) 
      root@dev:/home/cu-lib/GCC15# g++ -v
      Using built-in specs.
      COLLECT_GCC=g++
      COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/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='Ubuntu
13.3.0-6ubuntu2~24.04' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-13
--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/gcc-13-fG75Ri/gcc-13-13.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-13-fG75Ri/gcc-13-13.3.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=2
      Thread model: posix
      Supported LTO compression algorithms: zlib zstd
      gcc version 13.3.0 (Ubuntu 13.3.0-6ubuntu2~24.04)    
   }
   {
       root@dev:/home/cu-lib/GCC15# gcc-14 -v
       Using built-in specs.
       COLLECT_GCC=gcc-14
       COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/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='Ubuntu
14.2.0-4ubuntu2~24.04' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr
--with-gcc-major-version-only --program-suffix=-14
--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/gcc-14-ig5ci0/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-14-ig5ci0/gcc-14-14.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=2
       Thread model: posix
       Supported LTO compression algorithms: zlib zstd
       gcc version 14.2.0 (Ubuntu 14.2.0-4ubuntu2~24.04) 
       root@dev:/home/cu-lib/GCC15# 
       root@dev:/home/cu-lib/GCC15# g++-14 -v
       Using built-in specs.
       COLLECT_GCC=g++-14
       COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/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='Ubuntu
14.2.0-4ubuntu2~24.04' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr
--with-gcc-major-version-only --program-suffix=-14
--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/gcc-14-ig5ci0/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-14-ig5ci0/gcc-14-14.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=2
       Thread model: posix
       Supported LTO compression algorithms: zlib zstd
       gcc version 14.2.0 (Ubuntu 14.2.0-4ubuntu2~24.04) 
       root@dev:/home/cu-lib/GCC15# 
   }

STEP0:
   wget  https://ftp.gnu.org/gnu/gcc/gcc-15.1.0/gcc-15.1.0.tar.xz
   tar -xf gcc-15.1.0.tar.xz
   {
     root@dev:/home/cu-lib/GCC15# ls -l
     total 895984
     -rw-r--r-- 1 root root 917544960 Apr 25 17:09 gcc-15.1.0.tar
     root@dev:/home/cu-lib/GCC15# 
   }
STEP1:
   tar -xf gcc-15.1.0.tar
   {
      root@dev:/home/cu-lib/GCC15# ls -l
      total 895988
      drwxr-xr-x 40 dev  dev       4096 Apr 25 16:52 gcc-15.1.0
      -rw-r--r--  1 root root 917544960 Apr 25 17:09 gcc-15.1.0.tar
   }
STEP2: 
   cd gcc-15.1.0
   ./configure --disable-multilib
STEP3:  make -j10 e>make-error.log  
   {
             In file included from ../.././gcc/hash-table.h:246,
                             from ../.././gcc/coretypes.h:509,
                             from ../.././gcc/c-family/stub-objc.cc:24:
            ../.././gcc/statistics.h:25:2: error: #error GATHER_STATISTICS must
be defined   //---------

               25 | #error GATHER_STATISTICS must be defined  
                           ....
                           ....
              In file included from ../.././gcc/c-family/stub-objc.cc:23:
              ../.././gcc/system.h:557:20: error: conflicting declaration of C
function ‘const char* strsignal(int)’
                557 | extern const char *strsignal (int);
                    |                    ^~~~~~~~~
              In file included from /usr/include/c++/13/cstring:42,
                               from ../.././gcc/system.h:229:
              /usr/include/string.h:478:14: note: previous declaration ‘char*
strsignal(int)’
                478 | extern char *strsignal (int __sig) __THROW;
              |              ^~~~~~~~~
                          .....
              In file included from ../.././gcc/attribs.cc:28:
              ../.././gcc/attribs.h: In function ‘tree_node*
lookup_attribute(const char*, tree)’:
              ../.././gcc/attribs.h:225:7: error: ‘CHECKING_P’ was not declared
in this scope
                225 |   if (CHECKING_P && attr_name[0] != '_')
   }  
   cat ./host-x86_64-pc-linux-gnu/gcc/auto-host.h  //-rw-r--r-- 1 root root
62973 Jul 18 12:25 ./host-x86_64-pc-linux-gnu/gcc/auto-host.h
   {
         #ifndef USED_FOR_TARGET
         #define GATHER_STATISTICS 0
         #endif

         #ifndef USED_FOR_TARGET
         #define CHECKING_P 1
         #endif

         #ifndef USED_FOR_TARGET
         #define ENABLE_OFFLOADING 0
         #endif
   }




   IF manually  do a temperary workround  [ 
       define GATHER_STATISTIC,
       define CHECKING_P , 
       change extern const char *strsignal ....
  ]
   will get : {
        ../.././gcc/c/c-decl.cc:6192:21: error: ‘ENABLE_OFFLOADING’ was not
declared in this scope
   }   


----------

   I attach the error AND warning logs when compiling

Reply via email to