LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-11-2022, 11:53 AM   #1
rsmereka
Member
 
Registered: Jul 2003
Location: Southwestern Ontario, Canada
Distribution: LFS, OpenBSD, UBPorts, MX, Gentoo
Posts: 85
Blog Entries: 3

Rep: Reputation: 17
C hapter 10.3 make mrproper


Hi,

I am trying to build i686 lfs 11.2 on a Lenovo x61s using an MX 21 host on a USB stick.

My mrproper command is:
Code:
(lfs chroot) root:/sources/linux-5.19.2# make mrproper
/usr/libexec/gcc/i686-pc-linux-gnu/12.2.0/cc1: error while loading shared libraries: /usr/lib/libz.so.1: file too short
So I look up zlib:
Code:
(lfs chroot) root:/sources/linux-5.19.2# ls -l /usr/lib/libz*
lrwxrwxrwx 1 root root     14 Dec  5 13:18 /usr/lib/libz.so -> libz.so.1.2.13
lrwxrwxrwx 1 root root     14 Dec  5 13:18 /usr/lib/libz.so.1 -> libz.so.1.2.13
-rwxr-xr-x 1 root root      0 Dec 10 13:31 /usr/lib/libz.so.1.2.13
I built version 1.2.13 of zlib as per the 11.2 errata. The sym links are from Dec 5 and the actual library is zero bytes from Dec 10. So I try to rebuild zlib:
Code:
(lfs chroot) root:/sources# tar -xvf zlib-1.2.13.tar.xz
(lfs chroot) root:/sources# cd zlib-1.2.13
(lfs chroot) root:/sources/zlib-1.2.13# ./configure --prefix=/usr
Checking for gcc...
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Now this is getting too weird for me.

BTW: all commands are entered into the chroot environment and I have built many lfs systems mostly i686 non-graphical servers (LAMP)

Any ideas?
TIA,
Rick
 
Old 12-11-2022, 01:22 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
try manually removing all the zlib bits, delete the zlib archive and source folder, re-download zlib and try again.
 
Old 12-12-2022, 03:38 AM   #3
bryan_S
Member
 
Registered: Aug 2014
Location: N. Florida
Distribution: Linux-from-Scratch
Posts: 109

Rep: Reputation: Disabled
I think you may have broken your system running the stripping commands. In the expanded notes on the errata page:
Quote:
NOTE: When upgrading zlib-1.2.13, update the stripping commands in Chapter 8 to use libz.so.1.2.13 instead of libz.so.1.2.12. This will prevent your system from breaking after running the stripping commands.
If that's what's happened the only way to fix it is to obtain that library 'somewhere else'. If you have a saved temporary system you could restored that to a temporary partition and build the zlib library and copy it over.
 
1 members found this post helpful.
Old 12-12-2022, 11:04 AM   #4
rsmereka
Member
 
Registered: Jul 2003
Location: Southwestern Ontario, Canada
Distribution: LFS, OpenBSD, UBPorts, MX, Gentoo
Posts: 85

Original Poster
Blog Entries: 3

Rep: Reputation: 17
Thanks Keith, but,

On a hunch thinking that the compiler is now broken after reading lots about the too harsh error message, I picked a package at random (something simple), gawk and tried to build that, starting from untarring then:
Code:
(lfs chroot) root:/sources# cd gawk-5.1.1
(lfs chroot) root:/sources/gawk-5.1.1# sed -i 's/extras//' Makefile.in
(lfs chroot) root:/sources/gawk-5.1.1# ./configure --prefix=/usr
checking for a BSD-compatible install... ./build-aux/install-sh -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/sources/gawk-5.1.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
The lines I focused on were:
Code:
checking whether the C compiler works... no
and
Code:
configure: error: C compiler cannot create executables
Spot on IMHO bryan,
I remember reading that note in the errata but when it came time to strip, I forgot all about it. Also I, of course, thinking that I had no need to do a backup with my experience, plowed straight through.

Nice catch.

Oh well back to the drawing board.
 
Old 12-13-2022, 07:11 AM   #5
bryan_S
Member
 
Registered: Aug 2014
Location: N. Florida
Distribution: Linux-from-Scratch
Posts: 109

Rep: Reputation: Disabled
I know because a similar thing happend to me before using those stripping commands with a wrong library name. I think it was some other library than zlib, but you take some risk when you don't use released book versions.

Another way i broke gcc was by upgrading ISL which gcc linked to. The only way to fix gcc after the upgrade was copy the old ISL lib from another LFS (lucky i had it). Then I rebuilt gcc and it linked against the new ISL, then I could remove that old ISL library.
 
  


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
make: *** No rule to make target `mrproper'. Stop. dauphinfay Linux - General 7 11-24-2014 07:35 AM
Difference between make mrproper and make clean? hottdogg Slackware 5 03-11-2013 02:31 PM
Recompile. Is 'make mrproper' a must? Make just stops! smOk3 Linux - Newbie 4 02-24-2008 12:20 PM
Use of 'make mrproper' and 'make clean'.... fenice1976 Linux - Software 6 05-25-2004 05:18 PM
'make mrproper' - make bzImage options. liguorir Linux - Software 4 06-26-2003 06:48 PM

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

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