public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
@ 2022-05-13 15:11 Dennis Clarke
  2022-05-13 15:24 ` Xi Ruoyao
  2022-05-13 16:15 ` Dennis Clarke
  0 siblings, 2 replies; 14+ messages in thread
From: Dennis Clarke @ 2022-05-13 15:11 UTC (permalink / raw)
  To: gcc-help


 From the desk of here-we-go-again:

This looks similar to the issue I saw with armv7l but just different
enough where searching for configure options is getting mysterious at
best. The header needed is :

     /usr/include/powerpc64-linux-gnu/bits/libc-header-start.h

So there I see a triplet sort of name "powerpc64-linux-gnu".
I go back and read :

     https://gcc.gnu.org/pipermail/gcc-help/2022-May/141529.html


The gcc that I have within Debian ppc64 is off the shelf :

enceladus$ gcc --version
gcc (Debian 11.3.0-1) 11.3.0
Copyright (C) 2021 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.

enceladus$ gcc -print-multiarch
powerpc64-linux-gnu
enceladus$

However it is not at all clear what that tells me.

So here I go looking at the option salad tossed into the Debian gcc :

enceladus$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/powerpc64-linux-gnu/11/lto-wrapper
Target: powerpc64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 11.3.0-1' 
--with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs 
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr 
--with-gcc-major-version-only --program-suffix=-11 
--program-prefix=powerpc64-linux-gnu- --enable-shared 
--enable-linker-build-id --libexecdir=/usr/lib 
--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-gnu-unique-object 
--disable-libquadmath --disable-libquadmath-support --enable-plugin 
--enable-default-pie --with-system-zlib 
--enable-libphobos-checking=release --with-target-system-zlib=auto 
--with-libphobos-druntime-only=yes --enable-objc-gc=auto 
--enable-secureplt --disable-softfloat 
--enable-targets=powerpc64-linux,powerpc-linux --enable-multiarch 
--disable-werror --with-long-double-128 --enable-multilib 
--enable-checking=release --build=powerpc64-linux-gnu 
--host=powerpc64-linux-gnu --target=powerpc64-linux-gnu 
--with-build-config=bootstrap-lto-lean --enable-link-serialization=16
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Debian 11.3.0-1)
enceladus$

OKay so I can glean a bit of information from that collossal list :

     --disable-libquadmath
     --disable-libquadmath-support
     --enable-default-pie
     --with-system-zlib
     --disable-softfloat
     --enable-targets=powerpc64-linux,powerpc-linux
     --enable-multiarch
     --disable-werror
     --with-long-double-128
     --enable-multilib
     --build=powerpc64-linux-gnu
     --host=powerpc64-linux-gnu
     --target=powerpc64-linux-gnu

Well I know the hardware will do 128bit floating point but it is the fun
and bizarre IBM 16 byte format made up of two 8 byte floats mashed
together with magic. Fine. It works. I know libquadmath is only for
AMD64 so fine that needs not be said. I don't see the value of throwing
away softfloat becuase who knows? Maybe I want to emulate floating point
for fun? Given that the 16 byte ( 128bit ) stuff is emulated anyways on
everything other than mainframes and IBM Power9 ( sell a kidney to get
yours today ) I want to keep softfloat and long-double-128 stuff.  Who
knows, maybe someday we get a RISC-V chip with 128-bit hardware. For now
anything can emulate flaoting point so I'll keep that.

Thats gets me to :

enceladus$ pwd 

/opt/bw/build/gcc-12.1.0_debian_ppc64.003
enceladus$ LC_TIME=C date -u
Fri May 13 14:35:36 UTC 2022
enceladus$
enceladus$ ../gcc-12.1.0/configure --prefix=/opt/gcc/imed/gcc12 \
 > --build=powerpc64-linux-gnu \
 > --host=powerpc64-linux-gnu \
 > --target=powerpc64-linux-gnu \
 > --enable-multilib --enable-multiarch \ 

 > --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-lib
offloadmic
     (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$

The compile fails :

.
.
.
/opt/bw/build/gcc-12.1.0_debian_ppc64.003/./gcc/xgcc 
-B/opt/bw/build/gcc-12.1.0_debian_ppc64.003/./gcc/ 
-B/opt/gcc/imed/gcc12/powerpc64-linux-gnu/bin/ 
-B/opt/gcc/imed/gcc12/powerpc64-linux-gnu/lib/ -isystem 
/opt/gcc/imed/gcc12/powerpc64-linux-gnu/include -isystem 
/opt/gcc/imed/gcc12/powerpc64-linux-gnu/sys-include   -fno-checking -g 
-O2 -m32 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes 
-Wold-style-definition  -isystem ./include  -fPIC -mlong-double-128 
-mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector 
  -fPIC -mlong-double-128 -mno-minimal-toc -I. -I. -I../../.././gcc 
-I../../../../gcc-12.1.0/libgcc -I../../../../gcc-12.1.0/libgcc/. 
-I../../../../gcc-12.1.0/libgcc/../gcc 
-I../../../../gcc-12.1.0/libgcc/../include  -DHAVE_CC_TLS   -o 
generic-morestack-thread.o -MT generic-morestack-thread.o -MD -MP -MF 
generic-morestack-thread.dep  -c 
../../../../gcc-12.1.0/libgcc/generic-morestack-thread.c 
-fvisibility=hidden -DHIDE_EXPORTS
In file included from ../../../../gcc-12.1.0/libgcc/../gcc/tsystem.h:87,
                  from 
../../../../gcc-12.1.0/libgcc/generic-morestack-thread.c:27:
/usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No 
such file or directory
    27 | #include <bits/libc-header-start.h>
       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[5]: *** [../../../../gcc-12.1.0/libgcc/shared-object.mk:14: 
generic-morestack-thread.o] Error 1
make[5]: Leaving directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.003/powerpc64-linux-gnu/32/libgcc'
make[4]: *** [Makefile:1211: multi-do] Error 1
make[4]: Leaving directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.003/powerpc64-linux-gnu/libgcc'
make[3]: *** [Makefile:127: all-multi] Error 2
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory 
'/opt/bw/build/gcc-12.1.0_debian_ppc64.003/powerpc64-linux-gnu/libgcc'
make[2]: *** [Makefile:20742: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/opt/bw/build/gcc-12.1.0_debian_ppc64.003'
make[1]: *** [Makefile:26148: stage1-bubble] Error 2
make[1]: Leaving directory '/opt/bw/build/gcc-12.1.0_debian_ppc64.003'
make: *** [Makefile:26501: bootstrap] Error 2
enceladus$

However I don't see why :

enceladus$
enceladus$ /opt/bw/build/gcc-12.1.0_debian_ppc64.003/./gcc/xgcc 
-print-multiarch
powerpc64-linux-gnu
enceladus$

There has to be some other configure option in the salad to mix in.

Would love to hear thoughts.


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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 15:11 bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory Dennis Clarke
@ 2022-05-13 15:24 ` Xi Ruoyao
  2022-05-13 15:31   ` Xi Ruoyao
  2022-05-13 16:15 ` Dennis Clarke
  1 sibling, 1 reply; 14+ messages in thread
From: Xi Ruoyao @ 2022-05-13 15:24 UTC (permalink / raw)
  To: Dennis Clarke, gcc-help

On Fri, 2022-05-13 at 11:11 -0400, Dennis Clarke via Gcc-help wrote:

/* snip */

> /opt/bw/build/gcc-12.1.0_debian_ppc64.003/./gcc/xgcc 
> -B/opt/bw/build/gcc-12.1.0_debian_ppc64.003/./gcc/ 
> -B/opt/gcc/imed/gcc12/powerpc64-linux-gnu/bin/ 
> -B/opt/gcc/imed/gcc12/powerpc64-linux-gnu/lib/ -isystem 
> /opt/gcc/imed/gcc12/powerpc64-linux-gnu/include -isystem 
> /opt/gcc/imed/gcc12/powerpc64-linux-gnu/sys-include   -fno-checking -g
> -O2 -m32 -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings 
      ^^^^

/* snip */

> However I don't see why :
> 
> enceladus$
> enceladus$ /opt/bw/build/gcc-12.1.0_debian_ppc64.003/./gcc/xgcc 
> -print-multiarch
> powerpc64-linux-gnu
> enceladus$

-m32 will change it to powerpc-linux-gnu.

Generally you need to get some knowledge about a distro if you want to
use it for development.


-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 15:24 ` Xi Ruoyao
@ 2022-05-13 15:31   ` Xi Ruoyao
  0 siblings, 0 replies; 14+ messages in thread
From: Xi Ruoyao @ 2022-05-13 15:31 UTC (permalink / raw)
  To: Dennis Clarke, gcc-help

On Fri, 2022-05-13 at 23:24 +0800, Xi Ruoyao via Gcc-help wrote:

> Generally you need to get some knowledge about a distro if you want to
> use it for development.

I mean you should read the Debian documentation I've mentioned in
previous discussion: https://wiki.debian.org/Multiarch/ then you won't
be haunted again and again by the same problem/

Or if you think this behavior is completely stupid, you can abandon
Debian.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 15:11 bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory Dennis Clarke
  2022-05-13 15:24 ` Xi Ruoyao
@ 2022-05-13 16:15 ` Dennis Clarke
  2022-05-13 16:20   ` Xi Ruoyao
  1 sibling, 1 reply; 14+ messages in thread
From: Dennis Clarke @ 2022-05-13 16:15 UTC (permalink / raw)
  To: gcc-help


> There has to be some other configure option in the salad to mix in.
> 
> Would love to hear thoughts.
>

Other than just RTFM.


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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 16:15 ` Dennis Clarke
@ 2022-05-13 16:20   ` Xi Ruoyao
  2022-05-13 16:43     ` Jonathan Wakely
  2022-05-13 17:29     ` Segher Boessenkool
  0 siblings, 2 replies; 14+ messages in thread
From: Xi Ruoyao @ 2022-05-13 16:20 UTC (permalink / raw)
  To: Dennis Clarke, gcc-help

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.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 16:20   ` Xi Ruoyao
@ 2022-05-13 16:43     ` Jonathan Wakely
  2022-05-13 20:54       ` Dennis Clarke
  2022-05-13 17:29     ` Segher Boessenkool
  1 sibling, 1 reply; 14+ messages in thread
From: Jonathan Wakely @ 2022-05-13 16:43 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: Dennis Clarke, gcc-help

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.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 16:20   ` Xi Ruoyao
  2022-05-13 16:43     ` Jonathan Wakely
@ 2022-05-13 17:29     ` Segher Boessenkool
  1 sibling, 0 replies; 14+ messages in thread
From: Segher Boessenkool @ 2022-05-13 17:29 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: Dennis Clarke, gcc-help

Hi!

On Sat, May 14, 2022 at 12:20:30AM +0800, Xi Ruoyao via Gcc-help 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.

That is not the best idea.  It disables *all* multilibs: for example,
for soft float as well.  If you want to not enable all targets, just say
so in your --enable-targets=, that is what it is for.
--disable-multilib means "kneecap the compiler, I don't care about all
the functionality this may disable".

> 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.

Yeah, and all this "multiarch" stuff is as well.  (GCC does biarch just
fine of course, it is a similar concept, but much older, and it does
work fine.  It's not the same thing :-) )


Segher

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 16:43     ` Jonathan Wakely
@ 2022-05-13 20:54       ` Dennis Clarke
  2022-05-13 21:03         ` Jonathan Wakely
  0 siblings, 1 reply; 14+ messages in thread
From: Dennis Clarke @ 2022-05-13 20:54 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

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$


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 20:54       ` Dennis Clarke
@ 2022-05-13 21:03         ` Jonathan Wakely
  2022-05-13 22:06           ` Dennis Clarke
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Wakely @ 2022-05-13 21:03 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help

On Fri, 13 May 2022 at 21:55, Dennis Clarke wrote:
> 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]

Honestly, I find that hard to believe.

One or the other is needed. If you need both, I think you're the only
person in the world who needs that.

> 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 ?

Good, there should only be three stages.


> 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+.

Which version of mpc have you got in the GCC source tree, and how did
you add it there?

What does 'ls -d ../gcc-12.1.0/mpc*' show?

What does config.log (in the build dir) say before it fails? It should
tell you where it found mpc.h and which version it found.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 21:03         ` Jonathan Wakely
@ 2022-05-13 22:06           ` Dennis Clarke
  2022-05-13 22:49             ` Jonathan Wakely
  0 siblings, 1 reply; 14+ messages in thread
From: Dennis Clarke @ 2022-05-13 22:06 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On 5/13/22 17:03, Jonathan Wakely wrote:
> On Fri, 13 May 2022 at 21:55, Dennis Clarke wrote:
>> 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]
> 
> Honestly, I find that hard to believe.

Me too!

> 
> One or the other is needed. If you need both, I think you're the only
> person in the world who needs that.
> 

Not bloody likely right?  I am looking into that and I think the real 
issue is that the versions wanted in the source tree must be the same as 
the stuff dragging in by the script kicker download_prerequisites :

     https://gcc.gnu.org/install/prerequisites.html

     The in-tree build is only supported with the GMP version that
     download_prerequisites installs.

However what do I know? There is another page that says do a bootstrap4
for extra spice and flavour in your result. That doesn't fly.


>> 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 ?
> 
> Good, there should only be three stages.
>

I gather that now. Maybe the page that says "bootstrap4" could have a
line like "we don't know if this works" or words to that effect.  :-\

     https://gcc.gnu.org/install/build.html


> 
>> 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+.
> 
> Which version of mpc have you got in the GCC source tree, and how did
> you add it there?
>

Whoa ... hold on a sec. I generally never use the little magic script
download_prerequisites. I had better check that :

hydra# head ./contrib/download_prerequisites
#! /bin/sh
#! -*- coding:utf-8; mode:shell-script; -*-

# Download some prerequisites needed by GCC.
# Run this from the top level of the GCC source tree and the GCC build 
will do
# the right thing.  Run it with the `--help` option for more information.
#
# (C) 2010-2021 Free Software Foundation
#

Sure. Right. Let's just see :

hydra# ./contrib/download_prerequisites --help
wget: not found
usage: download_prerequisites [OPTION...]

Downloads some prerequisites needed by GCC.  Run this from the top level 
of the
GCC source tree and the GCC build will do the right thing.

The following options are available:

  --directory=DIR  download and unpack packages into DIR instead of '.'
  --force          download again overwriting existing packages
  --no-force       do not download existing packages again (default)
  --isl            download ISL, needed for Graphite loop optimizations 
(default)
  --graphite       same as --isl
  --no-isl         don't download ISL
  --no-graphite    same as --no-isl
  --verify         verify package integrity after download (default)
  --no-verify      don't verify package integrity
  --sha512         use SHA512 checksum to verify package integrity (default)
  --md5            use MD5 checksum to verify package integrity
  --help           show this text and exit
  --version        show version information and exit

hydra#

Okay so it needs 'wget'. Fine. Easy to fix that.

hydra# ./contrib/download_prerequisites
2022-05-13 21:53:14 
URL:http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.2.1.tar.bz2 
[2493916/2493916] -> "gmp-6.2.1.tar.bz2" [1]
2022-05-13 21:53:14 
URL:http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-4.1.0.tar.bz2 
[1747243/1747243] -> "mpfr-4.1.0.tar.bz2" [1]
2022-05-13 21:53:15 
URL:http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.2.1.tar.gz 
[838731/838731] -> "mpc-1.2.1.tar.gz" [1]
2022-05-13 21:53:16 
URL:http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.24.tar.bz2 
[2261594/2261594] -> "isl-0.24.tar.bz2" [1]
gmp-6.2.1.tar.bz2: OK
mpfr-4.1.0.tar.bz2: OK
mpc-1.2.1.tar.gz: OK
isl-0.24.tar.bz2: OK
All prerequisites downloaded successfully.
hydra#


     * * * Those versions all look perfect.  * * *


Same stuff I use however the mpfr *needs* a patch.


hydra# ls -lap /opt/bw/src
total 150124
drwxrwxr-x  2 root     devl           8 May 13 21:37 ./
drwxr-xr-x  4 root     wheel          4 May 13 21:32 ../
-rw-r--r--  1 dclarke  devl   145089078 May 13 21:31 gcc-12.1.0.tar.gz
-rw-r--r--  1 dclarke  devl     2493916 May 13 21:34 gmp-6.2.1.tar.bz2
-rw-r--r--  1 dclarke  devl     2757038 May 13 21:37 isl-0.24.tar.gz
-rw-r--r--  1 dclarke  devl      838731 May 13 21:36 mpc-1.2.1.tar.gz
-rw-r--r--  1 dclarke  devl     2357295 May 13 21:35 mpfr-4.1.0.tar.gz
-rw-r--r--  1 dclarke  devl      104646 May 13 21:35 mpfr-4.1.0_patch
hydra#


> What does 'ls -d ../gcc-12.1.0/mpc*' show?
>

hydra# pwd
/opt/bw/build/gcc-12.1.0
hydra# ls -ladb mpc*
lrwxr-xr-x  1 root    1000      12 May 13 21:53 mpc -> ./mpc-1.2.1/
drwxr-xr-x  8 admsys  998       22 Oct 20  2020 mpc-1.2.1
-rw-r--r--  1 root    1000  838731 Oct 23  2020 mpc-1.2.1.tar.gz
hydra#
hydra# ls -ladb gmp*
lrwxr-xr-x   1 root  1000       12 May 13 21:53 gmp -> ./gmp-6.2.1/
drwxrwxr-x  15 1006  1006       75 Nov 14  2020 gmp-6.2.1
-rw-r--r--   1 root  1000  2493916 Nov 14  2020 gmp-6.2.1.tar.bz2
hydra#
hydra# ls -ladb mpfr*
lrwxr-xr-x  1 root  1000       13 May 13 21:53 mpfr -> ./mpfr-4.1.0/
drwxr-xr-x  9 1000  1000       36 Jul 10  2020 mpfr-4.1.0
-rw-r--r--  1 root  1000  1747243 Jul 10  2020 mpfr-4.1.0.tar.bz2
hydra#
hydra# ls -ladb isl*
lrwxr-xr-x   1 root  1000       11 May 13 21:53 isl -> ./isl-0.24/
drwxrwxr-x  11 1000  1000      323 May  1  2021 isl-0.24
-rw-r--r--   1 root  1000  2261594 May  1  2021 isl-0.24.tar.bz2
hydra#

That is precisely what I have in every machine where I try this process.
Unless the configure process goes looking for the left over tar files?

I must have made a mistake somewhere.

# cd /opt/bw/build/gcc-12.1.0
# ls -ladb gmp* mpfr* mpc*
lrwxrwxrwx  1 root   root      9 May  6 17:04 gmp -> gmp-6.2.1
drwxrwxr-x 15   1006   1006 4096 Nov 14  2020 gmp-6.2.1
lrwxrwxrwx  1 root   root      9 May  6 17:04 mpc -> mpc-1.2.1
drwxr-xr-x  8   1001    998 4096 Oct 20  2020 mpc-1.2.1
lrwxrwxrwx  1 root   root     10 May  6 17:04 mpfr -> mpfr-4.1.0
drwxr-xr-x  9 linaro linaro 4096 Jul 10  2020 mpfr-4.1.0
#

Let me dig around a bit and see what is going on.

> What does config.log (in the build dir) say before it fails? It should
> tell you where it found mpc.h and which version it found.

I deleted the failed build dir(s) to save on a bit of space.

I will repeat the experiment. Once more with feeling.

Oh also .. closed this bug thanks to great help!

     stage2 failure due to .... stuff
     https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88633

OKay ... I will try the configure script with and without running the
download_prerequisites goodness.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 22:06           ` Dennis Clarke
@ 2022-05-13 22:49             ` Jonathan Wakely
  2022-05-13 23:21               ` Dennis Clarke
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Wakely @ 2022-05-13 22:49 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help

On Fri, 13 May 2022 at 23:06, Dennis Clarke <dclarke@blastwave.org> wrote:
>
> On 5/13/22 17:03, Jonathan Wakely wrote:
> > On Fri, 13 May 2022 at 21:55, Dennis Clarke wrote:
> >> 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]
> >
> > Honestly, I find that hard to believe.
>
> Me too!
>
> >
> > One or the other is needed. If you need both, I think you're the only
> > person in the world who needs that.
> >
>
> Not bloody likely right?  I am looking into that and I think the real
> issue is that the versions wanted in the source tree must be the same as
> the stuff dragging in by the script kicker download_prerequisites :
>
>      https://gcc.gnu.org/install/prerequisites.html
>
>      The in-tree build is only supported with the GMP version that
>      download_prerequisites installs.

Right, you should be using that script.

https://gcc.gnu.org/wiki/InstallingGCC

Or (as that page says) just install the debian packages and stop
installing them by hand.


> However what do I know? There is another page that says do a bootstrap4
> for extra spice and flavour in your result. That doesn't fly.

Well stop trying to do weird stuff and just Keep It Simple.

>
>
> >> 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 ?
> >
> > Good, there should only be three stages.
> >
>
> I gather that now. Maybe the page that says "bootstrap4" could have a
> line like "we don't know if this works" or words to that effect.  :-\
>
>      https://gcc.gnu.org/install/build.html
>
>
> >
> >> 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+.
> >
> > Which version of mpc have you got in the GCC source tree, and how did
> > you add it there?
> >
>
> Whoa ... hold on a sec. I generally never use the little magic script
> download_prerequisites. I had better check that :

You should use it. It makes everything much simpler than you're making it.

>
> hydra# head ./contrib/download_prerequisites
> #! /bin/sh
> #! -*- coding:utf-8; mode:shell-script; -*-
>
> # Download some prerequisites needed by GCC.
> # Run this from the top level of the GCC source tree and the GCC build
> will do
> # the right thing.  Run it with the `--help` option for more information.
> #
> # (C) 2010-2021 Free Software Foundation
> #
>
> Sure. Right. Let's just see :
>
> hydra# ./contrib/download_prerequisites --help
> wget: not found
> usage: download_prerequisites [OPTION...]

> Okay so it needs 'wget'. Fine. Easy to fix that.

It uses curl instead if wget is not found. Most people have one or the
other already installed.

> Same stuff I use however the mpfr *needs* a patch.

Eh? Why?

>
>
> hydra# ls -lap /opt/bw/src
> total 150124
> drwxrwxr-x  2 root     devl           8 May 13 21:37 ./
> drwxr-xr-x  4 root     wheel          4 May 13 21:32 ../
> -rw-r--r--  1 dclarke  devl   145089078 May 13 21:31 gcc-12.1.0.tar.gz
> -rw-r--r--  1 dclarke  devl     2493916 May 13 21:34 gmp-6.2.1.tar.bz2
> -rw-r--r--  1 dclarke  devl     2757038 May 13 21:37 isl-0.24.tar.gz
> -rw-r--r--  1 dclarke  devl      838731 May 13 21:36 mpc-1.2.1.tar.gz
> -rw-r--r--  1 dclarke  devl     2357295 May 13 21:35 mpfr-4.1.0.tar.gz
> -rw-r--r--  1 dclarke  devl      104646 May 13 21:35 mpfr-4.1.0_patch
> hydra#
>
>
> > What does 'ls -d ../gcc-12.1.0/mpc*' show?
> >
>
> hydra# pwd
> /opt/bw/build/gcc-12.1.0
> hydra# ls -ladb mpc*
> lrwxr-xr-x  1 root    1000      12 May 13 21:53 mpc -> ./mpc-1.2.1/
> drwxr-xr-x  8 admsys  998       22 Oct 20  2020 mpc-1.2.1
> -rw-r--r--  1 root    1000  838731 Oct 23  2020 mpc-1.2.1.tar.gz
> hydra#
> hydra# ls -ladb gmp*
> lrwxr-xr-x   1 root  1000       12 May 13 21:53 gmp -> ./gmp-6.2.1/
> drwxrwxr-x  15 1006  1006       75 Nov 14  2020 gmp-6.2.1
> -rw-r--r--   1 root  1000  2493916 Nov 14  2020 gmp-6.2.1.tar.bz2
> hydra#
> hydra# ls -ladb mpfr*
> lrwxr-xr-x  1 root  1000       13 May 13 21:53 mpfr -> ./mpfr-4.1.0/
> drwxr-xr-x  9 1000  1000       36 Jul 10  2020 mpfr-4.1.0
> -rw-r--r--  1 root  1000  1747243 Jul 10  2020 mpfr-4.1.0.tar.bz2
> hydra#
> hydra# ls -ladb isl*
> lrwxr-xr-x   1 root  1000       11 May 13 21:53 isl -> ./isl-0.24/
> drwxrwxr-x  11 1000  1000      323 May  1  2021 isl-0.24
> -rw-r--r--   1 root  1000  2261594 May  1  2021 isl-0.24.tar.bz2
> hydra#
>
> That is precisely what I have in every machine where I try this process.

But it wouldn't complain about the mpc version if that was the case.

> Unless the configure process goes looking for the left over tar files?

No.

> I must have made a mistake somewhere.
>
> # cd /opt/bw/build/gcc-12.1.0
> # ls -ladb gmp* mpfr* mpc*
> lrwxrwxrwx  1 root   root      9 May  6 17:04 gmp -> gmp-6.2.1
> drwxrwxr-x 15   1006   1006 4096 Nov 14  2020 gmp-6.2.1
> lrwxrwxrwx  1 root   root      9 May  6 17:04 mpc -> mpc-1.2.1
> drwxr-xr-x  8   1001    998 4096 Oct 20  2020 mpc-1.2.1
> lrwxrwxrwx  1 root   root     10 May  6 17:04 mpfr -> mpfr-4.1.0
> drwxr-xr-x  9 linaro linaro 4096 Jul 10  2020 mpfr-4.1.0
> #
>
> Let me dig around a bit and see what is going on.
>
> > What does config.log (in the build dir) say before it fails? It should
> > tell you where it found mpc.h and which version it found.
>
> I deleted the failed build dir(s) to save on a bit of space.

I would also delete the source tree and untar it again, in case you've
fouled it up somehow. And then run contrib/download_prerequisites
again.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 22:49             ` Jonathan Wakely
@ 2022-05-13 23:21               ` Dennis Clarke
  2022-05-14  7:06                 ` Jonathan Wakely
  0 siblings, 1 reply; 14+ messages in thread
From: Dennis Clarke @ 2022-05-13 23:21 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help


>>> Honestly, I find that hard to believe.
>>
>> Me too!
>>
>>>
>>> One or the other is needed. If you need both, I think you're the only
>>> person in the world who needs that.
>>>
>>
>> Not bloody likely right?  I am looking into that and I think the real
>> issue is that the versions wanted in the source tree must be the same as
>> the stuff dragging in by the script kicker download_prerequisites :
>>
>>       https://gcc.gnu.org/install/prerequisites.html
>>
>>       The in-tree build is only supported with the GMP version that
>>       download_prerequisites installs.
> 
> Right, you should be using that script.
> 
> https://gcc.gnu.org/wiki/InstallingGCC
>

Well what difference does it make anyways?
The correct versions are the correct versions.

> Or (as that page says) just install the debian packages and stop
> installing them by hand.

But I want to have the libs around as fully non-optimized and no
assembly single steppable debug enabled full of goodness. Which I
can certianly do.


>> However what do I know? There is another page that says do a bootstrap4
>> for extra spice and flavour in your result. That doesn't fly.
> 
> Well stop trying to do weird stuff and just Keep It Simple.
>

That just drains the joy out of everything. However to be really clear
all I wanted was to boot strap gcc on a few machines and as usual I run
into problems. Most people these days never see the sources and only get
packages pre-built by someone else somewhere magic.  Sort of defeats the
whole reason why the source is open right? May as well just install MS
Windows Vista and be happy.

Also there is great learning stuff to be had in the process. Not the 
least of which is from good folks like Segher Boessenkool :

     https://gcc.gnu.org/pipermail/gcc-help/2022-May/141568.html

There is a valid point there. Am I building a compiler which is already
crippled? Hard to know for sure.

>>
>> Whoa ... hold on a sec. I generally never use the little magic script
>> download_prerequisites. I had better check that :
> 
> You should use it. It makes everything much simpler than you're making it.
>

Well it does the same thing and all that is left is the patch for mpfr.

>> Okay so it needs 'wget'. Fine. Easy to fix that.
> 
> It uses curl instead if wget is not found. Most people have one or the
> other already installed.

Yeah, I prefer curl. Regardless ...

> 
>> Same stuff I use however the mpfr *needs* a patch.
> 
> Eh? Why?

Those folks working on gmp and mpfr really are the experts. The page
says :

     https://www.mpfr.org/mpfr-current/#download

     The bugs listed below have been fixed (latest update: 2021-05-17).

     See https://www.mpfr.org/mpfr-current/#fixed

Thirteen bug fixes and from what I have heard directly from some good
folks the code in GMP has been subjected to an actual proof. The MPFR
code is in process. I gather those bug fixes are valuable and trivial
to apply. In fact the download_prerequisites script could be updated
to fetch the patches and just apply them.

> 
>> I must have made a mistake somewhere.
>>
.
.
.
> 
> I would also delete the source tree and untar it again, in case you've
> fouled it up somehow. And then run contrib/download_prerequisites
> again.

Yep.

Starting over from scratch seems like a good idea on Friday the 13th.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-13 23:21               ` Dennis Clarke
@ 2022-05-14  7:06                 ` Jonathan Wakely
  2022-05-14 16:42                   ` Dennis Clarke
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Wakely @ 2022-05-14  7:06 UTC (permalink / raw)
  To: Dennis Clarke; +Cc: gcc-help

On Sat, 14 May 2022 at 00:22, Dennis Clarke <dclarke@blastwave.org> wrote:
>
>
> >>> Honestly, I find that hard to believe.
> >>
> >> Me too!
> >>
> >>>
> >>> One or the other is needed. If you need both, I think you're the only
> >>> person in the world who needs that.
> >>>
> >>
> >> Not bloody likely right?  I am looking into that and I think the real
> >> issue is that the versions wanted in the source tree must be the same as
> >> the stuff dragging in by the script kicker download_prerequisites :
> >>
> >>       https://gcc.gnu.org/install/prerequisites.html
> >>
> >>       The in-tree build is only supported with the GMP version that
> >>       download_prerequisites installs.
> >
> > Right, you should be using that script.
> >
> > https://gcc.gnu.org/wiki/InstallingGCC
> >
>
> Well what difference does it make anyways?
> The correct versions are the correct versions.

Well you keep running into problems doing things your way, so I'm
suggesting you just use the well-tested route that is known to work.

>
> > Or (as that page says) just install the debian packages and stop
> > installing them by hand.
>
> But I want to have the libs around as fully non-optimized and no
> assembly single steppable debug enabled full of goodness. Which I
> can certianly do.
>
>
> >> However what do I know? There is another page that says do a bootstrap4
> >> for extra spice and flavour in your result. That doesn't fly.
> >
> > Well stop trying to do weird stuff and just Keep It Simple.
> >
>
> That just drains the joy out of everything.

OK, I'll leave you to it then, have fun.

> >> Okay so it needs 'wget'. Fine. Easy to fix that.
> >
> > It uses curl instead if wget is not found. Most people have one or the
> > other already installed.
>
> Yeah, I prefer curl. Regardless ...
>
> >
> >> Same stuff I use however the mpfr *needs* a patch.
> >
> > Eh? Why?
>
> Those folks working on gmp and mpfr really are the experts. The page
> says :
>
>      https://www.mpfr.org/mpfr-current/#download
>
>      The bugs listed below have been fixed (latest update: 2021-05-17).
>
>      See https://www.mpfr.org/mpfr-current/#fixed
>
> Thirteen bug fixes and from what I have heard directly from some good
> folks the code in GMP has been subjected to an actual proof. The MPFR
> code is in process. I gather those bug fixes are valuable and trivial
> to apply. In fact the download_prerequisites script could be updated
> to fetch the patches and just apply them.

They don't affect the code GCC uses.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory
  2022-05-14  7:06                 ` Jonathan Wakely
@ 2022-05-14 16:42                   ` Dennis Clarke
  0 siblings, 0 replies; 14+ messages in thread
From: Dennis Clarke @ 2022-05-14 16:42 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On 5/14/22 03:06, Jonathan Wakely wrote:
> On Sat, 14 May 2022 at 00:22, Dennis Clarke <dclarke@blastwave.org> wrote:
>>
>>
>>>>> Honestly, I find that hard to believe.
>>>>
>>>> Me too!
.
.
.
>> Those folks working on gmp and mpfr really are the experts. The page
>> says :
>>
>>       https://www.mpfr.org/mpfr-current/#download
>>
>>       The bugs listed below have been fixed (latest update: 2021-05-17).
>>
>>       See https://www.mpfr.org/mpfr-current/#fixed
>>
>> Thirteen bug fixes and from what I have heard directly from some good
>> folks the code in GMP has been subjected to an actual proof. The MPFR
>> code is in process. I gather those bug fixes are valuable and trivial
>> to apply. In fact the download_prerequisites script could be updated
>> to fetch the patches and just apply them.
> 
> They don't affect the code GCC uses.


In that case I will apply them.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-05-14 16:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 15:11 bootstrap fails on Debian ppc64 with fatal error: bits/libc-header-start.h: No such file or directory Dennis Clarke
2022-05-13 15:24 ` Xi Ruoyao
2022-05-13 15:31   ` Xi Ruoyao
2022-05-13 16:15 ` Dennis Clarke
2022-05-13 16:20   ` Xi Ruoyao
2022-05-13 16:43     ` Jonathan Wakely
2022-05-13 20:54       ` Dennis Clarke
2022-05-13 21:03         ` Jonathan Wakely
2022-05-13 22:06           ` Dennis Clarke
2022-05-13 22:49             ` Jonathan Wakely
2022-05-13 23:21               ` Dennis Clarke
2022-05-14  7:06                 ` Jonathan Wakely
2022-05-14 16:42                   ` Dennis Clarke
2022-05-13 17:29     ` Segher Boessenkool

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).