problems building bash bash-2.05a for lfs 4.0

Mark Jones mark.jones106 at verizon.net
Sat Jan 18 15:17:15 PST 2003


Nevermind, more searching of the mailing list archives pointed me in the
right direction, glibc-static-devel.  :)

On Sat, 2003-01-18 at 18:03, Mark Jones wrote:
> I am just getting started with an attempt to build an lfs system.  I am
> building it on a Mandrake 9.0 Gcc 3.2 system that has been used for
> plenty of other development since the install.
> 
> I started with bash, following the lfs book for 4.0 exactly, except
> where I mounted my partition, but that is surely not related to my
> problem.
> 
> First two interesting things that came up, then the show stopper.
> 
> 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'
> 
> Well, I looked into that and decided probably all that was needed was to
> add to config.h:
> #define HAVE_GETHOSTNAME
> #define HAVE_STRCASECMP
> 
> But, I would have thought that the configure script should have taken
> care of this.  That got me past those two problems.  Then I ran into:
> 
> 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 eval.c
> make[1]: Entering directory `/tmp/bash-2.05a/builtins'
> rm -f mkbuiltins.o
> gcc -s -c  -DHAVE_CONFIG_H -DSHELL   -I. -I..  -I.. -I../include
> -I../lib -I.  mkbuiltins.c
> mkbuiltins.c:136: warning: static declaration for `rename' follows
> non-static
> mkbuiltins.c: In function `rename':
> mkbuiltins.c:1425: argument `from' doesn't match prototype
> mkbuiltins.c:136: prototype declaration
> mkbuiltins.c:1425: argument `to' doesn't match prototype
> mkbuiltins.c:136: prototype declaration
> make[1]: *** [mkbuiltins.o] Error 1
> make[1]: Leaving directory `/tmp/bash-2.05a/builtins'
> make: *** [builtins/builtext.h] Error 1
> 
> So I added to config.h:
> #define HAVE_RENAME
> 
> And, that got me past that.  Now the show stopper:
> 
> 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 eval.c
> make[1]: Entering directory `/tmp/bash-2.05a/builtins'
> rm -f mkbuiltins.o
> gcc -s -c  -DHAVE_CONFIG_H -DSHELL   -I. -I..  -I.. -I../include
> -I../lib -I.  mkbuiltins.c
> gcc -s  -static -rdynamic -g -O2 -o mkbuiltins mkbuiltins.o 
> /usr/bin/ld: cannot find -lc
> collect2: ld returned 1 exit status
> make[1]: *** [mkbuiltins] Error 1
> make[1]: Leaving directory `/tmp/bash-2.05a/builtins'
> make: *** [builtins/builtext.h] Error 1
> 
> I do not see any -lc in the commands so I'm not sure what it is
> referring to.  If it is the main c library, that would seem strange
> since I am able to build plenty of other software on my non-lfs system
> that I'm doing the build on.
> 
> What is wrong here?  Please CC me in any reply as I'm not subscribed to
> the listserv.  Let me know if you need any other details too.
> 
> Thanks!
-- 
Mark Jones <mark.jones106 at verizon.net>

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



More information about the lfs-support mailing list