LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-24-2019, 06:31 PM   #1
davecan
Member
 
Registered: Nov 2019
Posts: 45

Rep: Reputation: Disabled
LFS 9.0: Cannot make gcc, multiple errors in config.log


Working through the current LFS 9.0 tutorial and have encountered a hard error in section 5.5.1, compiling GCC.

Background: The host environment is a Vagrant VM (on a Mac) running Ubuntu 18.04.3 LTS Bionic with 30GB space. I was a developer but have essentially no Linux or C++ experience beyond a C++ class in college a few years ago, so I can bob my head along and follow a discussion generally but can't do them per se.

When running make (towards the end of 5.5) I get the following error at the end after about 15 minutes:

Code:
checking for suffix of object files... configure: error: in `/mnt/lfs/sources/gcc-9.2.0/build/x86_64-lfs-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
Makefile:12427: recipe for target 'configure-target-libgcc' failed
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/gcc-9.2.0/build'
Makefile:939: recipe for target 'all' failed
make: *** [all] Error 2
Googling about a bit I came to an older post here trying to debug a similar issue. From there I checked this SO answer which had a tiny link to this GCC FAQ entry which discusses the specific error a bit.

From reading over the GCC FAQ I ran a
Code:
grep -n error config.log
(from the /mnt/lfs/sources/gcc-9.2.0/build dir) and got the following relevant lines:

Code:
     86 x86_64-linux-gnu
     87 Thread model: posix
     88 gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
     89 configure:4356: $? = 0
     90 configure:4345: gcc -V >&5
     91 gcc: error: unrecognized command line option '-V'
     92 gcc: fatal error: no input files
     93 compilation terminated.
     94 configure:4356: $? = 1
     95 configure:4345: gcc -qversion >&5
     96 gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
     97 gcc: fatal error: no input files
     98 compilation terminated.

    ... 

    150 x86_64-linux-gnu
    151 Thread model: posix
    152 gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
    153 configure:4953: $? = 0
    154 configure:4942: g++ -V >&5
    155 g++: error: unrecognized command line option '-V'
    156 g++: fatal error: no input files
    157 compilation terminated.
    158 configure:4953: $? = 1
    159 configure:4942: g++ -qversion >&5
    160 g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
    161 g++: fatal error: no input files
    162 compilation terminated.

    ...

    186 configure:6007: checking for isl 0.15 or later
    187 configure:6020: gcc -o conftest -g -O2  -I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src -I$$s/mp    187 c/src     -lisl -L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/mpfr/src/.libs -L$$r/$(HOST_SUBDIR)/mpc/src/.libs -lmpc -lmp    187 fr -lgmp conftest.c  -lisl -lgmp >&5
    188 conftest.c:10:10: fatal error: isl/schedule.h: No such file or directory
    189  #include <isl/schedule.h>
    190           ^~~~~~~~~~~~~~~~
    191 compilation terminated.
So it looks like I've got two main problems:
  • two unrecognized references to "qversion"
  • missing "isl" directory (wherever it is supposed to be) and specifically missing file "isl/schedule.h"

I did a find . -type d -name "*isl*" -print (think the syntax is right, snagged from SO) and got nothing, so there's no "isl" directory anywhere under /mnt/lfs/sources/gcc-9.2.0.

Looking for the "qversion" reference (thinking it was a typo I could correct) led me to this SO answer which implies the Ubuntu host GCC may be outdated.

For ref the Ubuntu host GCC version is: gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

Which is interesting since I'm trying to Compile GCC 9.2.0... But per section 2.2 I should be good to go with anything above 6.2.

So at this point I'm not sure what the solution is for those two problems, if those are in fact the actual problems. Should I apt-get a newer version of GCC (but not above 9.2.0, per section 2.2) ? Or do something else?

If anyone has any insight I'd greatly appreciate it. Thanks in advance.
 
Old 11-25-2019, 10:15 AM   #2
rsmereka
Member
 
Registered: Jul 2003
Location: Southwestern Ontario, Canada
Distribution: LFS, OpenBSD, UBPorts, MX, Gentoo
Posts: 85
Blog Entries: 3

Rep: Reputation: 17
Preamble:
I have no knowledge of Vagrant. I have never used it.

Things to check:

I have used Ubuntu as a host for LFS (in the past) and I know that stock Ubuntu OOTB needs modifications to satisfy the minimum host requirements. Did you run 'version-check.sh' from chapter 2.2. on the host before you started and resolved the errors that I know occur?

This also could be some sort of interaction between Ubuntu (the build host) and Vagrant. I try not to over-complicate my LFS builds (host running from a USB stick and compiling to an installed hard drive).
 
Old 11-25-2019, 11:02 AM   #3
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
Hi rsmereka thanks for the reply.

Vagrant shouldn't be a factor here because all Vagrant does is provide a wrapper for managing VMs in VirtualBox using the command line and configuration-as-code. Ubuntu is just a guest VM, it doesn't even know Vagrant exists. At least I wouldn't think it would be an issue, I'm just reporting for thoroughness.

What Ubuntu tweaks were necessary? If there is a better distro to use I can certainly try that.

Yes I did run version-check.sh, multiple times in fact, and cross-checked the versions reported against the versions listed in 2.2. I just ran it again and confirmed the versions from the Ubuntu host are within the parameters required by 2.2.

Note I also had previously redirected /bin/sh to /bin/bash instead of the default /bin/dash, before attempting any compilations.

Code:
lfs@lfs-host:/mnt/lfs$ bash version-check.sh
bash, version 4.4.20(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils) 2.32
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.28
diff (GNU diffutils) 3.6
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
(Ubuntu GLIBC 2.27-3ubuntu1) 2.27
grep (GNU grep) 3.1
gzip 1.6
Linux version 4.15.0-43-generic (buildd@lgw01-amd64-001) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018
m4 (GNU M4) 1.4.18
GNU Make 4.1
GNU patch 2.7.6
Perl version='5.26.1';
Python 3.6.8
sed (GNU sed) 4.4
tar (GNU tar) 1.29
texi2any (GNU texinfo) 6.5
xz (XZ Utils) 5.2.2
g++ compilation OK
One thing I did do "extra" was created a symlink for /usr/bin/texinfo -> /usr/bin/texi2any since it was specifically stating it wanted texinfo but Ubuntu provided texi2any instead. Not sure if that would cause an issue, I can remove it if so.
 
Old 11-25-2019, 11:11 AM   #4
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
One interesting bit I've noticed: Despite creating a separate lfs user I still routinely need to sudo many of the commands to get them to work. This is after I chown'd the /mnt/lfs to lfs and even did a chmod -R 777 /mnt/lfs.

Not sure what the underlying problem is, but it seems counter to what the LFS book states. From what I recall reading it should not need sudo unless explicitly stated in the text.
 
Old 11-25-2019, 11:11 AM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Are you sure you had the three libraries mpc, mpfr and gmp unpacked in the gcc directory?
 
Old 11-25-2019, 11:25 AM   #6
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
hazel: Yes they were unpacked into the /mnt/lfs/sources/gcc-9.2.0 directory.

Here are the contents with those dirs highlighted in bold:

Code:
lfs@lfs-host:/mnt/lfs/sources/gcc-9.2.0$ ls -l
total 12120
-rw-rw-r--  1 lfs lfs   38475 Jul  4  2003 ABOUT-NLS
-rw-rw-r--  1 lfs lfs   18002 Jul 14  2005 COPYING
-rw-rw-r--  1 lfs lfs   26527 Jul 14  2005 COPYING.LIB
-rw-rw-r--  1 lfs lfs    3324 Apr  9  2009 COPYING.RUNTIME
-rw-rw-r--  1 lfs lfs   35147 Jul 17  2007 COPYING3
-rw-rw-r--  1 lfs lfs    7639 Jul 17  2007 COPYING3.LIB
-rw-rw-r--  1 lfs lfs  625855 Aug 12 07:38 ChangeLog
-rw-rw-r--  1 lfs lfs     729 Nov 11  2014 ChangeLog.jit
-rw-rw-r--  1 lfs lfs    3262 May 13  2004 ChangeLog.tree-ssa
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:40 INSTALL
-rw-rw-r--  1 lfs lfs      58 Aug 12 07:40 LAST_UPDATED
-rw-rw-r--  1 lfs lfs   28024 Apr 22  2019 MAINTAINERS
-rw-rw-r--  1 lfs lfs 6976678 Aug 12 07:58 MD5SUMS
-rw-rw-r--  1 lfs lfs   29964 Oct 28  2018 Makefile.def
-rw-rw-r--  1 lfs lfs 2000753 Apr  9  2019 Makefile.in
-rw-rw-r--  1 lfs lfs   73181 Apr  9  2019 Makefile.tpl
-rw-rw-r--  1 lfs lfs  924100 Aug 12 07:41 NEWS
-rw-rw-r--  1 lfs lfs    1026 Jul 16  2012 README
-rwxrwxr-x  1 lfs lfs    5826 Oct 31  2018 ar-lib
drwxrwxr-x 17 lfs lfs    4096 Nov 24 23:27 build
-rwxrwxr-x  1 lfs lfs    7333 Nov 16  2014 compile
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 config
-rw-rw-r--  1 lfs lfs   25713 Oct 28  2018 config-ml.in
-rwxrwxr-x  1 lfs lfs   44973 Jan  3  2019 config.guess
-rwxrwxr-x  1 lfs lfs   14916 Feb 13  2011 config.rpath
-rwxrwxr-x  1 lfs lfs   31537 Jan  3  2019 config.sub
-rwxrwxr-x  1 lfs lfs  496920 Apr 14  2019 configure
-rw-rw-r--  1 lfs lfs  113986 Apr 14  2019 configure.ac
drwxr-xr-x  7 lfs lfs    4096 Aug 12 07:39 contrib
-rwxrwxr-x  1 lfs lfs   22464 Nov 16  2014 depcomp
drwxr-xr-x  3 lfs lfs    4096 Aug 12 07:40 fixincludes
drwxr-xr-x 20 lfs lfs   36864 Aug 12 07:41 gcc
drwxr-xr-x 15 lfs lfs    4096 Dec 16  2016 gmp
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 gnattools
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 gotools
drwxr-xr-x  3 lfs lfs    4096 Aug 12 07:39 include
-rwxrwxr-x  1 lfs lfs   14675 Nov 16  2014 install-sh
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 intl
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:40 libada
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:39 libatomic
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 libbacktrace
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 libcc1
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:40 libcpp
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:39 libdecnumber
drwxr-xr-x  8 lfs lfs    4096 Aug 12 07:40 libffi
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:39 libgcc
drwxr-xr-x 10 lfs lfs    4096 Aug 12 07:40 libgfortran
drwxr-xr-x  7 lfs lfs    4096 Aug 12 07:40 libgo
drwxr-xr-x  5 lfs lfs    4096 Aug 12 07:42 libgomp
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:40 libhsail-rt
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:39 libiberty
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:55 libitm
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:40 libobjc
drwxr-xr-x  6 lfs lfs    4096 Aug 12 07:39 liboffloadmic
drwxr-xr-x  6 lfs lfs    4096 Aug 12 07:39 libphobos
drwxr-xr-x  5 lfs lfs    4096 Aug 12 07:55 libquadmath
drwxr-xr-x 11 lfs lfs    4096 Aug 12 07:39 libsanitizer
drwxr-xr-x  3 lfs lfs    4096 Aug 12 07:40 libssp
drwxr-xr-x 11 lfs lfs    4096 Aug 12 07:39 libstdc++-v3
-rwxrwxr-x  1 lfs lfs    3468 Apr 17  2014 libtool-ldflags
-rw-rw-r--  1 lfs lfs  263888 Oct 31  2018 libtool.m4
drwxr-xr-x  4 lfs lfs    4096 Aug 12 07:40 libvtv
-rw-rw-r--  1 lfs lfs    1768 Sep 26  2008 ltgcc.m4
-rw-rw-r--  1 lfs lfs  249737 Jul  5  2018 ltmain.sh
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 lto-plugin
-rw-rw-r--  1 lfs lfs   11950 Dec  5  2009 ltoptions.m4
-rw-rw-r--  1 lfs lfs    4372 Sep 26  2008 ltsugar.m4
-rw-rw-r--  1 lfs lfs     703 Dec  5  2009 ltversion.m4
-rw-rw-r--  1 lfs lfs    6126 Dec  5  2009 lt~obsolete.m4
drwxr-xr-x  2 lfs lfs    4096 Aug 12 07:39 maintainer-scripts
-rwxrwxr-x  1 lfs lfs    6872 Nov 16  2014 missing
-rwxrwxr-x  1 lfs lfs    2179 Jul 22  2000 mkdep
-rwxrwxr-x  1 lfs lfs    3538 Nov 16  2014 mkinstalldirs
-rwxrwxr-x  1 lfs lfs    2636 Nov 16  2014 move-if-change
drwxr-xr-x  7 lfs lfs    4096 Jan 11  2018 mpc
drwxr-xr-x  9 lfs lfs    4096 Jan 31  2019 mpfr
-rw-rw-r--  1 lfs lfs    1608 Oct 31  2018 multilib.am
-rwxrwxr-x  1 lfs lfs    2265 Jul 14  2005 symlink-tree
-rwxrwxr-x  1 lfs lfs    4641 Oct 31  2018 test-driver
-rwxrwxr-x  1 lfs lfs    6421 Nov 16  2014 ylwrap
drwxr-xr-x 14 lfs lfs    4096 Aug 12 07:39 zlib
I used the wget scripts from the LFS (chapter 2 I think?) to download all the sources.

For good measure, here's the contents of /mnt/lfs/sources/gcc-9.2.0/build:

Code:
lfs@lfs-host:/mnt/lfs/sources/gcc-9.2.0$ ls -l build
total 700
-rw-r--r--  1 root root 539389 Nov 24 22:53 Makefile
drwxr-xr-x  5 lfs  lfs    4096 Nov 24 23:15 build-x86_64-pc-linux-gnu
-rw-rw-r--  1 lfs  lfs   30854 Nov 24 22:53 config.log
-rwxr-xr-x  1 root root  38375 Nov 24 22:53 config.status
drwxr-xr-x  2 lfs  lfs    4096 Nov 24 23:13 fixincludes
drwxr-xr-x 20 lfs  lfs   36864 Nov 24 23:27 gcc
drwxr-xr-x 15 lfs  lfs    4096 Nov 24 23:14 gmp
drwxr-xr-x  2 lfs  lfs    4096 Nov 24 23:13 intl
drwxr-xr-x  3 lfs  lfs    4096 Nov 24 23:15 libbacktrace
drwxr-xr-x  4 lfs  lfs    4096 Nov 24 23:27 libcc1
drwxr-xr-x  3 lfs  lfs    4096 Nov 24 23:15 libcpp
drwxr-xr-x  2 lfs  lfs    4096 Nov 24 23:15 libdecnumber
drwxr-xr-x  4 lfs  lfs    4096 Nov 24 23:13 libiberty
drwxr-xr-x  3 lfs  lfs    4096 Nov 24 23:15 lto-plugin
drwxr-xr-x  6 lfs  lfs    4096 Nov 24 23:14 mpc
drwxr-xr-x  7 lfs  lfs    4096 Nov 24 23:14 mpfr
-rw-r--r--  1 root root     13 Nov 24 22:53 serdep.tmp
drwxr-xr-x  3 lfs  lfs    4096 Nov 24 23:27 x86_64-lfs-linux-gnu
drwxr-xr-x  3 lfs  lfs    4096 Nov 24 23:15 zlib
EDIT: For good measure I renamed those three dirs, removed the build dir, then followed the instructions in 5.5.1 again to untar those three libs into the gcc dir, rerun the scripts in 5.5.1 and am currently re-running make. We'll see what happens.

Last edited by davecan; 11-25-2019 at 11:34 AM.
 
Old 11-25-2019, 11:37 AM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
I asked because absence of one of these libraries is known to cause this problem. Yours however seems to be linked to libgcc.

The gcc build is unusual in that it has more than one configuration stage (binutils does the same). Each stage has its own configure log. Could you search for extra config.logs using the find -name config.log command? You might find a more informative log.
 
Old 11-25-2019, 11:44 AM   #8
rsmereka
Member
 
Registered: Jul 2003
Location: Southwestern Ontario, Canada
Distribution: LFS, OpenBSD, UBPorts, MX, Gentoo
Posts: 85
Blog Entries: 3

Rep: Reputation: 17
>What Ubuntu tweaks were necessary?
If I remember correctly, /bin/sh points to dash, not bash and texinfo is not installed.

>If there is a better distro to use I can certainly try that.
Personal preference. I currently use MX Linux, it needs more modifications than Ubuntu but is not as heavy as Ubuntu, has no running systemd and has way better support for 32bit.

>One thing I did do "extra" was created a symlink for /usr/bin/texinfo -> /usr/bin/texi2any >since it was specifically stating it wanted texinfo but Ubuntu provided texi2any instead. >Not sure if that would cause an issue, I can remove it if so.
I never thought of simply creating a symbolic link to texi2any calling it texinfo. I would install the texinfo package which is in the 'universe' repository (which is not turned on by default).

I read through the gcc wiki FAQ that you provided and that leads me to 'mpfr', 'gmp' and 'mpc'. These three packages are required to be present in the root gcc directory ($LFS/sources/gcc-9.2.0). After you un-tar gcc to the 'sources' directory, the first thing you do is to un-tar those three packages into the gcc directory and rename their folders to remove the version numbers. Check your gcc directory. You should have three folders there 'mpfr', 'gmp' and 'mpc'. My suggestion is to remove the entire gcc directory and start again.
 
Old 11-25-2019, 11:47 AM   #9
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
Will do, once compilation completes or fails again.

During exploration earlier I did find multiple config.log files but wasn't sure how far to explore down that rabbit hole, given I've never really used gcc before.

What is the TLDR of the "more than one configuration stage" in gcc/binutils compilation? What are the purposes of the stages? I understand the theory and basic construction of compilers (e.g. frontend -> intermediate representation -> backend -> machine code) but I'm not familiar with compilation in *nix so not familiar with the configure file or this gcc process at all, this is really my first stab at really diving into linux and its toolset beyond looking up basic commands as needed a handful of times over the years. I intend to go back and study something like LLTHW for everyday working knowledge but figured the best way to start is to dive deep into it with LFS first then build up from there.

Thanks!
 
Old 11-25-2019, 11:48 AM   #10
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
Compilation failed again, same error.

Here's the config.log files:

Code:
lfs@lfs-host:/mnt/lfs/sources/gcc-9.2.0/build$ find -name config.log
./libdecnumber/config.log
./libcpp/config.log
./libiberty/config.log
./libbacktrace/config.log
./fixincludes/config.log
./zlib/config.log
./mpfr/config.log
./gmp/config.log
./intl/config.log
./lto-plugin/config.log
./mpc/config.log
./config.log
./x86_64-lfs-linux-gnu/libgcc/config.log
./build-x86_64-pc-linux-gnu/libcpp/config.log
./build-x86_64-pc-linux-gnu/libiberty/config.log
./build-x86_64-pc-linux-gnu/fixincludes/config.log
./libcc1/config.log
./gcc/config.log
Any particular one(s) I should focus on?
 
Old 11-25-2019, 11:55 AM   #11
rsmereka
Member
 
Registered: Jul 2003
Location: Southwestern Ontario, Canada
Distribution: LFS, OpenBSD, UBPorts, MX, Gentoo
Posts: 85
Blog Entries: 3

Rep: Reputation: 17
I also noted the date on the files. I really recommend that you 'rm -rvf' on that gcc directory. It is also not a good idea to use the same directory multiple number of times.
 
Old 11-25-2019, 12:01 PM   #12
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
Hi rsmereka, I was thinking along the same lines and had already wiped the build dir, redeployed those three libs and restarted the compilation which failed again as above unfortunately.

Regarding texinfo, I removed the symlink but apt-get refuses to install texinfo. Apparently the universe repo is already enabled (per output from sudo add-apt-repository universe) and I'm already at the latest version of texinfo, despite texinfo not being anywhere on my path:

Code:
lfs@lfs-host:/mnt/lfs/sources/gcc-9.2.0/build$ sudo apt-get install texinfo
Reading package lists... Done
Building dependency tree
Reading state information... Done
texinfo is already the newest version (6.5.0.dfsg.1-2).
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
lfs@lfs-host:/mnt/lfs/sources/gcc-9.2.0/build$ which texinfo
lfs@lfs-host:/mnt/lfs/sources/gcc-9.2.0/build$ <empty line here>
I'm assuming this is because texi2any is "GNU texinfo" ?

Ran apt list --installed | grep texinfo with result texinfo/bionic,now 6.5.0.dfsg.1-2 amd64 [installed] and no indication that it is in fact texi2any.

Reaching the very edge of my knowledge here -- not sure if a package name in the apt list has to match the command name deployed on the filesystem, i.e. should there be a texi2any entry in the apt installed list? Or can the package be named texinfo/bionic in the apt installed list but the package actually deploys the texi2any command on the filesystem? (assuming the latter)

So I don't see a way to install texinfo itself through apt, since it says it is already on my system. Am I misunderstanding something?
 
Old 11-25-2019, 12:03 PM   #13
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rsmereka View Post
I also noted the date on the files. I really recommend that you 'rm -rvf' on that gcc directory. It is also not a good idea to use the same directory multiple number of times.
Just saw this, doing that now. Will redo section 5.5 again and see what happens. thanks.

Result of the command to change GCC default dynamic linker:

Code:
'gcc/config/linux.h' -> 'gcc/config/linux.h.orig'
'gcc/config/i386/linux.h' -> 'gcc/config/i386/linux.h.orig'
'gcc/config/i386/linux64.h' -> 'gcc/config/i386/linux64.h.orig'
Rerunning make now.

Last edited by davecan; 11-25-2019 at 12:07 PM.
 
Old 11-25-2019, 12:06 PM   #14
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,659
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Look in the libgcc config.log. You might find something useful there, since the error message mentioned libgcc.

Rsmereka is right about not doing multiple builds in the same directory. Before restarting, you need to delete the entire gcc directory (not just the build directory), then untar it afresh, copy the three maths libraries into it, do all the fiddly configuration, then build.

I am going through the official build log to see if I can find anything relevant.

Nope, nothing! Ironically libgcc is one of the last things to be built.

Last edited by hazel; 11-25-2019 at 12:15 PM.
 
Old 11-25-2019, 12:35 PM   #15
davecan
Member
 
Registered: Nov 2019
Posts: 45

Original Poster
Rep: Reputation: Disabled
Well, even after removing the entire gcc dir and recreating as mentioned above the make errored out again, I still get the exact same errors:

Code:
checking for suffix of object files... configure: error: in `/mnt/lfs/sources/gcc-9.2.0/build/x86_64-lfs-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
Makefile:12427: recipe for target 'configure-target-libgcc' failed
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/gcc-9.2.0/build'
Makefile:939: recipe for target 'all' failed
make: *** [all] Error 2

