尝试在 ubuntu 中编译 glibc。为什么 configure 在 linuxthreads 处停止?

尝试在 ubuntu 中编译 glibc。为什么 configure 在 linuxthreads 处停止?

这是 config.log 的内容:

我禁用了它,_FORTIFY_SOURCE因为它引发了错误。但我完全不知道可能出了什么问题。

(我知道这个帖子,建议--disable-sanity-checks

如果我从源文件夹中删除 linuxthreads(2.3),配置不会失败。

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Library configure (see version.h), which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ /home/ubuntu/Downloads/glibc-2.16.0/configure --enable-add-ons --disable-sanity-checks CPP=gcc -E -D_FORTIFY_SOURCE=0 -U_FORTIFY_SOURCE

## --------- ##
## Platform. ##
## --------- ##

hostname = ubuntu
uname -m = i686
uname -r = 3.2.0-29-generic-pae
uname -s = Linux
uname -v = #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2294: checking build system type
configure:2308: result: i686-pc-linux-gnu
configure:2328: checking host system type
configure:2341: result: i686-pc-linux-gnu
configure:2410: checking for gcc
configure:2426: found /usr/bin/gcc
configure:2437: result: gcc
configure:2666: checking for C compiler version
configure:2675: gcc --version >&5
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2686: $? = 0
configure:2675: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
configure:2686: $? = 0
configure:2691: checking for suffix of object files
configure:2713: gcc -c   conftest.c >&5
configure:2717: $? = 0
configure:2738: result: o
configure:2742: checking whether we are using the GNU C compiler
configure:2761: gcc -c   conftest.c >&5
configure:2761: $? = 0
configure:2770: result: yes
configure:2779: checking whether gcc accepts -g
configure:2799: gcc -c -g  conftest.c >&5
configure:2799: $? = 0
configure:2840: result: yes
configure:2857: checking for gcc option to accept ISO C89
configure:2921: gcc  -c -g -O2  conftest.c >&5
configure:2921: $? = 0
configure:2934: result: none needed
configure:3004: checking how to run the C preprocessor
configure:3074: result: gcc -E -D_FORTIFY_SOURCE=0 -U_FORTIFY_SOURCE
configure:3094: gcc -E -D_FORTIFY_SOURCE=0 -U_FORTIFY_SOURCE  conftest.c
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
configure:3094: $? = 0
configure:3108: gcc -E -D_FORTIFY_SOURCE=0 -U_FORTIFY_SOURCE  conftest.c
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
<built-in>:0:0: note: this is the location of the previous definition
conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
compilation terminated.
configure:3108: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Library"
| #define PACKAGE_TARNAME "glibc"
| #define PACKAGE_VERSION "(see version.h)"
| #define PACKAGE_STRING "GNU C Library (see version.h)"
| #define PACKAGE_BUGREPORT "http://sourceware.org/bugzilla/"
| #define PACKAGE_URL "http://www.gnu.org/software/glibc/"
| /* end confdefs.h.  */
| #include <ac_nonexistent.h>
configure:3195: checking for g++
configure:3211: found /usr/bin/g++
configure:3222: result: g++
configure:3249: checking for C++ compiler version
configure:3258: g++ --version >&5
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3269: $? = 0
configure:3258: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
configure:3269: $? = 0
configure:3258: g++ -V >&5
g++: error: unrecognized option '-V'
g++: fatal error: no input files
compilation terminated.
configure:3269: $? = 4
configure:3258: g++ -qversion >&5
g++: error: unrecognized option '-qversion'
g++: fatal error: no input files
compilation terminated.
configure:3269: $? = 4
configure:3273: checking whether we are using the GNU C++ compiler
configure:3292: g++ -c   conftest.cpp >&5
configure:3292: $? = 0
configure:3301: result: yes
configure:3310: checking whether g++ accepts -g
configure:3330: g++ -c -g  conftest.cpp >&5
configure:3330: $? = 0
configure:3371: result: yes
configure:3815: checking for sysdeps preconfigure fragments
configure:3822: result: 
configure:3896: running configure fragment for add-on libidn
configure:3896: running configure fragment for add-on linuxthreads

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=set
ac_cv_env_CPP_value='gcc -E -D_FORTIFY_SOURCE=0 -U_FORTIFY_SOURCE'
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-linux-gnu
ac_cv_objext=o
ac_cv_prog_CPP='gcc -E -D_FORTIFY_SOURCE=0 -U_FORTIFY_SOURCE'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
libc_cv_nss_crypt=no

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AS=''
ASFLAGS_config=''
AUTOCONF=''
AWK=''
BASH_SHELL=''
BISON=''
BUILD_CC=''
CC='gcc'
CFLAGS='-g -O2'
CPP='gcc -E -D_FORTIFY_SOURCE=0 -U_FORTIFY_SOURCE'
CPPFLAGS=''
CPPUNDEFS=''
CXX='g++'
CXXFLAGS='-g -O2'
CXX_SYSINCLUDES=''
DEFINES=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
INSTALL_DATA=''
INSTALL_INFO=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
KSH=''
LD=''
LDFLAGS=''
LIBGD=''
LIBOBJS=''
LIBS=''
LN_S=''
LTLIBOBJS=''
MAKE=''
MAKEINFO=''
MIG=''
MSGFMT=''
NM=''
OBJCOPY=''
OBJDUMP=''
OBJEXT='o'
PACKAGE_BUGREPORT='http://sourceware.org/bugzilla/'
PACKAGE_NAME='GNU C Library'
PACKAGE_STRING='GNU C Library (see version.h)'
PACKAGE_TARNAME='glibc'
PACKAGE_URL='http://www.gnu.org/software/glibc/'
PACKAGE_VERSION='(see version.h)'
PATH_SEPARATOR=':'
PERL=''
READELF=''
RELEASE=''
SED=''
SHELL='/bin/bash'
SYSINCLUDES=''
VERSION=''
VERSIONING=''
ac_ct_CC='gcc'
ac_ct_CXX='g++'
add_on_subdirs=' libidn'
add_ons='libidn
all_warnings=''
base_machine=''
bindir='${exec_prefix}/bin'
bindnow='no'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
cross_compiling='no'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exceptions=''
exec_prefix='NONE'
fno_unit_at_a_time=''
force_install='yes'
gnu89_inline=''
have_libaudit=''
have_libcap=''
have_selinux=''
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
ldd_rewrite_script=''
libc_cv_Bgroup=''
libc_cv_as_i686=''
libc_cv_cc_avx=''
libc_cv_cc_fma4=''
libc_cv_cc_nofma=''
libc_cv_cc_novzeroupper=''
libc_cv_cc_sse2avx=''
libc_cv_cc_sse4=''
libc_cv_cc_submachine=''
libc_cv_cc_with_libunwind=''
libc_cv_cpp_asm_debuginfo=''
libc_cv_forced_unwind=''
libc_cv_fpie=''
libc_cv_gcc_static_libgcc=''
libc_cv_gcc_unwind_find_fde=''
libc_cv_hashstyle=''
libc_cv_have_bash2=''
libc_cv_have_ksh=''
libc_cv_localedir=''
libc_cv_localstatedir=''
libc_cv_nss_crypt='no'
libc_cv_output_format=''
libc_cv_pic_default=''
libc_cv_rootsbindir=''
libc_cv_slibdir=''
libc_cv_sparc_as_vis3=''
libc_cv_ssp=''
libc_cv_sysconfdir=''
libc_cv_z_combreloc=''
libc_cv_z_execstack=''
libc_extra_cflags=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
link_obsolete_rpc='no'
linuxthreads
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mach_interface_list=''
mandir='${datarootdir}/man'
multi_arch='default'
nptl'
old_glibc_headers=''
oldest_abi='default'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
profile='no'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
shared='yes'
sharedstatedir='${prefix}/com'
sizeof_long_double=''
static=''
static_nss='no'
subdirs='  '
submachine=''
sysconfdir='${prefix}/etc'
sysdeps_add_ons=''
sysnames=''
target_alias=''
use_default_link='default'
use_ldconfig=''
with_fp='yes'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "GNU C Library"
#define PACKAGE_TARNAME "glibc"
#define PACKAGE_VERSION "(see version.h)"
#define PACKAGE_STRING "GNU C Library (see version.h)"
#define PACKAGE_BUGREPORT "http://sourceware.org/bugzilla/"
#define PACKAGE_URL "http://www.gnu.org/software/glibc/"
#define HAVE_LIBIDN 1

configure: exit 0

答案1

这是因为 linuxthreads 的配置文件中只有一行exit 0(这显然导致整个脚本在读取时停止)。

我所做的是将linuxthreads的配置内容更改为libidn的配置内容:

libc_add_on_canonical=
libc_add_on_subdirs=.

相关内容