LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-23-2020, 01:46 AM   #1
dns2887
LQ Newbie
 
Registered: Oct 2020
Posts: 3

Rep: Reputation: Disabled
lfs version 10 - gcc compile pass 1 - error 77 & error 2


hi all, i've been trying to build LFS version 10 with debian 10 in virtual box.

so when i compile the gcc - pass 1 (chapter 5.3), i got the error 77 & error 2.

[Makefile:5463: configure-stage2-gmp] Error 77
[Makefile:22086: stage2-bubble] Error 2

how to solve this?

also in previous lfs (7 & 8) there is library check. why in version 10 there is no library check? is it still necessary?

what i've did:
1. check the host requirement
2. check the mounting & LFS variable
3. build as user = lfs
4. check the library
5. delete and try to rebuild with make -j1 (previously i tried with make -j2). result: still the same error
6. following this guide, change chown, delete and rebuild again from binutils. result: still the same error

this is the details:
gcc error
config.log
version-check
library-check
file-ownership

thank you in advance.
 
Old 10-27-2020, 08:23 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,296

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Hi, dns2887 & welcome to LQ


It's the whole idea of a Virtual box I'd worry about. The whole idea of a virtual box is thaty what goes on in the virtual box stays in the virtual box. OTOH, the whole idea of LFS is to use s separate directory, so your host system can compile chapter 5.

Is your host system in the virtual box? If not, stop now. Even if it is, it's a problem because with one VM in virtualbox, you can't give more than 50% of your resources to the guest. So your compiles will be hellish slow. And your hardware won't be in the VM - not anything your actual host uses. It's just pretending to be.

I'd recommend a full backup of your system from a live cd to usb or disk, followed by making the /tools directory, and tackle it without the VM.
 
Old 10-27-2020, 10:25 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
This looks wrong to me:
configure: error: in `/mnt/lfs/sources/gcc-10.2.0/build/gmp':

gmp and similar internal libraries are supposed to be unpacked into the top-level gcc directory, not into build.
 
Old 10-28-2020, 01:12 AM   #4
arch-linq
Member
 
Registered: Sep 2018
Location: Midwest, USA
Distribution: Arch,LFS,BLFS
Posts: 110

Rep: Reputation: Disabled
They are both right. VM is ALWAYS trouble for first timers. Use bare metal if you dont have proficiency with vm's and what's required by LFS. Gmp and friends have their own dirs under gcc-x-x/gmp etc.
 
Old 10-29-2020, 12:51 AM   #5
dns2887
LQ Newbie
 
Registered: Oct 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
hi business_kid, hazel, & arch-linq,
thank you for the feedback.

Quote:
Originally Posted by business_kid View Post
Hi, dns2887 & welcome to LQ


It's the whole idea of a Virtual box I'd worry about. The whole idea of a virtual box is thaty what goes on in the virtual box stays in the virtual box. OTOH, the whole idea of LFS is to use s separate directory, so your host system can compile chapter 5.

Is your host system in the virtual box? If not, stop now. Even if it is, it's a problem because with one VM in virtualbox, you can't give more than 50% of your resources to the guest. So your compiles will be hellish slow. And your hardware won't be in the VM - not anything your actual host uses. It's just pretending to be.

I'd recommend a full backup of your system from a live cd to usb or disk, followed by making the /tools directory, and tackle it without the VM.
this is my limitations. currently, i just have one machine, an old laptop for work (my company bought it for me 5 years ago -- much more a potato than a computer now). the main os is windows where all my work is there, and i don't want to broke/delete those files, so i've installed virtualbox and installed debian 10 in there for building the LFS. and yes, compiling is kinda slow (even the drive is not ssd), so i usually left it all night long, that's ok.

Quote:
Originally Posted by hazel View Post
This looks wrong to me:
configure: error: in `/mnt/lfs/sources/gcc-10.2.0/build/gmp':

gmp and similar internal libraries are supposed to be unpacked into the top-level gcc directory, not into build.
i've extracted and renamed gmp, mpfr, mpc in the correct directory $LFS/sources/gcc-10.2.0 (not inside the build directory or folder) and checked it before. that error is from the script, but i don't know whether from the config or not.

