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