LinuxQuestions.org
Help answer threads with 0 replies.
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 07-26-2017, 03:25 PM   #1
LFS_Tester
LQ Newbie
 
Registered: Jul 2017
Posts: 5

Rep: Reputation: Disabled
LFS installation breaks in Binutils final compilation (Section 6.13)


Up to section 6.13 everything has been smooth with the LFS installation. In 6.13, when I run make for binutils, I get the following error:

Code:
mv -f .deps/errors.Tpo .deps/errors.Po
/bin/sh ../../gold/../ylwrap ../../gold/yyscript.y y.tab.c yyscript.c y.tab.h yyscript.h y.output yyscript.output -- /sources/binutils-2.27/missing bison -y -d 
/sources/binutils-2.27/missing: line 81: bison: command not found
WARNING: 'bison' is missing on your system.
         You should only need it if you modified a '.y' file.
         You may want to install the GNU Bison package:
         <http://www.gnu.org/software/bison/>
make[4]: *** [Makefile:931: yyscript.c] Error 127
make[4]: Leaving directory '/sources/binutils-2.27/build/gold'
make[3]: *** [Makefile:940: all-recursive] Error 1
make[3]: Leaving directory '/sources/binutils-2.27/build/gold'
make[2]: *** [Makefile:691: all] Error 2
make[2]: Leaving directory '/sources/binutils-2.27/build/gold'
make[1]: *** [Makefile:6079: all-gold] Error 2
make[1]: Leaving directory '/sources/binutils-2.27/build'
make: *** [Makefile:851: all] Error 2
Up to this point, I have not deviated from the LFS book. The only change I made was in section 6.2 where I had to change the mount command from
Code:
mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620
to
Code:
mount -v --bind /dev/pts $LFS/dev/pts -o gid=5,mode=620
as the original command from the book would break the glibc installation.

