bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory

Dennis Clarke dclarke@blastwave.org
Fri May 13 20:54:53 GMT 2022


On 5/13/22 12:43, Jonathan Wakely wrote:
> On Fri, 13 May 2022 at 17:21, Xi Ruoyao via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
>>
>> On Fri, 2022-05-13 at 12:15 -0400, Dennis Clarke via Gcc-help wrote:
>>>
>>>> There has to be some other configure option in the salad to mix in.
>>
>> No, not "has to be".  It depends on what you want.
>>
>> If you don't need multilib (i. e. the ability to compile "Hello world"
>> program for 32-bit PPC), then --disable-multilib.
>>
>> If you need it, you really need to RTFM to get how to install 32-bit
>> libraries with headers on Debian, as it's OT with gcc-help.
>>
>>> Other than just RTFM.
> 
> Yeah, the point is that unless you use --disable-multilib you need both:
> 
> /usr/include/powerpc64-linux-gnu
> *and*
> /usr/include/powerpc-linux-gnu
> 
> i.e. the 64-bit libc headers *and* the 32-bit libc headers.

Yep. I only ever wanted a 64-bit build and so --disable-multilib seems
to be the ticket. Configure runs fine :

enceladus$ ../gcc-12.1.0/configure --prefix=/opt/gcc/imed/gcc12 \
   --build=powerpc64-linux-gnu --host=powerpc64-linux-gnu \
   --target=powerpc64-linux-gnu \
   --with-gmp=/opt/bw --with-mpfr=/opt/bw --with-mpc=/opt/bw \
   --disable-multilib \
   --disable-nls --enable-threads=posix --enable-shared \
   --enable-bootstrap --enable-languages=c,c++,fortran \
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... powerpc64-unknown-linux-gnu
checking target system type... powerpc64-unknown-linux-gnu
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... /usr/bin/sed
checking for gawk... no
checking for mawk... mawk
checking for libatomic support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... no
checking for libphobos support... yes
checking for powerpc64-linux-gnu-gcc... powerpc64-linux-gnu-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 powerpc64-linux-gnu-gcc accepts -g... yes
checking for powerpc64-linux-gnu-gcc option to accept ISO C89... none needed
checking for powerpc64-linux-gnu-gcc option to accept ISO C99... none needed
checking for powerpc64-linux-gnu-g++... powerpc64-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether powerpc64-linux-gnu-g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for powerpc64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for powerpc64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking for powerpc64-linux-gnu-gdc... no
checking for gdc... no
checking whether the D compiler works... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 
$$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... yes
checking for isl 0.15 or later... no
required isl version is 0.15 or later
*** This configuration is not supported in the following subdirectories:
      target-libvtv gnattools gotools target-libada target-libphobos 
target-zlib target-libgo target-libffi target-libobjc target-liboffloadmic
     (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... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... no
/opt/bw/build/gcc-12.1.0/missing: 81: makeinfo: not found
checking for expect... no
checking for runtest... no
checking for powerpc64-linux-gnu-ar... powerpc64-linux-gnu-ar
checking for powerpc64-linux-gnu-as... powerpc64-linux-gnu-as
checking for powerpc64-linux-gnu-dlltool... no
checking for dlltool... no
checking for powerpc64-linux-gnu-dsymutil... no
checking for dsymutil... no
checking for powerpc64-linux-gnu-ld... powerpc64-linux-gnu-ld
checking for powerpc64-linux-gnu-lipo... no
checking for lipo... no
checking for powerpc64-linux-gnu-nm... powerpc64-linux-gnu-nm
checking for powerpc64-linux-gnu-ranlib... powerpc64-linux-gnu-ranlib
checking for powerpc64-linux-gnu-strip... powerpc64-linux-gnu-strip
checking for powerpc64-linux-gnu-windres... no
checking for windres... no
checking for powerpc64-linux-gnu-windmc... no
checking for windmc... no
checking for powerpc64-linux-gnu-objcopy... powerpc64-linux-gnu-objcopy
checking for powerpc64-linux-gnu-objdump... powerpc64-linux-gnu-objdump
checking for powerpc64-linux-gnu-otool... no
checking for otool... no
checking for powerpc64-linux-gnu-readelf... powerpc64-linux-gnu-readelf
checking for powerpc64-linux-gnu-cc... no
checking for cc... cc
checking for powerpc64-linux-gnu-c++... no
checking for c++... c++
checking for powerpc64-linux-gnu-gcc... powerpc64-linux-gnu-gcc
checking for powerpc64-linux-gnu-gfortran... no
checking for gfortran... no
checking for powerpc64-linux-gnu-gccgo... no
checking for gccgo... no
checking for powerpc64-linux-gnu-gdc... no
checking for gdc... no
checking for ar... no
checking for powerpc64-linux-gnu-ar... powerpc64-linux-gnu-ar
checking for as... no
checking for powerpc64-linux-gnu-as... powerpc64-linux-gnu-as
checking for dlltool... no
checking for powerpc64-linux-gnu-dlltool... no
checking for dlltool... no
checking for dsymutil... no
checking for powerpc64-linux-gnu-dsymutil... no
checking for dsymutil... no
checking for ld... no
checking for powerpc64-linux-gnu-ld... powerpc64-linux-gnu-ld
checking for lipo... no
checking for powerpc64-linux-gnu-lipo... no
checking for lipo... no
checking for nm... no
checking for powerpc64-linux-gnu-nm... powerpc64-linux-gnu-nm
checking for objcopy... no
checking for powerpc64-linux-gnu-objcopy... powerpc64-linux-gnu-objcopy
checking for objdump... no
checking for powerpc64-linux-gnu-objdump... powerpc64-linux-gnu-objdump
checking for otool... no
checking for powerpc64-linux-gnu-otool... no
checking for otool... no
checking for ranlib... no
checking for powerpc64-linux-gnu-ranlib... powerpc64-linux-gnu-ranlib
checking for readelf... no
checking for powerpc64-linux-gnu-readelf... powerpc64-linux-gnu-readelf
checking for strip... no
checking for powerpc64-linux-gnu-strip... powerpc64-linux-gnu-strip
checking for windres... no
checking for powerpc64-linux-gnu-windres... no
checking for windres... no
checking for windmc... no
checking for powerpc64-linux-gnu-windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
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... host tool
checking where to find the target gdc... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objcopy... host tool
checking where to find the target objdump... host tool
checking where to find the target otool... host tool
checking where to find the target ranlib... host tool
checking where to find the target readelf... host tool
checking where to find the target strip... host tool
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
enceladus$

However "configure" always runs just fine regardless of much of anything
other than the mysterious --with-gmp and mpfr and mpc options. If I do
not provide those *and* also have the sources extracted into the gcc
source tree then I get a complaint and configure fails.  If I do provide
those *and* yes the libs have been prebuilt *and* the sources are in the
gcc source tree then I get no complaint and the compile then rebuilds
them anyways. No idea why. [1]

So that configure above actually does the normal bootstrap. I did not do
the bootstrap4 which is fun and does exist and yet weird in its own way.

:)

