Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
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.


  Search this Thread
Old 06-06-2002, 06:15 AM   #1
LQ Newbie
Registered: Nov 2001
Location: Sunderland, UK
Distribution: Mandrake 8.1
Posts: 21

Rep: Reputation: 15
grep-2.5 static fails

I'm trying to compile the static version of grep-2.5 using the commands from the latest CVS book. It compiles fine, but when running $LFS/static/bin/grep --version it simply segfaults. If I remove the LDFLAGS=-static argument to the configure script then the binary runs fine, but of course I now have a dynamically linked binary, not the static version I need for chapter 6.

My host distro is Gentoo, and according to it's list of packages I'd be compiling with GCC 2.95.3 and Glibc 2.2.5 (I'm away from my home PC at the mo, so can't do a gcc --version, how can I determine what version of Glibc I'm running?). Just in case it matters I've got an AMD Athlon processor (this has meant I've needed to use the patch on fileutils to rectify segfault problems on that package).

If anyone could let me know how I can trace a segfault (i.e. what might be causing it) I'd be grateful.

Thanks for any help

Old 06-09-2002, 10:50 AM   #2
LFS Maintainer
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Run /lib/ to find out Glibc's version number.

Tracing can be done using the 'strace' program (see freshmeat for the URL). It'll tell you what the program was trying to do (system call wise) and it may give you a clue why it failed.

Also, a debugger can be helpful, like gdb ( if you can understand it's output.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
grep fails to install bmfan Linux From Scratch 5 11-14-2005 12:31 PM
grep in shell script fails on redhat 3.0 rlangsto Linux - General 4 03-06-2005 07:42 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
DHCP fails, static IP partially works bigRez Linux - Networking 1 04-20-2004 06:23 PM
ps -ef|grep -v root|grep apache<<result maelstrombob Linux - Newbie 1 09-24-2003 11:38 AM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 08:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration