bash compilation trouble

Tim tim at
Wed Jan 1 06:33:23 PST 2003

Just my luck - the very first bit of compiling in the book, and I can't get it 
to work!!

I run the make command after configuring bash (with this command: 
[lfs at localhost bash-2.05a]$ ./configure --enable-static-link  
--prefix=/mnt/lfs/static --with-curses)

The make command finish with the following error:

gcc -s  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"i686"' 
-DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"i686-pc-linux-gnu"' 
-DCONF_VENDOR='"pc"' -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib 
-g -O2 -c shell.c
In file included from shell.h:41,
                 from shell.c:48:
externs.h:163: conflicting types for `gethostname'
/usr/include/unistd.h:734: previous declaration of `gethostname'
externs.h:196: conflicting types for `strncasecmp'
/usr/include/string.h:277: previous declaration of `strncasecmp'
make: *** [shell.o] Error 1

I hope that's enough of the message for that to mean something to someone.
I've had a quick look at the source code in externs.h and the code around  163 
- there's a test done on whether HAVE_GETHOSTNAME has a value. If it doesn't, 
a function is called (gethostname).

I've echoed $HAVE_GETHOSTNAME and I get an empty variable, so it looks to my 
like gethostname is being called.

Well that's about as much as I could figure out... I'm probably barking up the 
wrong tree completely!

If anyone could shed any light on this, it would be greatly appreciated.

Thanks in advance and Happy New Year!!

Unsubscribe: send email to listar at
and put 'unsubscribe lfs-support' in the subject header of the message

More information about the lfs-support mailing list