The version-check of my host system also seems sufficient:
Code:
bash version-check.sh
bash, version 4.3.48(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.26.1
bison (GNU Bison) 3.0.4
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.25
diff (GNU diffutils) 3.3
find (GNU findutils) 4.7.0-git
GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
(Ubuntu GLIBC 2.23-0ubuntu5) 2.23
grep (GNU grep) 2.25
gzip 1.6
Linux version 4.8.0-36-generic (buildd@lgw01-18) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #36~16.04.1-Ubuntu SMP Sun Feb 5 09:39:57 UTC 2017
m4 (GNU M4) 1.4.17
GNU Make 4.1
GNU patch 2.7.5
Perl version='5.22.1';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.28
texi2any (GNU texinfo) 6.1
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
 
Old 07-26-2017, 05:53 PM   #2
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
I don't know which version of LFS you are trying to build, but it seems to me you're trying to include gold linker. That was just recently added, and the order of the packages was properly adjusted, and even bison was added into chapter 5. If the problem persists, try using --disable-gold, or remove any *-gold flag if you have any, but have not yet adjusted to new package order, or have bison installed in chapter 5.
 
Old 07-27-2017, 08:30 AM   #3
LFS_Tester
LQ Newbie
 
Registered: Jul 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Krejzi View Post
I don't know which version of LFS you are trying to build, but it seems to me you're trying to include gold linker. That was just recently added, and the order of the packages was properly adjusted, and even bison was added into chapter 5. If the problem persists, try using --disable-gold, or remove any *-gold flag if you have any, but have not yet adjusted to new package order, or have bison installed in chapter 5.
I am using LFS8 (stable): http://www.linuxfromscratch.org/lfs/...ble/index.html
I tried it with --disable-gold and there didn't seem to be any errors.
 
Old 07-27-2017, 08:49 AM   #4
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
Quote:
Originally Posted by LFS_Tester View Post
I am using LFS8 (stable): http://www.linuxfromscratch.org/lfs/...ble/index.html
I tried it with --disable-gold and there didn't seem to be any errors.
Check if /tools/bin/bison exists, it was added in chapter 5 just before 8.0 release
 
Old 07-27-2017, 10:42 PM   #5
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Slightly off topic, but I am curious about this:
Quote:
Originally Posted by LFS_Tester View Post
Up to this point, I have not deviated from the LFS book. The only change I made was in section 6.2 where I had to change the mount command from
Code:
mount -vt devpts devpts $LFS/dev/pts -o gid=5,mode=620
to
Code:
mount -v --bind /dev/pts $LFS/dev/pts -o gid=5,mode=620
as the original command from the book would break the glibc installation.
I just completed the dev branch (20170723-systemd) and had no problems. Mind posting how the book version of the mount command would break glibc?
 
Old 07-28-2017, 02:58 AM   #6
slakdrax
LQ Newbie
 
Registered: Jul 2017
Location: Aberdeen, Scotland
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
I too am following the LFS 8.0 current stable (not systemd) book and have bumped into an issue checking the build of "bunutils 2.27".

The base system is Slackware 14.1 (i386), the build of the "tools" went OK (I think), and CHROOT into the final emvironment. Build and check of items to "binutils 2.27" appears to have been successful. The binutils build also went fine as no errors jumped at me.

However, the "gold" issue crops up during the check phase of binutils with the following:

==================
All 3 tests passed
==================
make[5]: Leaving directory '/usr/src/source/binutils-2.27/build/gold'
make[4]: Leaving directory '/usr/src/source/binutils-2.27/build/gold'
make[3]: Leaving directory '/usr/src/source/binutils-2.27/build/gold'
make[2]: *** [Makefile:940: check-recursive] Error 1
make[2]: Target 'check' not remade because of errors.
make[2]: Leaving directory '/usr/src/source/binutils-2.27/build/gold'
make[1]: *** [Makefile:6133: check-gold] Error 2
make[2]: Entering directory '/usr/src/source/binutils-2.27/build/gprof'
make check-recursive
make[3]: Entering directory '/usr/src/source/binutils-2.27/build/gprof'
Making check in po
make[4]: Entering directory '/usr/src/source/binutils-2.27/build/gprof/po'
make[4]: Nothing to be done for 'check'.

snipped until the end ....

make[3]: Leaving directory '/usr/src/source/binutils-2.27/build/libiberty/testsuite'
make[2]: Leaving directory '/usr/src/source/binutils-2.27/build/libiberty'
make[1]: Target 'check-host' not remade because of errors.
make[1]: Nothing to be done for 'check-target'.
make[1]: Leaving directory '/usr/src/source/binutils-2.27/build'
make: *** [Makefile:2205: do-check] Error 2
make: Target 'check' not remade because of errors.


I will go away and build binutils using "disable-gold" as noted above and let you know how the check turns out.
 
Old 07-28-2017, 04:10 AM   #7
Krejzi
Member
 
Registered: Jan 2015
Posts: 215

Rep: Reputation: Disabled
make -k check is used, which means "don't stop on errors". Error was probably expected. Feel free to ignore it
 
Old 07-28-2017, 05:25 AM   #8
slakdrax
LQ Newbie
 
Registered: Jul 2017
Location: Aberdeen, Scotland
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
Many thanks. I did not know what the "-k" meant.

I put it back the way it was and will go ahead with the rest of the builds for the system.
 
Old 07-31-2017, 11:26 PM   #9
Rustman
LQ Newbie
 
Registered: Jul 2017
Posts: 10

Rep: Reputation: Disabled
I just put together my LFS build within the last week, and, in my experience, the tests throw a ton of errors. Generally, if they are at the end when its leaving the build directory, like this...

Quote:
make[1]: Leaving directory '/usr/src/source/binutils-2.27/build'
... its no problem. Just expect it to fail out at the end of testing. Why? I have no idea, but a majority of them do, and it didn't have any measurable effect on my build. Mine works just fine.
 
  


Reply

Tags
binutils, lfs, lfs error



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 7.7 Section 5.9 (binutils second pass) error during make thegoofeedude Linux From Scratch 8 09-08-2015 04:28 AM
[SOLVED] LFS: Error during Linux-3.5.2 kernel compilation (LFS 7.2, Section 8.3) erkant Linux From Scratch 10 11-30-2012 02:44 PM
[SOLVED] LFS: Error during Binutils-2.22 - Pass 1 (Section 5.4, LFS 7.2) erkant Linux From Scratch 4 11-26-2012 01:26 PM
[SOLVED] LFS 7.2, chapter 5., section 5.4.1 Installation of Cross Binutils Lakhan Kumar Linux From Scratch 7 11-12-2012 04:22 PM
LFS 6.3 - binutils 2.17 installation seb_01630 Linux From Scratch 5 07-31-2008 06:52 AM

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

All times are GMT -5. The time now is 03:12 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