LinuxSir.cn,穿越时空的Linuxsir!

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

编译glibc时出错,请高手指点一二

[复制链接]
发表于 2003-4-3 15:43:44 | 显示全部楼层 |阅读模式
I have no name!:/static/src/lfs-packages-4.0-rc1/glibc-2.2.5# patch -Np1 -i ../glibc-2.2.5-2.patch &&
> touch /etc/ld.so.conf &&
> mkdir ../glibc-build &&
> cd ../glibc-build &&
> ../glibc-2.2.5/configure --prefix=/usr --disable-profile \
>     --enable-add-ons --libexecdir=/usr/bin &&
> echo "cross-compiling = no" > configparms &&
> make &&
> make install &&
> make localedata/install-locales &&
> exec /static/bin/bash --login
patching file login/Makefile
patching file malloc/Makefile
patching file iconv/skeleton.c
patching file linuxthreads/signals.c
patching file malloc/malloc.c
patching file posix/regex.h
patching file resolv/nss_dns/dns-network.c
patching file sunrpc/xdr_array.c
patching file sysdeps/i386/Makefile
patching file sysdeps/i386/fpu/libm-test-ulps
patching file sysdeps/m68k/Makefile
patching file sysdeps/s390/s390-32/Makefile
patching file sysdeps/unix/sysv/linux/errlist.c
patching file sysdeps/wordsize-32/divdi3.c
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking sysdep dirs... sysdeps/i386/elf linuxthreads/sysdeps/unix/sysv/linux/i386 linuxthreads/sysdeps/unix/sysv/linux linuxthreads/sysdeps/pthread sysdeps/pthread linuxthreads/sysdeps/unix/sysv linuxthreads/sysdeps/unix linuxthreads/sysdeps/i386/i686 linuxthreads/sysdeps/i386 sysdeps/unix/sysv/linux/i386/i686 sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu sysdeps/i386/i686 sysdeps/i386/i486 sysdeps/i386/fpu sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD compatible install... /static/bin/install -c
checking whether ln -s works... yes
checking for pwd... /static/bin/pwd
checking build system type... i686-pc-linux-gnu
checking for gcc... gcc
checking version of gcc... 3.2, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.79.1, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for makeinfo... makeinfo
checking version of makeinfo... 4.2, ok
checking for gsed... no
checking for sed... sed
checking version of sed... 3.02, ok
checking whether the C compiler (gcc  ) works... no
checking whether the C compiler (gcc  ) is a cross-compiler... (cached) yes
checking whether we are using GNU C... yes
checking build system type... i686-pc-linux-gnu
checking how to run the C preprocessor... /lib/cpp
checking whether /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/../../../../i686-pc-linux-gnu/bin/as is GNU as... yes
checking whether /static/lib/gcc-lib/i686-pc-linux-gnu/3.2/../../../../i686-pc-linux-gnu/bin/ld is GNU ld... yes
checking for mig... mig
configure: warning:
*** These auxiliary programs are missing or too old: msgfmt
*** some features will be disabled.
*** Check the INSTALL file for required versions.
checking whether ranlib is necessary... no
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/sh
checking for mawk... no
checking for gawk... no
checking for nawk... no
checking for awk... no
checking for perl... no
checking for install-info... /static/bin/install-info
checking for old Debian install-info... no
checking for bison... no
checking for signed size_t type... yes
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for .set assembler directive... no
checking for .symver assembler directive... yes
checking for ld --version-script... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking for -z nodelete option... yes
checking for -z nodlopen option... yes
checking for -z initfirst option... yes
checking for -Bgroup option... yes
checking for -z combreloc... yes
checking whether cc puts quotes around section names... no
checking for assembler .weak directive... yes
checking for ld --no-whole-archive... yes
checking for gcc -fexceptions... yes
checking for DWARF2 unwind info support... no
checking for __builtin_expect... yes
checking for local label subtraction... yes
checking for libgd... no
checking size of long double... 0
running configure fragment for ../glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux
running configure fragment for ../glibc-2.2.5/sysdeps/unix/sysv/linux
checking installed Linux kernel header files... 2.0.10 or later
checking for symlinks in /usr/include... ok
running configure fragment for ../glibc-2.2.5/sysdeps/unix/common
running configure fragment for ../glibc-2.2.5/sysdeps/unix
running configure fragment for ../glibc-2.2.5/sysdeps/generic
checking stdio selection... libio
checking for old glibc 2.0.x headers... no
checking whether -fPIC is default... no
updating cache ./config.cache
creating ./config.status
creating config.make
creating glibcbug
creating Makefile
creating config.h
configuring in linuxthreads
running /bin/sh ../../glibc-2.2.5/linuxthreads/configure  --prefix=/usr --disable-profile --enable-add-ons --libexecdir=/usr/bin --cache-file=.././config.cache --srcdir=../../glibc-2.2.5/linuxthreads
make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.2.5 objdir=`pwd` all
make[1]: Entering directory `/static/src/lfs-packages-4.0-rc1/glibc-2.2.5'
(echo 'sysd-rules-sysdirs := sysdeps/i386/elf linuxthreads/sysdeps/unix/sysv/linux/i386 linuxthreads/sysdeps/unix/sysv/linux linuxthreads/sysdeps/pthread sysdeps/pthread linuxthreads/sysdeps/unix/sysv linuxthreads/sysdeps/unix linuxthreads/sysdeps/i386/i686 linuxthreads/sysdeps/i386 sysdeps/unix/sysv/linux/i386/i686 sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu sysdeps/i386/i686 sysdeps/i386/i486 sysdeps/i386/fpu sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic';
      \
for dir in '$(..)sysdeps/i386/elf' '$(..)linuxthreads/sysdeps/unix/sysv/linux/i386' '$(..)linuxthreads/sysdeps/unix/sysv/linux' '$(..)linuxthreads/sysdeps/pthread' '$(..)sysdeps/pthread' '$(..)linuxthreads/sysdeps/unix/sysv' '$(..)linuxthreads/sysdeps/unix' '$(..)linuxthreads/sysdeps/i386/i686' '$(..)linuxthreads/sysdeps/i386'
'$(..)sysdeps/unix/sysv/linux/i386/i686' '$(..)sysdeps/unix/sysv/linux/i386' '$(..)sysdeps/unix/sysv/linux' '$(..)sysdeps/gnu' '$(..)sysdeps/unix/common' '$(..)sysdeps/unix/mman' '$(..)sysdeps/unix/inet' '$(..)sysdeps/unix/sysv/i386' '$(..)sysdeps/unix/sysv' '$(..)sysdeps/unix/i386' '$(..)sysdeps/unix' '$(..)sysdeps/posix' '$(..)sysdeps/i386/i686/fpu' '$(..)sysdeps/i386/i686' '$(..)sysdeps/i386/i486' '$(..)sysdeps/i386/fpu' '$(..)sysdeps/i386' '$(..)sysdeps/wordsize-32' '$(..)sysdeps/ieee754/ldbl-96' '$(..)sysdeps/ieee754/dbl-64' '$(..)sysdeps/ieee754/flt-32' '$(..)sysdeps/ieee754' '$(..)sysdeps/generic/elf' '$(..)sysdeps/generic'; do
   \
   for o in .o .os .op .og .ob .oS; do \
      \
     echo "\$(objpfx)%$o: $dir/%.S \$(before-compile); \
          \$(compile-command.S)";                                     \
     echo "\$(objpfx)%$o: $dir/%.s \$(before-compile); \
          \$(compile-command.s)";                                     \
        \
     echo "\$(objpfx)%$o: $dir/%.c \$(before-compile); \
          \$(compile-command.c)";                                     \
   done; \
    \
   echo "\$(objpfx)%.d: $dir/%.s \$(common-objpfx)dummy.d; \
        \$(make-dummy-dep)";                           \
   echo "\$(objpfx)%.d: $dir/%.S \$(before-compile); \
        \$(+make-deps)";                                              \
        \
   echo "\$(objpfx)%.d: $dir/%.c \$(before-compile); \
        \$(+make-deps)";                                              \
done;                                                                \
echo 'sysd-rules-done = t') > /static/src/lfs-packages-4.0-rc1/glibc-build/sysd-rulesT
mv -f /static/src/lfs-packages-4.0-rc1/glibc-build/sysd-rulesT /static/src/lfs-packages-4.0-rc1/glibc-build/sysd-rules
for dir in /static/src/lfs-packages-4.0-rc1/glibc-build sysdeps/i386/elf linuxthreads/sysdeps/unix/sysv/linux/i386 linuxthreads/sysdeps/unix/sysv/linux linuxthreads/sysdeps/pthread sysdeps/pthread linuxthreads/sysdeps/unix/sysv linuxthreads/sysdeps/unix linuxthreads/sysdeps/i386/i686 linuxthreads/sysdeps/i386 sysdeps/unix/sysv/linux/i386/i686 sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu sysdeps/i386/i686 sysdeps/i386/i486 sysdeps/i386/fpu sysdeps/i386 sysdeps/wordsize-32
sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic; do \
  test -f $dir/syscalls.list && \
  { /bin/sh sysdeps/unix/make-syscalls.sh $dir || exit 1; }; \
  test $dir = sysdeps/unix && break; \
done > /static/src/lfs-packages-4.0-rc1/glibc-build/sysd-syscallsT
mv -f /static/src/lfs-packages-4.0-rc1/glibc-build/sysd-syscallsT /static/src/lfs-packages-4.0-rc1/glibc-build/sysd-syscalls
'BEGIN { subdirs = ""; inhibit = "" };                  \
/^#/ { next };                                          \
/^[^-]/ { subdirs = subdirs " " $0 };                   \
/^-/ { inhibit = inhibit " " substr($0, 2) };           \
END { printf "sysdep-subdirs =%s\n", subdirs;           \
      printf "sysdep-inhibit-subdirs =%s\n", inhibit;   \
      print "sysd-dirs-done = t" }'                     \
       /dev/null linuxthreads/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs sysdeps/unix/Subdirs > /static/src/lfs-packages-4.0-rc1/glibc-build/sysd-dirs-tmp
/bin/sh: BEGIN { subdirs = ""; inhibit = "" };                   /^#/ { next };
         /^[^-]/ { subdirs = subdirs " " $0 };                   /^-/ { inhibit = inhibit " " substr($0, 2) };         END { printf "sysdep-subdirs =%s\n", subdirs;           printf "sysdep-inhibit-subdirs =%s\n", inhibit;       print "sysd-dirs-done = t" }: No such file or directory
make[1]: *** [/static/src/lfs-packages-4.0-rc1/glibc-build/sysd-dirs] Error 127
make[1]: Leaving directory `/static/src/lfs-packages-4.0-rc1/glibc-2.2.5'
make: *** [all] Error 2
发表于 2003-4-3 16:01:59 | 显示全部楼层
呵,这么多都贴得出来,你是在M$环境下安装的吗?用VMware?
还是在Linux安装的,用copy过来的。
请先说说你的安装环境。
 楼主| 发表于 2003-4-3 16:10:45 | 显示全部楼层