Quote:
Originally Posted by arch-linq View Post
They are both right. VM is ALWAYS trouble for first timers. Use bare metal if you dont have proficiency with vm's and what's required by LFS. Gmp and friends have their own dirs under gcc-x-x/gmp etc.
perhaps i will start saving more to buy a new machine.

---

this is my update:

after a lot of reading related to building from sources, makefile, autotools, and so on.
finally, i've changed all the folder owner and permission to lfs (include the lib64, lost+found) in the lfs partition. previously it's only $LFS/sources & $LFS/tools. and i've changed all the other names for root's .bashrc, .profile, .bash_profile so it doesn't get used when building with similar concepts as this page in "important sections" to clean the environment. i did all these steps just to be safe. after that, i extracted the binutils and gcc again, and voila it worked.

so now i am in chapter 8.8 (Glibc) and i've encountered another error after i issued casec-esac command like in the book.
these are the screenshots.

Click image for larger version

Name:	Glibc Stuck.jpg
Views:	42
Size:	168.1 KB
ID:	34421

Click image for larger version

Name:	Glibc Stuck 2.jpg
Views:	37
Size:	25.6 KB
ID:	34422

i'm still troubleshooting this, probably the symlink broke the environment.

should this thread marked as solved and closed and i create another thread for the new error?
or can we continue in here?

kindly advise. cheers!
 
Old 11-02-2020, 09:48 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
Originally Posted by dns2887 View Post

after a lot of reading related to building from sources, makefile, autotools, and so on.
finally, i've changed all the folder owner and permission to lfs (include the lib64, lost+found) in the lfs partition. previously it's only $LFS/sources & $LFS/tools. and i've changed all the other names for root's .bashrc, .profile, .bash_profile so it doesn't get used when building with similar concepts as this page in "important sections" to clean the environment. i did all these steps just to be safe. after that, i extracted the binutils and gcc again, and voila it worked.
I think that was a very bad idea. Things like permissions need to be set exactly as in the Book. Otherwise you will run into trouble sooner or later. And you certainly shouldn't need to change any of root's files.

Remember that the LFS user only gets used in chapters 5-6 to build the intermediate toolkit. After that, you work exclusively as root and you certainly don't need to change any of root's startup files in the old system because you chroot into the new one before running bash in login mode. There are no startup files for root in that system.

I suspect that your fiddling about with permissions got you past the original problem but has now caused a new one with glibc.
 
Old 11-14-2020, 11:02 PM   #7
dns2887
LQ Newbie
 
Registered: Oct 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
I think that was a very bad idea. Things like permissions need to be set exactly as in the Book. Otherwise you will run into trouble sooner or later. And you certainly shouldn't need to change any of root's files.

Remember that the LFS user only gets used in chapters 5-6 to build the intermediate toolkit. After that, you work exclusively as root and you certainly don't need to change any of root's startup files in the old system because you chroot into the new one before running bash in login mode. There are no startup files for root in that system.

I suspect that your fiddling about with permissions got you past the original problem but has now caused a new one with glibc.
hi hazel, thank you for the feedback. finally i started again from the beginning and without any deviation at all.
currently i just completed all the compiling (chapter 8). now into setting config and grub.

it's been a fun learning experince.

cheers!
 
  


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: Error during GCC-4.7.1-Pass 1 (LFS 7.2, Section 5.5) erkant Linux From Scratch 7 11-28-2012 06:03 AM
libgcc Compile errors during LFS 6.8 chapter 5.5 (GCC pass 1) 1nKoGn17o Linux From Scratch 7 08-03-2011 03:07 AM
LFS version 6.5 I'm on step 5.10 I have a problem with gcc-4.4.1 pass 2 redpill Linux From Scratch 2 01-29-2010 09:23 AM
gcc second pass does not compile. LFS version 6.4 5.12 arielsegal Linux From Scratch 18 06-15-2009 11:12 AM
unable to compile gcc 4.1.2 pass 1 version 6.3 Abdou_ENSI Linux From Scratch 2 01-30-2009 11:28 AM

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

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