bash still won't recognize gcc...

Gerard Beekmans gerard at linuxfromscratch.org
Thu Jul 26 17:10:29 PDT 2001


On Thu, Jul 26, 2001 at 07:40:26PM -0400, yourfriendgregd at netscape.net wrote:
> ...and that is not good.  I started a thread about this some weeks ago, but due to some technical difficulties on the behalf of my computer, was unable to try solutions.  Well, I tried them, and also tried compiling bash (2.05) without the "--with-cursers" option.  To recap, when I try to execute gcc in the chroot environment, bash complains that the executable (gcc) doesn't exist.  However, using ls shows that gcc exists, and I can auto-complete "gcc" by using the tab key.  Using ./gcc when in /usr/bin yields the same results.  Compiled gcc 2.95.2.1 statically with glibc 2.1 and gcc 2.95.2.  Here is the output I get in the chroot environment:

99% change that gcc isn't linked statically. Verify this by exiting
chroot, then run this: ldd $LFS/usr/bin/gcc

It's probably dynamically linked and it'll give you a list of shared
libraries it needs to run.

Solution: go back to chapter 5 of the book and re-install gcc. When you
run 'make', make sure you run it as:
	
	make -e LDFLAGS=-static bootstrap

If you omit -e, LDFLAGS will be overridden by a Makefile declared
variable which doesn't include -static. Result is gcc not statically
linked.

-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list