libtool: link: powerpc64-linux-gnu-ranlib .libs/libtsan.a
libtool: link: rm -fr .libs/libtsan.lax
libtool: link: ( cd ".libs" && rm -f "libtsan.la" && ln -s 
"../libtsan.la" "libtsan.la" )
make[4]: Leaving directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.005/powerpc64-linux-gnu/libsanitizer/tsan'
make[4]: Entering directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.005/powerpc64-linux-gnu/libsanitizer'
true "AR_FLAGS=rc" "CC_FOR_BUILD=powerpc64-linux-gnu-gcc" "CFLAGS=-g 
-O2" "CXXFLAGS=-g -O2 -D_GNU_SOURCE" "CFLAGS_FOR_BUILD=-g -O2" 
"CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" 
"INSTALL_DATA=/usr/bin/install -c -m 644" 
"INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install 
-c" "JC1FLAGS=" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g 
-O2" "MAKE=make" "MAKEINFO=/opt/bw/build/gcc-12.1.0/missing makeinfo 
--split-size=5000000 --split-size=5000000   " "PICFLAG=" 
"PICFLAG_FOR_TARGET=" "SHELL=/usr/bin/bash" "RUNTESTFLAGS=" 
"exec_prefix=/opt/gcc/imed/gcc12" 
"infodir=/opt/gcc/imed/gcc12/share/info" 
"libdir=/opt/gcc/imed/gcc12/lib" "prefix=/opt/gcc/imed/gcc12" 
"includedir=/opt/gcc/imed/gcc12/include" "AR=powerpc64-linux-gnu-ar" 
"AS=/opt/bw/build/gcc-12.1.0_debian_ppc64.005/./gcc/as" 
"LD=/opt/bw/build/gcc-12.1.0_debian_ppc64.005/./gcc/collect-ld" 
"LIBCFLAGS=-g -O2" 
"NM=/opt/bw/build/gcc-12.1.0_debian_ppc64.005/./gcc/nm" "PICFLAG=" 
"RANLIB=powerpc64-linux-gnu-ranlib" "DESTDIR=" DO=all multi-do # make
make[4]: Leaving directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.005/powerpc64-linux-gnu/libsanitizer'
make[3]: Leaving directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.005/powerpc64-linux-gnu/libsanitizer'
make[2]: Leaving directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.005/powerpc64-linux-gnu/libsanitizer'
make[1]: Leaving directory '/opt/bw/build/gcc-12.1.0_debian_ppc64.005'
real 12535.54
user 43650.62
sys 1334.83
enceladus$
enceladus$ echo $? 
                                                             0 
 
                                                   enceladus$

Cool.

enceladus$
enceladus$ ls -lapb --full-time ./stage1-gcc/xgcc ./prev-gcc/xgcc ./gcc/xgcc
-rwxr-xr-x 1 dclarke devl 5981584 2022-05-13 20:17:17.398378278 +0000 
./gcc/xgcc
-rwxr-xr-x 1 dclarke devl 2077720 2022-05-13 19:34:28.401954705 +0000 
./prev-gcc/xgcc
-rwxr-xr-x 1 dclarke devl 5145688 2022-05-13 17:18:49.299039174 +0000 
./stage1-gcc/xgcc
enceladus$

No stage4 result but whatever :\ we didn't want that anyways ?

The testsuite is running. I expect that will be a while. I didn't bother
with gnat because it seems to always fail most of its own tests anyways.

Also yes my mail server won't send or recieve to anything with a domain
name of ".site" and I only ever see :

     Sending of the message failed.
     An error occurred while sending mail.
     The mail server responded:
         <xry111@xry111.site>... Mailbox disabled for this recipient.
     Please check the message recipient "xry111@xry111.site" and
     try again.

Which really means that the mailserver blocks that domain and a ton of
others that are deemed spooky.  I guess I could get that "fixed" for the
one specific user who does know good stuff.


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


[1] just for the sake of demonstration ...

enceladus$ pwd
/opt/bw/build/gcc-12.1.0_debian_ppc64.006
enceladus$ LC_TIME=C date -u
Fri May 13 20:48:48 UTC 2022
enceladus$ ../gcc-12.1.0/configure --prefix=/opt/gcc/foo \
 > --build=powerpc64-linux-gnu \
 > --host=powerpc64-linux-gnu \
 > --target=powerpc64-linux-gnu \
 > --disable-multilib --disable-nls --enable-threads=posix \ 

 > --enable-shared --enable-bootstrap \
 > --enable-languages=c,c++,fortran \
 > --with-pkgversion="Watch this fail"
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... powerpc64-unknown-linux-gnu 

checking target system type... powerpc64-unknown-linux-gnu 

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... /usr/bin/sed 

checking for gawk... no 

checking for mawk... mawk 

checking for libatomic support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... no
checking for libphobos support... yes
checking for powerpc64-linux-gnu-gcc... powerpc64-linux-gnu-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 powerpc64-linux-gnu-gcc accepts -g... yes
checking for powerpc64-linux-gnu-gcc option to accept ISO C89... none needed
checking for powerpc64-linux-gnu-gcc option to accept ISO C99... none needed
checking for powerpc64-linux-gnu-g++... powerpc64-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether powerpc64-linux-gnu-g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... yes
checking for powerpc64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for powerpc64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking for powerpc64-linux-gnu-gdc... no
checking for gdc... no
checking whether the D compiler works... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 
$$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 
0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
https://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.
enceladus$



More information about the Gcc-help mailing list