LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-10-2019, 02:39 PM   #1
zoopi
LQ Newbie
 
Registered: Nov 2019
Posts: 5

Rep: Reputation: Disabled
LFS Charter 8.3 ver8.4 make defconfig


I am now in chapter 8.4 of Linux for scratch ver8.4, when I try to enter a command "make defconfig, an error
Code:
HOSTCC  scripts/basic/fixdep
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc_s
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lc
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc_s
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make: *** [Makefile:476: scripts_basic] Error 2
bash-5.0#
how to fix?

if you enter d chroot and execute the command, then exit
Code:
(lfs chroot) root:/sources/linux-5.0.1# make defconfig
  HOSTCC  scripts/basic/fixdep
/usr/libexec/gcc/x86_64-pc-linux-gnu/8.3.0/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
make[1]: *** [scripts/Makefile.host:90: scripts/basic/fixdep] Error 1
make: *** [Makefile:476: scripts_basic] Error 2
(lfs chroot) root:/sources/linux-5.0.1#
 
Old 11-11-2019, 07:03 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,574
Blog Entries: 19

Rep: Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453Reputation: 4453
Where did your first output come from? You have to do this in chroot because you can't boot the new system at this stage. Or were you trying to use your host system?

It looks as if gcc can't find libmpc. This is one of the three essential mathematical libraries that gcc uses. They should all have been built and installed in the previous chapter. MPC is installed in 6.19. Please check for it in /usr/lib.

Last edited by hazel; 11-11-2019 at 07:04 AM.
 
Old 11-12-2019, 01:10 AM   #3
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
I guess you are in 8.3 trying to build the kernel?
Try make menuconfig.
 
Old 11-12-2019, 01:25 AM   #4
mateomiller002
LQ Newbie
 
Registered: Nov 2019
Posts: 1

Rep: Reputation: Disabled
Building the kernel involves a few steps—configuration, compilation, and installation. Read the README file in the kernel source tree for alternative methods to the way this book configures the kernel.

Prepare for compilation by running the following command:make mrproper
 
Old 11-24-2019, 11:58 PM   #5
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Your toolchain may be broken. Building the kernel in chapter 8 needs the fully functional final system toolchain.

/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/8.3.0.... etc. etc. etc.

That's part of the temporary toolchain. Either your compiler from chapter 6 hasn't taken over because it's broke, or you forgot-to/didn't-do logout and back in at step 6.79.

Code:
chroot "$LFS" /usr/bin/env -i          \
    HOME=/root TERM="$TERM"            \
    PS1='(lfs chroot) \u:\w\$ '        \
    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
    /bin/bash --login
Notice that there is no reference to /tools/* in the search path for that final chroot. At no point in chapter 7 and onward should you be running anything from /tools. In fact, your best bet is to rm -rf /tools after that last chroot in 6.79.
 
  


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 Charter 8.3 ver8.4 make defconfig error zoopi Linux From Scratch 1 11-11-2019 09:14 AM
[SOLVED] kernel: make menuconfig after make defconfig? Poison Nuke Linux - Kernel 5 05-25-2018 05:49 PM
[SOLVED] What router to get for a charter (charter.com) modem? hearthstone Linux - Hardware 18 07-30-2016 01:10 PM
MDK Ver8.2 ISO Download where from? jimlg Mandriva 3 10-27-2003 01:35 PM
adding a NIC to RH Ver8 Melo Linux - Networking 3 06-02-2003 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:57 PM.

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