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-04-2021, 08:12 AM   #1
bayou self
Member
 
Registered: Sep 2018
Location: Louisiana
Distribution: Debian 11.1 (bullseye)
Posts: 81

Rep: Reputation: Disabled
Stripping Segmentation fault


LFS 11.0
8.77 Stripping

On the final for loop I got a Segmentation fault, and the prompt is now -bash-5.1#

I have not entered the last command.
Quote:
unset BIN LIB save_usrlib online_usrbin online_usrlib
Q1. On the very next page the book has me logging out and back into chroot, so how serious is the Segfault?
Q2. Do I need to re-enter chroot, do the unset command, then go to 8.78 Cleaning Up?
 
Old 12-04-2021, 03:11 PM   #2
bayou self
Member
 
Registered: Sep 2018
Location: Louisiana
Distribution: Debian 11.1 (bullseye)
Posts: 81

Original Poster
Rep: Reputation: Disabled
I went back to 7.4 Entering the Chroot Environment, got my (lfs chroot) root:/# back, and this time I copied/pasted all the code in the Stripping page instead of typing it...no Segmentation fault!
Even though I was as careful as I know how to be, checking every line, there must have been a typo somewhere. Now, I want to see if I can find it!
 
Old 12-11-2021, 11:19 AM   #3
bayou self
Member
 
Registered: Sep 2018
Location: Louisiana
Distribution: Debian 11.1 (bullseye)
Posts: 81

Original Poster
Rep: Reputation: Disabled
Is it advisable to enter a block of separate commands with a single pasting action, such as
Code:
echo 'int main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
or would it be better to paste them one at a time?
 
Old 12-11-2021, 07:36 PM   #4
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 65

Rep: Reputation: Disabled
nothing wrong in my experience with entering the commands as a block

if they are root commands i use the following:

sudo -- bash -c “block of commands”
 
1 members found this post helpful.
Old 12-17-2021, 06:14 PM   #5
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
The reason why the strip command would have segfaulted, is probably because you used the same strip binary in the bin directory you were stripping. Before that step, there was a step that changed the path to the strip command so you don't strip things that are in use. You may have missed that the first time or something.

I haven't built the current iterations of LFS (I keep building on mine for years) but last time I did it was something like:

Code:
strip --strip-debug /tools/lib/*
/usr/bin/strip --strip-unneeded /tools/{,s}bin/*
 
1 members found this post helpful.
  


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] Segmentation fault in 6.62 - stripping debugging symbols DougCM Linux From Scratch 1 12-07-2010 08:29 AM
Stripping lines versus stripping bytes in a bash subshell. poorman_installer Programming 9 10-21-2009 08:36 AM
yast segmentation fault, system freezing - nvidia driver at fault? BaltikaTroika SUSE / openSUSE 2 12-02-2005 09:34 AM
Stripping down to basics sketchyfrog Linux - Newbie 4 02-24-2004 08:27 PM
Stripping down RedHat 9, where do I start? tobz Linux - General 19 07-27-2003 07:54 PM

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

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