当前位置: 技术问答>linux和unix
gcc4.8.2 编译错误 求助
来源: 互联网 发布时间:2017-05-05
本文导语: checking for --enable-version-specific-runtime-libs... no checking for --enable-generated-files-in-srcdir... no checking build system type... i686-pc-linux-gnu checking host system type... i686-lfs-linux-gnu checking target system type... i686-lfs-linux-gnu checking...
checking for --enable-version-specific-runtime-libs... no
checking for --enable-generated-files-in-srcdir... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-lfs-linux-gnu
checking target system type... i686-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-lfs-linux-gnu-strip... /tools/i686-lfs-linux-gnu/bin/strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-lfs-linux-gnu-gcc... /LFS/sources/gcc-build/./gcc/xgcc -B/LFS/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include
checking for C compiler default output file name...
configure: error: in `/LFS/sources/gcc-build/i686-lfs-linux-gnu/libatomic':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libatomic] Error 1
make[1]: Leaving directory `/LFS/sources/gcc-build'
make: *** [all] Error 2
下面是config.log
checking for --enable-generated-files-in-srcdir... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-lfs-linux-gnu
checking target system type... i686-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i686-lfs-linux-gnu-strip... /tools/i686-lfs-linux-gnu/bin/strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-lfs-linux-gnu-gcc... /LFS/sources/gcc-build/./gcc/xgcc -B/LFS/sources/gcc-build/./gcc/ -B/tools/i686-lfs-linux-gnu/bin/ -B/tools/i686-lfs-linux-gnu/lib/ -isystem /tools/i686-lfs-linux-gnu/include -isystem /tools/i686-lfs-linux-gnu/sys-include
checking for C compiler default output file name...
configure: error: in `/LFS/sources/gcc-build/i686-lfs-linux-gnu/libatomic':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [configure-target-libatomic] Error 1
make[1]: Leaving directory `/LFS/sources/gcc-build'
make: *** [all] Error 2
下面是config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ ../gcc/configure --target=i686-lfs-linux-gnu --prefix=/tools --with-sysroot=/LFS --with-newlib --without-headers --with-local-prefix=/tools --with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --enable-languages=c --with-mpfr-include=/LFS/sources/gcc-build/../gcc/mpfr/src --with-mpfr-lib=/LFS/sources/gcc-build/mpfr/src/.libs
## --------- ##
## Platform. ##
## --------- ##
hostname = zero-ubuntu
uname -m = i686
uname -r = 3.8.0-34-generic
uname -s = Linux
uname -v = #49~precise1-Ubuntu SMP Wed Nov 13 18:08:04 UTC 2013
/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: /tools/bin
PATH: /bin
PATH: /usr/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2317: checking build system type
configure:2331: result: i686-pc-linux-gnu
configure:2378: checking host system type
configure:2391: result: i686-pc-linux-gnu
configure:2411: checking target system type
configure:2424: result: i686-lfs-linux-gnu
configure:2478: checking for a BSD-compatible install
configure:2546: result: /usr/bin/install -c
configure:2557: checking whether ln works
configure:2579: result: yes
configure:2583: checking whether ln -s works
configure:2587: result: yes
configure:2594: checking for a sed that does not truncate output
configure:2658: result: /bin/sed
configure:2667: checking for gawk
configure:2683: found /usr/bin/gawk
configure:2694: result: gawk
configure:3164: checking for libatomic support
configure:3174: result: yes
configure:3183: checking for libitm support
configure:3193: result: yes
configure:3202: checking for libsanitizer support
configure:3212: result: yes
configure:3936: checking for gcc
configure:3952: found /usr/bin/gcc
configure:3963: result: gcc
configure:4192: checking for C compiler version
configure:4201: 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:4212: $? = 0
configure:4201: 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:4212: $? = 0
configure:4201: gcc -V >&5
gcc: error: unrecognized option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4212: $? = 4
configure:4201: gcc -qversion >&5
gcc: error: unrecognized option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:4212: $? = 4
configure:4232: checking for C compiler default output file name
configure:4254: gcc conftest.c >&5
configure:4258: $? = 0
configure:4295: result: a.out
configure:4311: checking whether the C compiler works
configure:4320: ./a.out
configure:4324: $? = 0
configure:4339: result: yes
configure:4346: checking whether we are cross compiling
configure:4348: result: no
configure:4351: checking for suffix of executables
configure:4358: gcc -o conftest conftest.c >&5
configure:4362: $? = 0
configure:4384: result:
configure:4390: checking for suffix of object files
configure:4412: gcc -c conftest.c >&5
configure:4416: $? = 0
configure:4437: result: o
configure:4441: checking whether we are using the GNU C compiler
configure:4460: gcc -c conftest.c >&5
configure:4460: $? = 0
configure:4469: result: yes
configure:4478: checking whether gcc accepts -g
configure:4498: gcc -c -g conftest.c >&5
configure:4498: $? = 0
configure:4539: result: yes
configure:4556: checking for gcc option to accept ISO C89
configure:4620: gcc -c conftest.c >&5
configure:4620: $? = 0
configure:4633: result: none needed
configure:4711: checking for g++
configure:4727: found /usr/bin/g++
configure:4738: result: g++
configure:4765: checking for C++ compiler version
configure:4774: 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:4785: $? = 0
configure:4774: 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:4785: $? = 0
configure:4774: g++ -V >&5
g++: error: unrecognized option '-V'
g++: fatal error: no input files
compilation terminated.
configure:4785: $? = 4
configure:4774: g++ -qversion >&5
g++: error: unrecognized option '-qversion'
g++: fatal error: no input files
compilation terminated.
configure:4785: $? = 4
configure:4789: checking whether we are using the GNU C++ compiler
configure:4808: g++ -c conftest.cpp >&5
configure:4808: $? = 0
configure:4817: result: yes
configure:4826: checking whether g++ accepts -g
configure:4846: g++ -c -g conftest.cpp >&5
configure:4846: $? = 0
configure:4887: result: yes
configure:4936: checking whether g++ accepts -static-libstdc++ -static-libgcc
configure:4953: g++ -o conftest -g -O2 -static-libstdc++ -static-libgcc conftest.cpp >&5
configure:4953: $? = 0
configure:4954: result: yes
configure:5018: checking for gnatbind
configure:5048: result: no
configure:5110: checking for gnatmake
configure:5140: result: no
configure:5159: checking whether compiler driver understands Ada
configure:5182: result: no
configure:5191: checking how to compare bootstrapped objects
configure:5216: result: cmp --ignore-initial=16 $$f1 $$f2
configure:5270: checking for objdir
configure:5285: result: .libs
configure:5857: checking for version 0.10 of ISL
configure:5876: gcc -o conftest -I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp -I/LFS/sources/gcc-build/../gcc/mpfr/src -I$$s/mpc/src conftest.c -lisl >&5
conftest.c:10:25: fatal error: isl/version.h: No such file or directory
compilation terminated.
configure:5876: $? = 1
configure: program exited with status 1
configure: failed program was:
|
遇到同样到问题,求解ing...
|
看你的目录是在做lfs,我没有做过。
我是在CentOS 6.2 x86_64下编译的gcc 4.8.2。没有用什么脚本,gmp,mpfr,mpc,isl,cloog都是分别下载最新的版本并在独立的目录下先编译的,gcc当然也是,没有什么问题。
看你的提示似乎是没有下载isl编译啊。
我是在CentOS 6.2 x86_64下编译的gcc 4.8.2。没有用什么脚本,gmp,mpfr,mpc,isl,cloog都是分别下载最新的版本并在独立的目录下先编译的,gcc当然也是,没有什么问题。
看你的提示似乎是没有下载isl编译啊。