LinuxQuestions.org
Visit Jeremy's Blog.
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 01-29-2019, 11:36 AM   #1
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Rep: Reputation: Disabled
gcc-8.2.0 build fails(LFS v8.3)


When executing the make command to build gcc-8.2.0 in LFS version 8.3, I get the following error.

Code:
msgfmt: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
The build for any previous packages(in order) have not failed. It is just gcc now that fails.

Any help?

Thanks.
 
Old 01-29-2019, 12:42 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi
What chapter are you on? ch5 or ch6.
"libxml2.so.2" comes from libxml2 which is part of BLFS which you dont need yet.

Which Host are you using?
 
Old 01-29-2019, 12:46 PM   #3
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
I am on chapter 6 and I am logged in as the root user after chrooting.
My host system is running on Ubuntu 18.04

Here is the version check output.

Last edited by invinciblycool; 01-29-2019 at 12:52 PM. Reason: Add version check output
 
Old 01-29-2019, 12:56 PM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Have you rebooted or restarted th host system since you started ch6?
 
Old 01-29-2019, 12:58 PM   #5
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
Yes, but I have mounted /dev and virtual kernel file systems, if that concerns you.
 
Old 01-29-2019, 01:07 PM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Can you post more of the make fail about 30 lines above till the end. Put in between code tags please.
To be honest I have not seen this error before.
 
Old 01-29-2019, 01:09 PM   #7
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
More of the error traceback:

Code:
Making all in po
make[4]: Entering directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libstdc++-v3/po'
msgfmt -o de.mo ../../../../libstdc++-v3/po/de.po
msgfmt: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory
make[4]: *** [Makefile:498: de.mo] Error 127
make[4]: Leaving directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libstdc++-v3/po'
make[3]: *** [Makefile:511: all-recursive] Error 1
make[3]: Leaving directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libstdc++-v3'
make[2]: *** [Makefile:418: all] Error 2
make[2]: Leaving directory '/sources/gcc-8.2.0/build/x86_64-pc-linux-gnu/libstdc++-v3'
make[1]: *** [Makefile:11509: all-target-libstdc++-v3] Error 2
make[1]: Leaving directory '/sources/gcc-8.2.0/build'
make: *** [Makefile:912: all] Error 2
 
Old 01-29-2019, 07:17 PM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
The o/p of the version check is not right it should be run from the HOST system.
Please post your configure command for gcc

Last edited by Keith Hedger; 01-29-2019 at 07:19 PM.
 
Old 01-30-2019, 01:28 AM   #9
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
Here is the version check run from my host.

And below is the configure command:

Code:
../configure --prefix=/usr            \
             --enable-languages=c,c++ \
             --disable-multilib       \
             --disable-bootstrap      \
             --disable-libmpx         \
             --with-system-zlib
 
Old 01-30-2019, 03:48 AM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
That version check is wrong you have /bin/sh pointing to dash should bash
and no make info, so not sure how you got through to ch6 without a problem !!
Maybe this error stems back to ch5 and those issues in version check.
 
Old 01-30-2019, 04:00 AM   #11
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
But the version-check which I have posted in the recent reply is when I am not chrooted into the LFS. In that case the /bin/sh won't point to bash obviously.
While in the previous version-check as you can see the /bin/sh points correctly to bash and hence I am able to build all tools except gcc. Plus, my sanity check before proceeding with gcc build procedure also succeeded.

Last edited by invinciblycool; 01-30-2019 at 04:06 AM.
 
Old 01-30-2019, 04:13 AM   #12
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
What i,m saying version check was wrong for ch5 as that is from host, which you use to build ch5. Did something go wrong there "normally" it dose. which you might of missed. now your finding a problem in ch6. As I said before never seen this error before.
 
Old 01-30-2019, 04:15 AM   #13
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
Makes sense. I will rebuild from ch5 and update on the thread.
 
Old 01-30-2019, 04:19 AM   #14
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
not from ch5 I would rebuild tools redo ch5. Correct version check errors as well
/bin/sh and make info check it all passes
 
Old 02-02-2019, 12:54 AM   #15
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
Okay,so I did a full format of the partition and started all over again, carefully following each and every step and ensuring tests for each package pass(as in the book, not all tests).

Here is the version-check.

Now when I run make, I get the following error:


Code:
make[2]: Entering directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/libiberty'
make[3]: Entering directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/libiberty/testsuite'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/libiberty/testsuite'
make[2]: Leaving directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/libiberty'
make[2]: Entering directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/fixincludes'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/fixincludes'
make[2]: Entering directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[2]: Leaving directory '/sources/gcc-8.2.0/build/build-x86_64-pc-linux-gnu/libcpp'
make[2]: Entering directory '/sources/gcc-8.2.0/build/libbacktrace'
make  all-am
make[3]: Entering directory '/sources/gcc-8.2.0/build/libbacktrace'
true  DO=all multi-do # make
make[3]: Leaving directory '/sources/gcc-8.2.0/build/libbacktrace'
make[2]: Leaving directory '/sources/gcc-8.2.0/build/libbacktrace'
make[2]: Entering directory '/sources/gcc-8.2.0/build/libcpp'
test -f config.h || (rm -f stamp-h1 && make stamp-h1)
make[2]: Leaving directory '/sources/gcc-8.2.0/build/libcpp'
make[2]: Entering directory '/sources/gcc-8.2.0/build/libdecnumber'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/sources/gcc-8.2.0/build/libdecnumber'
make[2]: Entering directory '/sources/gcc-8.2.0/build/gcc'
/sources/gcc-8.2.0/build/./gcc/xgcc -B/sources/gcc-8.2.0/build/./gcc/ -xc -nostdinc /dev/null -S -o /dev/null -fself-test=../../gcc/testsuite/selftests
/sources/gcc-8.2.0/build/./gcc/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
make[2]: *** [Makefile:1976: s-selftest-c] Error 1
make[2]: Leaving directory '/sources/gcc-8.2.0/build/gcc'
make[1]: *** [Makefile:4271: all-gcc] Error 2
make[1]: Leaving directory '/sources/gcc-8.2.0/build'
make: *** [Makefile:906: all] Error 2

Last edited by invinciblycool; 02-02-2019 at 12:59 AM. Reason: Add version-check
 
  


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
VirtualBox Starter Pack - LFS as a Host For Your LFS Build basica Linux From Scratch 4 11-25-2015 12:02 PM
New build of LFS I'm experimenting with. (OpenRC+ZFS+B/LFS) ReaperX7 Linux From Scratch 26 07-19-2015 09:17 PM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
Will compiling LFS on an 64 bit distro build an 64 bit LFS? Vampirite Linux From Scratch 4 08-31-2007 02:48 PM

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

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