我的环境是redhat8.0
按照blfs的指导,一步一步到此,结果出现错误
 楼主| 发表于 2003-4-3 16:12:09 | 显示全部楼层
我正在一个虚拟的root里进行编译
发表于 2003-4-3 20:03:01 | 显示全部楼层
你先看一下有没有把上次第五章里编译时留下来的glibc和glibc-build两个目录删掉。然后再查一下有没有解压linuxthreads,最后看看有没有哪个包没装好(第五章里),是不是有动态链接的。
用file命令可以看出来,比如:
cd $LFS/static
find ./ -exec file {} \; | grep dynamic
发表于 2003-4-4 19:23:47 | 显示全部楼层
其实检查是否有动态连接库的文件,用这样也一样:
ldd $LFS/static/*
如果全部都正常的话,就只会在每个软件包的下面出现
no dynamic
如果有的话,就要退回去重新进行第5章该文件的编译。
发表于 2003-4-4 19:26:38 | 显示全部楼层
checking version of make... 3.79.1, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for makeinfo... makeinfo
checking version of makeinfo... 4.2, ok
checking for gsed... no
checking for sed... sed
checking version of sed... 3.02, ok

看这一段的信息,你用的是旧版本LFS BOOK说明进行编译的吧。
GCC-2.2.5,怎么不用GCC-3.2.2的呢?
现在新版本的都出来了呀。
是不是在新版本的GCC编译出的旧版本的静态程序有问题呀。
这只是我的猜想,但是也不对呀,一般都是向下兼容的。
还没有看清,还没有看清。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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