problem compiling Bash statically

avivt at avivt at
Sun Jul 29 05:31:05 PDT 2001

Dear LFS Experts,

I have a funny problem making a static bash as per chapter 5 of the book. the 
building system is LFS3.0pre3, the to be built system is LFS3.0pre4, the 
tarball has been ensured clean (fetched twice - from and from

The pathologic make output follows:

rm -f shell.o
gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"i686"' -DCONF_OSTYPE='"linux-gnu"' -
DCONF_MACHTYPE='"i686-pc-linux-gnu"' -DCONF_VENDOR='"pc"' -DSHELL -
DHAVE_CONFIG_H  -D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -
I/usr/local/include -g -O2 -c shell.c

In file included from shell.h:38,
                 from shell.c:45:
externs.h:147: conflicting types for `gethostname'
/usr/include/unistd.h:734: previous declaration of `gethostname'
externs.h:164: conflicting types for `setlinebuf'
/usr/include/stdio.h:267: previous declaration of `setlinebuf'
externs.h:180: conflicting types for `strncasecmp'
/usr/include/string.h:277: previous declaration of `strncasecmp'
make: *** [shell.o] Error 1
(end of story)

if bash is built for dynamic linking, make terminates successfully.
now, i know i can probably get away with dynamic linking here. but i'm curious 
(how can a link option confuse the header import sequence?) and stubborn 
(that's why I don't use Debian...).

Anyone has an idea? I'd be so thankful.

Aviv Tuttnauer 

This message was sent using Endymion MailMan.

Unsubscribe: send email to lfs-discuss-request at
and put unsubscribe in the subject header of the message

More information about the lfs-dev mailing list