Bug 66356 - Failure to bootstrap release version together with binutils
Summary: Failure to bootstrap release version together with binutils
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 5.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2015-05-31 22:19 UTC by Ondrej Jakubcik
Modified: 2022-01-08 03:52 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
builddir/intl/config.log (2.41 KB, text/plain)
2015-05-31 22:19 UTC, Ondrej Jakubcik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Jakubcik 2015-05-31 22:19:55 UTC
Created attachment 35660 [details]
builddir/intl/config.log

I have downloaded release of GCC 5.1.0, together with binutils 2.25, GMP 6.0.0a, ISL 0.14, MPC 1.0.3 and MPFR 3.1.2. I followed this procedure:

tar -xvf binutils-2.25.tar.bz2
tar -xvf gcc-5.1.0.tar.bz2
tar -xvf gmp-6.0.0a.tar.lz
tar -xvf isl-0.14.tar.bz2
tar -xvf mpc-1.0.3.tar.gz
tar -xvf mpfr-3.1.2.tar.xz

rootdir=`pwd`
ln -s $rootdir/gmp-6.0.0 gcc-5.1.0/gmp
ln -s $rootdir/isl-0.14 gcc-5.1.0/isl
ln -s $rootdir/mpc-1.0.3 gcc-5.1.0/mpc
ln -s $rootdir/mpfr-3.1.2 gcc-5.1.0/mpfr
ln -s $rootdir/binutils-2.25/bfd gcc-5.1.0/bfd
ln -s $rootdir/binutils-2.25/binutils gcc-5.1.0/binutils
ln -s $rootdir/binutils-2.25/gas gcc-5.1.0/gas
ln -s $rootdir/binutils-2.25/gold gcc-5.1.0/gold
ln -s $rootdir/binutils-2.25/gprof gcc-5.1.0/gprof
ln -s $rootdir/binutils-2.25/ld gcc-5.1.0/ld
ln -s $rootdir/binutils-2.25/opcodes gcc-5.1.0/opcodes

mkdir gcc51-build
cd gcc51-build
../gcc-5.1.0/configure --prefix=/opt/gcc-5.1
make bootstrap


The following error (shortened) is on the output:

make[3]: Entering directory `/home/ojakubcik/Downloads/gcc51-build'
rm -f stage_current
make[3]: Leaving directory `/home/ojakubcik/Downloads/gcc51-build'
make[2]: Leaving directory `/home/ojakubcik/Downloads/gcc51-build'
make[2]: Entering directory `/home/ojakubcik/Downloads/gcc51-build'
Configuring stage 2 in ./intl
configure: creating cache ./config.cache
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for x86_64-unknown-linux-gnu-gcc...  /home/ojakubcik/Downloads/gcc51-build/./prev-gcc/xgcc -B/home/ojakubcik/Downloads/gcc51-build/./prev-gcc/ -B/opt/gcc-5.1/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc-5.1/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc-5.1/x86_64-unknown-linux-gnu/lib/ -isystem /opt/gcc-5.1/x86_64-unknown-linux-gnu/include -isystem /opt/gcc-5.1/x86_64-unknown-linux-gnu/sys-include -L/home/ojakubcik/Downloads/gcc51-build/./ld   
checking for C compiler default output file name... 
configure: error: in `/home/ojakubcik/Downloads/gcc51-build/intl':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[2]: *** [configure-stage2-intl] Error 77
make[2]: Leaving directory `/home/ojakubcik/Downloads/gcc51-build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/ojakubcik/Downloads/gcc51-build'
make: *** [bootstrap] Error 2

The config.log file mentioned contains suspect:
configure:2978: checking for C compiler default output file name
configure:3000:  /home/ojakubcik/Downloads/gcc51-build/./prev-gcc/xgcc -B/home/ojakubcik/Downloads/gcc51-build/./prev-gcc/ -B/opt/gcc-5.1/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc-5.1/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc-5.1/x86_64-unknown-linux-gnu/lib/ -isystem /opt/gcc-5.1/x86_64-unknown-linux-gnu/include -isystem /opt/gcc-5.1/x86_64-unknown-linux-gnu/sys-include -L/home/ojakubcik/Downloads/gcc51-build/./ld    -g -O2 -gtoggle  -static-libstdc++ -static-libgcc  conftest.c  >&5
/home/ojakubcik/Downloads/gcc51-build/./prev-gcc/as: 106: exec: /home/ojakubcik/Downloads/gcc51-build/./gas/as-new: not found
configure:3004: $? = 1

config.log is attached.
Comment 1 Andrew Pinski 2022-01-08 03:52:30 UTC
This is what I have for a cross compiler (I have not tested building natively this way really):
lrwxrwxrwx  1 apinski apinski     20 Oct 26  2019 bfd -> ../gits/binutils/bfd
lrwxrwxrwx  1 apinski apinski     25 Oct 26  2019 binutils -> ../gits/binutils/binutils
lrwxrwxrwx  1 apinski apinski     23 Oct 26  2019 elfcpp -> ../gits/binutils/elfcpp
lrwxrwxrwx  1 apinski apinski     20 Oct 26  2019 gas -> ../gits/binutils/gas
lrwxrwxrwx  1 apinski apinski     21 Oct 26  2019 gold -> ../gits/binutils/gold
lrwxrwxrwx  1 apinski apinski     22 Oct 26  2019 gprof -> ../gits/binutils/gprof
lrwxrwxrwx  1 apinski apinski     19 Oct 26  2019 ld -> ../gits/binutils/ld
lrwxrwxrwx  1 apinski apinski     26 Oct 26  2019 libiberty -> ../gits/binutils/libiberty
lrwxrwxrwx  1 apinski apinski     24 Oct 26  2019 opcodes -> ../gits/binutils/opcodes
lrwxrwxrwx  1 apinski apinski     23 Nov 16  2019 gnulib -> ../gits/binutils/gnulib
lrwxrwxrwx  1 apinski apinski     23 Nov 16  2019 libctf -> ../gits/binutils/libctf
lrwxrwxrwx  1 apinski apinski     23 Nov 21  2019 ar-lib -> ../gits/binutils/ar-lib

There might be others that are needed too.
like include might be needed from binutils rather than GCC.