Open zombiezen opened 3 days ago
AFAICT neither of the gcc 4.0.4 copies that get built include a C++ compiler, so this checks out, so it's odd we have a C++ dependency.
I think the problem is that we try to configure libstdc++ before building gcc 4.7.4. (Not sure why this wouldn't be a problem in upstream.) Going to try changing the script to run the configure during the build.
On 94337c5913ee12753156a4c1a29c6ebf527ee772, I'm hitting a syntax error in the configure script. (As well as an issue with the preprocessor, but it seems to go past that?)
||| Configure for gcc
checking build system type... i386-unknown-linux-musl
checking host system type... i386-unknown-linux-musl
checking target system type... i386-unknown-linux-musl
checking LIBRARY_PATH variable... ok
checking GCC_EXEC_PREFIX variable... ok
checking whether to place generated files in the source directory... no
checking whether a default linker was specified... no
checking whether a default assembler was specified... no
checking for i386-unknown-linux-musl-gcc... i386-unknown-linux-musl-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i386-unknown-linux-musl-gcc accepts -g... yes
checking for i386-unknown-linux-musl-gcc option to accept ISO C89... none needed
../../gcc/configure: line 4310: AM_PROG_CC_C_O: not found
checking for i386-unknown-linux-musl-g++... no
checking for i386-unknown-linux-musl-c++... no
checking for i386-unknown-linux-musl-gpp... no
checking for i386-unknown-linux-musl-aCC... no
checking for i386-unknown-linux-musl-CC... no
checking for i386-unknown-linux-musl-cxx... no
checking for i386-unknown-linux-musl-cc++... no
checking for i386-unknown-linux-musl-cl.exe... no
checking for i386-unknown-linux-musl-FCC... no
checking for i386-unknown-linux-musl-KCC... no
checking for i386-unknown-linux-musl-RCC... no
checking for i386-unknown-linux-musl-xlC_r... no
checking for i386-unknown-linux-musl-xlC... no
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.exe... 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 i386-unknown-linux-musl-gnatbind... no
checking for gnatbind... no
checking for i386-unknown-linux-musl-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to run the C preprocessor... i386-unknown-linux-musl-gcc -E
checking for grep that handles long lines and -e... /zb/store/g83nksc36sjd7f5adpm9f03ni2l000gr-grep-2.4/bin/grep
checking for egrep... /zb/store/g83nksc36sjd7f5adpm9f03ni2l000gr-grep-2.4/bin/grep -E
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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking how to run the C preprocessor... i386-unknown-linux-musl-gcc -E
checking for inline... inline
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of void *... 4
checking size of short... 2
checking size of int... 4
checking size of long... 4
checking for long long... yes
checking size of long long... 8
checking for __int64... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for long long int... yes
checking for intmax_t... yes
checking for intptr_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for unsigned long long int... yes
checking for uintmax_t... yes
checking for uintptr_t... yes
checking whether i386-unknown-linux-musl-gcc supports -W... yes
checking whether i386-unknown-linux-musl-gcc supports -Wall... yes
checking whether i386-unknown-linux-musl-gcc supports -Wnarrowing... no
checking whether i386-unknown-linux-musl-gcc supports -Wwrite-strings... yes
checking whether i386-unknown-linux-musl-gcc supports -Wcast-qual... yes
checking whether i386-unknown-linux-musl-gcc supports -Wstrict-prototypes... yes
checking whether i386-unknown-linux-musl-gcc supports -Wmissing-prototypes... yes
checking whether i386-unknown-linux-musl-gcc supports -Wmissing-format-attribute... yes
checking whether i386-unknown-linux-musl-gcc supports -Wold-style-definition... yes
checking whether i386-unknown-linux-musl-gcc supports -Wc++-compat... no
checking whether i386-unknown-linux-musl-gcc supports -pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings... no
checking whether i386-unknown-linux-musl-gcc supports -fno-exceptions... yes
checking whether i386-unknown-linux-musl-gcc supports -fno-rtti... yes
checking valgrind.h usability... no
checking valgrind.h presence... no
checking for valgrind.h... no
checking for multiarch configuration... auto
configure: WARNING: fixed-point is not supported for this target, ignored
checking whether make sets $(MAKE)... yes
checking for gawk... gawk
checking whether ln -s works... yes
checking whether ln works... yes
checking for i386-unknown-linux-musl-ranlib... i386-unknown-linux-musl-ranlib
checking for a BSD compatible install... /zb/store/52jwy4z8ffqq1agbhl3gmmmh5wmfdygs-coreutils-9.4/bin/install -c
checking for cmp's capabilities... gnucompare
checking for mktemp... yes
checking for makeinfo... makeinfo
checking for modern makeinfo... yes
checking for recent Pod::Man... yes
checking for flex... flex
checking for bison... bison
checking for nm... nm
checking for ar... ar
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking whether string.h and strings.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for limits.h... yes
checking for stddef.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for time.h... yes
checking for iconv.h... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for sys/file.h... yes
checking for sys/time.h... yes
checking for sys/mman.h... yes
checking for sys/resource.h... yes
checking for sys/param.h... yes
checking for sys/times.h... yes
checking for sys/stat.h... (cached) yes
checking for direct.h... no
checking for malloc.h... yes
checking for langinfo.h... yes
checking for ldfcn.h... no
checking for locale.h... yes
checking for wchar.h... yes
checking for thread.h... no
checking for pthread.h... yes
checking for CHAR_BIT... yes
checking whether byte ordering is bigendian... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/build/src/gcc-4.7.4/build/gcc-4.7.4/build/gcc':
configure: WARNING: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
checking for unordered_map... no
checking for tr1/unordered_map... no
checking for ext/hash_map... no
checking for collect2 libraries... none required
checking for library containing exc_resume... no
checking for library containing kstat_open... no
checking for library containing ldexp... none required
checking for inttypes.h... yes
checking for times... yes
checking for clock... yes
checking for kill... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for atoll... yes
checking for atoq... no
checking for sysconf... yes
checking for strsignal... yes
checking for getrusage... yes
checking for nl_langinfo... yes
checking for gettimeofday... yes
checking for mbstowcs... yes
checking for wcswidth... yes
checking for mmap... yes
checking for setlocale... yes
checking for clearerr_unlocked... yes
checking for feof_unlocked... yes
checking for ferror_unlocked... yes
checking for fflush_unlocked... yes
checking for fgetc_unlocked... yes
checking for fgets_unlocked... yes
checking for fileno_unlocked... yes
checking for fprintf_unlocked... no
checking for fputc_unlocked... yes
checking for fputs_unlocked... yes
checking for fread_unlocked... yes
checking for fwrite_unlocked... yes
checking for getchar_unlocked... yes
checking for getc_unlocked... yes
checking for putchar_unlocked... yes
checking for putc_unlocked... yes
checking for madvise... yes
checking whether mbstowcs works... yes
checking for ssize_t... yes
checking for caddr_t... yes
checking for sys/mman.h... (cached) yes
checking for mmap... (cached) yes
checking whether read-only mmap of a plain file works... yes
checking whether mmap from /dev/zero works... yes
checking for MAP_ANON(YMOUS)... yes
checking whether mmap with MAP_ANON(YMOUS) works... yes
checking for pid_t... yes
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for ld used by i386-unknown-linux-musl-gcc... /zb/store/zplgml1x7n5dwqy10xmy17szvdpsg280-binutils-2.30/bin/ld
checking if the linker (/zb/store/zplgml1x7n5dwqy10xmy17szvdpsg280-binutils-2.30/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... yes
checking for ELF binary format... yes
checking for the common suffixes of directories in the library search path... lib,lib,lib
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
../../gcc/configure: line 10955: syntax error: unexpected "fi"
Alright, I'm confused. libcpp (the C preprocessor) is actually the configure step that's failing. We shouldn't be passing any flags that cause the build to use a C++ compiler, so this is even more confusing. I'm going to have to keep sitting with the configure.ac to figure out why this is happening, I think.
I'm failing to build the GCC 4.7.4 from live-bootstrap. The basic error is: