我正在尝试构建 mpc 以便可以编译 gcc 4.5,但出现以下失败:
In file included from /usr/include/iso/stdarg_c99.h:34,
from /usr/include/stdarg.h:33,
from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include/stdio.h:14,
from tio_str.c:23:
/usr/include/sys/feature_tests.h:332:2: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"
gmake[2]: *** [tio_str.o] Error 1
gmake[2]: Leaving directory `/export/home/username/build-dir/dev/dev/mpc-0.8.2/tests'
gmake[1]: *** [check-am] Error 2
gmake[1]: Leaving directory `/export/home/username/build-dir/dev/dev/mpc-0.8.2/tests'
gmake: *** [check-recursive] Error 1
更多信息:
username@servername> /usr/sfw/bin/gcc -v
Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
Configured with: /sfw10/builds/build/sfw10-patch/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/ccs/bin/as --without-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
username@servername> /usr/sfw/bin/gmake -v
GNU Make 3.81
Copyright (C) 2006 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.
This program built for sparc-sun-solaris2.10
/export/home/username/build-dir/dev/dev/mpc-0.8.2
username@servername> ./configure --prefix=/export/home/username/build-dir/bin/mpc --with-gmp=/export/home/username/build-dir/bin/gmp/ --with-mpfr=/export/home/username/build-dir/bin/mpfr/
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/sfw/bin/ggrep
checking for egrep... /usr/sfw/bin/ggrep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for CC and CFLAGS in gmp.h... yes CC=gcc -std=gnu99 CFLAGS=-m32 -O2 -pedantic -Wa,-xarch=v8plus -mcpu=ultrasparc3
checking for CC=gcc -std=gnu99 and CFLAGS=-m32 -O2 -pedantic -Wa,-xarch=v8plus -mcpu=ultrasparc3... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/sfw/bin/ggrep -F
checking for ld used by gcc -std=gnu99... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/ccs/bin//nm -p
checking the name lister (/usr/ccs/bin//nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786240
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/ccs/bin//nm -p output from gcc -std=gnu99 object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for __gmpz_init in -lgmp... yes
checking for MPFR... yes
checking for recent GMP... yes
checking for recent MPFR... yes
checking for ANSI C header files... (cached) yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for gettimeofday... yes
checking for localeconv... yes
checking for setlocale... yes
checking for dup... yes
checking for dup2... yes
checking for fileno... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
答案1
make check 失败,库已成功构建。您无需运行 make check 即可安装该库。