标签:
$tar xf Glibc2.3.4.tar.bz2
$mkdir build_glibc
$cd build_glibc
../glibc-2.3.4/configure --prefix=/tools \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --with-binutils=/tools/bin \
--without-gd --with-headers=/tools/include \
--without-selinux
报错如下
备注:在configure之前需要向上面那样的步骤那样另外建立一个新目录作为编译的目录,不然可能会看到类似的提示:
$ ./configure
configure: error: you must configure in a separate build directory
出错信息:
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
configure: running configure fragment for add-on nptl
checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 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... /usr/bin/install -c
checking whether ln -s works... yes
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for ranlib... ranlib
checking whether as is GNU as... yes
checking whether ld is GNU ld... yes
checking for as... as
checking version of as... 2.20.1, bad
checking for ld... ld
checking version of ld... 2.20.1, bad
checking for pwd... /bin/pwd
checking for gcc... gcc
checking version of gcc... 4.4.3, ok
checking for gnumake... no
checking for gmake... no
checking for make... make
checking version of make... 3.81, ok
checking for gnumsgfmt... no
checking for gmsgfmt... no
checking for msgfmt... no
checking for makeinfo... no
checking for sed... sed
checking version of sed... 4.2.1, ok
checking for autoconf... no
configure: error:
*** These critical programs are missing or too old: as ld
*** Check the INSTALL file for required versions.
参考解决方法:
$sudo apt-get install g++
$sudo apt-get install autoconf
最后面的那个错误是GCC版本太低或太高了,而我这个太高了
$ld -v
GNU ld (GNU Binutils for Ubuntu) 2.20.1-system.20100303
本来系统就已装有且,版本也不低
修改configure文骗过它
3921 if test -z "$LD"; then
3922 ac_verc_fail=yes
3923 else
3924 # Found it, now check the version.
3925 echo "$as_me:$LINENO: checking version of $LD" >&5
3926 echo $ECHO_N "checking version of $LD... $ECHO_C" >&6
3927 ac_prog_version=`$LD --version 2>&1 | sed -n ‘s/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p‘`
3928 case $ac_prog_version in
3929 ‘‘) ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
3930 2.1[3-9]*|2.2[3-9]*)
3931 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
3932 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
以上红色部分为增加
标签:
原文地址:http://www.cnblogs.com/wuxie1989/p/5855889.html