LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1974|回复: 15

我严格按照LFS的教程来安装系统,结果在安装BASH过程中出现如下问题?

[复制链接]
发表于 2003-5-19 23:04:15 | 显示全部楼层 |阅读模式
OTES        config-bot.h   flags.h        parser.h      test.c
README       config-top.h   general.c      patchlevel.h  test.h
Y2K          config.h.in    general.h      pathexp.c     tests/
aclocal.m4   config.log     hashcmd.c      pathexp.h     trap.c
alias.c      configure*     hashcmd.h      pathnames.h   trap.h
alias.h      configure.in   hashlib.c      pcomplete.c   unwind_prot.c
array.c      conftypes.h    hashlib.h      pcomplete.h   unwind_prot.h
array.h      copy_cmd.c     include/       pcomplib.c    variables.c
arrayfunc.c  cross-build/   input.c        print_cmd.c   variables.h
arrayfunc.h  dispose_cmd.c  input.h        quit.h        version.c
bashansi.h   dispose_cmd.h  jobs.c         redir.c       xmalloc.c
bashhist.c   doc/           jobs.h         redir.h       xmalloc.h
bashhist.h   error.c        lib/           shell.c       y.tab.c
bashintl.h   error.h        list.c         shell.h       y.tab.h
[lfs@peng bash-2.05a]$ ./configure --enable-static-link \
> --prefix=$LFS/static --with-curses&&
> make &&
> make install
checking build system type... configure: error: cannot guess build type; you must specify one
[lfs@peng bash-2.05a]$



怎么办呢 ?
 楼主| 发表于 2003-5-19 23:39:36 | 显示全部楼层
搞定了,原来是在设置工作环境的时候敲错了命令
 楼主| 发表于 2003-5-19 23:42:10 | 显示全部楼层
但是又出现如下问题,编译BASH的时候

ecking whether getpw functions are declared in pwd.h... yes
checking for unusable real-time signals due to large values... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
checking which library has the termcap functions... using gnutermcap
checking whether /dev/fd is available... absent
checking whether /dev/stdin stdout stderr are available... absent
checking for default mail directory... /var/mail
configure: creating ./config.status
config.status: creating Makefile
config.status: creating builtins/Makefile
config.status: creating lib/readline/Makefile
config.status: creating lib/glob/Makefile
config.status: creating lib/malloc/Makefile
config.status: creating lib/sh/Makefile
config.status: creating lib/termcap/Makefile
config.status: creating lib/tilde/Makefile
config.status: creating doc/Makefile
config.status: creating support/Makefile
config.status: creating examples/loadables/Makefile
config.status: creating examples/loadables/perl/Makefile
config.status: creating config.h
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  -o mksyntax ./mksyntax.c
rm -f syntax.c
./mksyntax -o syntax.c
/bin/sh ./support/mkversion.sh -b -S . -s release -d 2.05a -o newversion.h \
&& mv newversion.h version.h
rm -f version.o
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 version.c
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  -o bashversion ./support/bashversion.c version.o

          ***********************************************************
          *                                                         *
          * GNU bash, version 2.05a.0(1)-release (i686-pc-linux-gnu)
          *                                                         *
          ***********************************************************

rm -f shell.o
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:752: previous declaration of `gethostname'
externs.h:196: conflicting types for `strncasecmp'
/usr/include/string.h:292: previous declaration of `strncasecmp'
make: *** [shell.o] Error 1
[lfs@peng bash-2.05a]$

我咋这么倒霉??高手指点
发表于 2003-5-20 00:40:52 | 显示全部楼层
checking for tgetent in -lcurses... no
在bash的安装指导里面说过的,一定要有ncurses库。仔细看书
 楼主| 发表于 2003-5-20 08:03:41 | 显示全部楼层
有啊。有/usr/lib/libcurses.a和/usr/lib/libncurses.a这两个文件呢
 楼主| 发表于 2003-5-20 08:38:23 | 显示全部楼层
真邪门,我重新做了一次,又可以了。:)
 楼主| 发表于 2003-5-20 09:01:58 | 显示全部楼层
安装BZIP2的时候出现如下问题
lfs@peng src]$ cd bzip2-1.0.2
[lfs@peng bzip2-1.0.2]$ make CC="gcc -static -s" &&
> make PREFIX=$LFS/static install
gcc -static -s -Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce -D_FILE_OFFSET_BITS=64  -o bzip2 bzip2.o -L. -lbz2
/usr/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make: *** [bzip2] Error 1
[lfs@peng bzip2-1.0.2]$

这个BZIP,我刚才安装过一次,又错误,现在又安装一次,出现了上面的错误提示。
 楼主| 发表于 2003-5-20 09:04:15 | 显示全部楼层
还有一个问题。是不是要将所有的源代码包先放在/mnt/lfs/static/src目录下解压,然后再安装
还是安装一个的时候就去解压一个?
那么多源代码包一个个解压,很麻烦,有好点的命令没 ?
发表于 2003-5-20 09:11:48 | 显示全部楼层
cannot find -lc
找不到glibc的开发包。
解压有atool。
http://freshmeat.net/projects/atool/?topic_id=19
 楼主| 发表于 2003-5-20 09:24:03 | 显示全部楼层
找不到GLIBC的 开发包那该怎么办?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表