Hazel: There is no "libgcc config.log" but I see ./libcc1/config.log and ./gcc/config.log files so I checked them both.

Result of grep -n error ./libcc1/config.log:

Code:
63:Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
68:gcc: error: unrecognized command line option '-V'
69:gcc: fatal error: no input files
73:gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
74:gcc: fatal error: no input files
119:conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory
138:conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory
203:conftest.c:52:10: fatal error: minix/config.h: No such file or directory
264:conftest.c:19:10: fatal error: minix/config.h: No such file or directory
427:Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
432:g++: error: unrecognized command line option '-V'
433:g++: fatal error: no input files
437:g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
438:g++: fatal error: no input files
455:conftest.cpp:26:10: fatal error: ac_nonexistent.h: No such file or directory
491:conftest.cpp:26:10: fatal error: ac_nonexistent.h: No such file or directory
581:collect2: error: ld returned 1 exit status
611:| /* Override any GCC internal prototype to avoid an error.
Result of grep -n error ./gcc/config.log:

Code:
78:gcc: error: unrecognized command line option '-V'
79:gcc: fatal error: no input files
83:gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
84:gcc: fatal error: no input files
134:Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.4.0-1ubuntu1~18.04.1' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
139:g++: error: unrecognized command line option '-V'
140:g++: fatal error: no input files
144:g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
145:g++: fatal error: no input files
166:conftest.cpp:9:10: fatal error: ac_nonexistent.h: No such file or directory
185:conftest.cpp:9:10: fatal error: ac_nonexistent.h: No such file or directory
250:conftest.cpp:52:10: fatal error: minix/config.h: No such file or directory
311:conftest.cpp:19:10: fatal error: minix/config.h: No such file or directory
347:conftest.c:24:10: fatal error: ac_nonexistent.h: No such file or directory
381:conftest.c:24:10: fatal error: ac_nonexistent.h: No such file or directory
450:conftest.cpp:64:14: error: expected primary-expression before 'long'
453:conftest.cpp:64:14: error: expected ')' before 'long'
454:conftest.cpp:65:14: error: expected ')' before ';' token
457:conftest.cpp:65:14: error: expected ')' before ';' token
540:conftest.cpp:68:56: error: size of array 'test_array' is negative
625:conftest.cpp:68:58: error: size of array 'test_array' is negative
713:conftest.cpp:68:58: error: size of array 'test_array' is negative
801:conftest.cpp:68:58: error: size of array 'test_array' is negative
896:conftest.cpp:68:22: error: expected primary-expression before ')' token
979:conftest.cpp:69:22: error: expected primary-expression before ')' token
1079:conftest.cpp:70:23: error: expected primary-expression before ')' token
1164:conftest.cpp:71:23: error: expected primary-expression before ')' token
1255:conftest.cpp:40:2: error: #error compiler not affected by placement new aliasing bug
1256: #error compiler not affected by placement new aliasing bug
1299:| #error compiler not affected by placement new aliasing bug
1373:conftest.cpp:75:10: fatal error: valgrind.h: No such file or directory
1457:conftest.cpp:42:10: fatal error: valgrind.h: No such file or directory
1510:conftest.cpp:42:10: fatal error: valgrind/memcheck.h: No such file or directory
1559:| #error VALGRIND_DISCARD not defined
1564:conftest.cpp:42:10: fatal error: memcheck.h: No such file or directory
1613:| #error VALGRIND_DISCARD not defined
1730:conftest.cpp:72:10: fatal error: direct.h: No such file or directory
1819:conftest.cpp:74:10: fatal error: ldfcn.h: No such file or directory
1910:conftest.cpp:76:10: fatal error: thread.h: No such file or directory
2001:conftest.cpp:77:9: error: expected unqualified-id before 'not' token
2090:conftest.cpp:83:8: error: 'big' was not declared in this scope
2189:conftest.cpp:76:10: fatal error: ac_nonexistent.h: No such file or directory
2297:collect2: error: ld returned 1 exit status
2379:| /* Override any GCC internal prototype to avoid an error.
2395:collect2: error: ld returned 1 exit status
2477:| /* Override any GCC internal prototype to avoid an error.
2493:collect2: error: ld returned 1 exit status
2575:| /* Override any GCC internal prototype to avoid an error.
2591:collect2: error: ld returned 1 exit status
2673:| /* Override any GCC internal prototype to avoid an error.
2689:collect2: error: ld returned 1 exit status
2771:| /* Override any GCC internal prototype to avoid an error.
2790:collect2: error: ld returned 1 exit status
2872:| /* Override any GCC internal prototype to avoid an error.
2888:collect2: error: ld returned 1 exit status
2970:| /* Override any GCC internal prototype to avoid an error.
2989:collect2: error: ld returned 1 exit status
3071:| /* Override any GCC internal prototype to avoid an error.
3087:collect2: error: ld returned 1 exit status
3169:| /* Override any GCC internal prototype to avoid an error.
3195:collect2: error: ld returned 1 exit status
3277:| /* Override any GCC internal prototype to avoid an error.
3322:collect2: error: ld returned 1 exit status
3426:| /* Override any GCC internal prototype to avoid an error.
3496:configure:9850: checking for ferror_unlocked
3523:collect2: error: ld returned 1 exit status
3644:| /* Override any GCC internal prototype to avoid an error.
3728:conftest.cpp:148:21: error: expected primary-expression before ')' token
3891:conftest.cpp:148:21: error: expected primary-expression before ')' token
4068:conftest.cpp:151:19: error: expected primary-expression before ')' token
4231:conftest.cpp:115:10: fatal error: vfork.h: No such file or directory
4558:configure:11158: checking whether ferror_unlocked is declared
4581:conftest.cpp:174:28: error: 'fprintf_unlocked' was not declared in this scope
4818:conftest.cpp:192:28: error: 'ldgetname' was not declared in this scope
5147:conftest.cpp:189:10: fatal error: ac_nonexistent.h: No such file or directory
5542:collect2: error: ld returned 1 exit status
5763:collect2: error: ld returned 1 exit status
6106:ac_cv_func_ferror_unlocked=yes
6346:gcc_cv_have_decl_ferror_unlocked=yes
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
LFS 6.3 .... 6.12.1. Installation of GCC make errors Axo Linux From Scratch 4 03-29-2008 02:18 AM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM
Multiple errors in config.log after ./configure for GLIB 2.4.4 eckerww Linux - Software 0 07-22-2004 10:55 PM
LFS Chap 5 - gcc first make command errors antken Linux From Scratch 3 03-17-2003 10:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration