|
From: Sisyphus <sis...@op...> - 2008-01-11 05:55:14
|
----- Original Message -----
From: "Keith Marshall" <kei...@us...>
.
.
>> Is that sane?
>
> Perfectly sane: at this stage, you are now running the cross-compiler
> you just built, to build the foreign libraries it will use, when linking
> code for the Win32 target platform; that cross-compiler should *never*
> find sys/wait.h, for it is not supposed to be present, (unless you are
> deploying some third party add-on library which provides it).
>
I see. (Thinking about it, the fact that MinGW doesn't have sys/wait.h
should probably have been sufficient to tell me that sys/wait.h should not
be present :-)
.
.>
> The burning issue is, when you come to use the cross-compiler to build a
> crossed-native compiler for mingw32, why does configure believe that it
> can find sys/wait.h, for by this stage of your build, it should only
> ever be using i686-pc-mingw32-gcc to perform the check, and that should
> always say `no'. Is it possible that you have some cross pollution of
> the include paths, for your native and cross-hosted compilers?
I guess that's possible - though I can find no evidence of it except for
when it comes to building MinGW.
> Or maybe,
> a stale cache file, (which configure really ought to reject), from the
> cross-compiler build propagating misinformation to the crossed-native
> build? Make sure you invoke the crossed-native build in a completely
> independent, and clean (empty) build directory.
I've now switched to an independent and clean build directory - but the
problem still persists.
It turns out that 'auto-build.h' is defining HAVE_SYS_WAIT_H. And I guess
that's based on what configure produces. Perhaps I'm supplying a bad
argument to configure ? Here's what gcc-3.4.5-build.sh now looks like:
--------------------------------------------
#!/bin/sh
../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=i386-pc-mingw32
--target=mingw32 --prefix=/home/rob/mingw_vista --enable-threads=win32 --disable-nls
--enable-languages=c,f77 --disable-win32-registry --disable-shared --enable-sjlj-exceptions
--without-x --enable-interpreter --enable-hash-synchronization --disable-bootstrap
--build=i686-pc-linux-gnu
make CFLAGS="-O2 -fomit-frame-pointer -D__USE_MINGW_ACCESS"
CXXFLAGS="-mthreads -fno-omit-frame-pointer -O2" LDFLAGS=-s 2>err.log
#make -C gcc CFLAGS="-O2 -D__USE_MINGW_ACCESS" LDFLAGS=-s gnatlib_and_tools
--------------------------------------------
If those configure args are ok then I can only think that there must be some
"cross pollution" as mentioned above.
Below my sig is the entire output of running 'sh gcc-3.4.5-build.sh'.
Configure twice tries to find sys/wait.h. The first attempt fails, but the
second succeeds - and it's that success which (I'm assuming) leads to the
defining of HAVE_SYS_WAIT_H in auto-build.h.
Just to repeat the error I'm getting (which gets written to err.log):
---------------------------------------------
In file included from ../gcc/genmodes.c:23:
../gcc/system.h:252:22: sys/wait.h: No such file or directory
make: *** [genmodes.o] Error 1
---------------------------------------------
Cheers,
Rob
checking build system type... i686-pc-linux-gnu
checking host system type... i386-pc-mingw32
checking target system type... i386-pc-mingw32
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-pc-mingw32-gcc... i386-pc-mingw32-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i386-pc-mingw32-gcc accepts -g... yes
checking for i386-pc-mingw32-gcc option to accept ANSI C... none needed
checking whether i386-pc-mingw32-gcc and cc understand -c and -o together...
yes
checking whether i386-pc-mingw32-gcc accepts -Wno-long-long... yes
checking how to run the C preprocessor... i386-pc-mingw32-gcc -E
checking for inline... inline
checking for long long int... yes
checking for __int64... no
checking for built-in _Bool... yes
checking size of void *... 4
checking size of short... 2
checking size of int... 4
checking size of long... 4
checking size of long long... 8
checking for i386-pc-mingw32-gnatbind... no
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking for egrep... 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 valgrind.h usability... no
checking valgrind.h presence... no
checking for valgrind.h... no
checking whether make sets $(MAKE)... yes
checking for gawk... gawk
checking whether ln works... yes
checking whether ln -s works... yes
checking for i386-pc-mingw32-ranlib... i386-pc-mingw32-ranlib
checking for a BSD compatible install... /usr/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 GNU C library... no
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for working stdbool.h... yes
checking whether string.h and strings.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... no
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 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... no
checking for sys/resource.h... no
checking for sys/param.h... yes
checking for sys/times.h... no
checking for sys/stat.h... (cached) yes
checking for direct.h... yes
checking for malloc.h... yes
checking for langinfo.h... no
checking for ldfcn.h... no
checking for locale.h... yes
checking for wchar.h... yes
checking for thread.h... no
checking for pthread.h... no
checking for CHAR_BIT... yes
checking whether byte ordering is bigendian... no
checking for collect2 libraries... none required
checking for library containing exc_resume... no
checking for library containing ldexp... none required
checking for inttypes.h... yes
checking for times... no
checking for clock... yes
checking for dup2... yes
checking for kill... no
checking for getrlimit... no
checking for setrlimit... no
checking for atoll... yes
checking for atoq... no
checking for sysconf... no
checking for strsignal... no
checking for putc_unlocked... no
checking for fputc_unlocked... no
checking for fputs_unlocked... no
checking for fwrite_unlocked... no
checking for fprintf_unlocked... no
checking for getrusage... no
checking for nl_langinfo... no
checking for scandir... no
checking for alphasort... no
checking for gettimeofday... yes
checking for mbstowcs... yes
checking for wcswidth... no
checking for mmap... no
checking for mincore... no
checking for setlocale... yes
checking whether mbstowcs works... yes
checking for ssize_t... yes
checking for uid_t in sys/types.h... no
checking type of array argument to getgroups... int
checking whether the printf functions support %p... no
checking for pid_t... yes
checking for unistd.h... (cached) yes
checking for vfork.h... no
checking for fork... no
checking for vfork... no
checking for iconv.h... no
checking for iconv... no, consider installing GNU libiconv
checking for LC_MESSAGES... no
checking whether getenv is declared... yes
checking whether atol is declared... yes
checking whether sbrk is declared... no
checking whether abort is declared... yes
checking whether atof is declared... yes
checking whether getcwd is declared... yes
checking whether getwd is declared... no
checking whether strsignal is declared... yes
checking whether putc_unlocked is declared... no
checking whether fputs_unlocked is declared... no
checking whether fwrite_unlocked is declared... no
checking whether fprintf_unlocked is declared... no
checking whether strstr is declared... yes
checking whether errno is declared... yes
checking whether snprintf is declared... yes
checking whether vasprintf is declared... no
checking whether malloc is declared... yes
checking whether realloc is declared... yes
checking whether calloc is declared... yes
checking whether free is declared... yes
checking whether basename is declared... no
checking whether getopt is declared... no
checking whether clock is declared... yes
checking whether getrlimit is declared... no
checking whether setrlimit is declared... no
checking whether getrusage is declared... no
checking whether ldgetname is declared... no
checking whether times is declared... no
checking for struct tms... no
checking for clock_t... yes
checking for uchar...
checking for .preinit_array/.init_array/.fini_array support... no
checking if mkdir takes one argument... yes
Using `../gcc/config/i386/i386.c' for machine-specific logic.
Using `../gcc/config/i386/i386.md' as machine description file.
Using the following target machine macro files:
../gcc/config/i386/i386.h
../gcc/config/i386/unix.h
../gcc/config/i386/bsd.h
../gcc/config/i386/gas.h
../gcc/config/dbxcoff.h
../gcc/config/i386/cygming.h
../gcc/config/i386/mingw32.h
Using `../gcc/config/ i386/xm-mingw32.h' as host machine macro file.
Using host-mingw32.o for host machine hooks.
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i386-pc-mingw32
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 i686-pc-linux-gnu-gcc... no
checking for gcc... 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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking whether gcc accepts -Wno-long-long... yes
checking how to run the C preprocessor... gcc -E
checking for inline... inline
checking for long long int... yes
checking for __int64... no
checking for built-in _Bool... yes
checking size of void *... 4
checking size of short... 2
checking size of int... 4
checking size of long... 4
checking size of long long... 8
checking for i686-pc-linux-gnu-gnatbind... no
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking for egrep... 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 valgrind.h usability... no
checking valgrind.h presence... no
checking for valgrind.h... no
checking whether make sets $(MAKE)... yes
checking for gawk... gawk
checking whether ln works... yes
checking whether ln -s works... yes
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for a BSD compatible install... /usr/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 GNU C library... yes
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for working stdbool.h... 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 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 for collect2 libraries... none required
checking for library containing exc_resume... no
checking for library containing ldexp... none required
checking for inttypes.h... yes
checking for times... yes
checking for clock... yes
checking for dup2... 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 putc_unlocked... yes
checking for fputc_unlocked... yes
checking for fputs_unlocked... yes
checking for fwrite_unlocked... yes
checking for fprintf_unlocked... no
checking for getrusage... yes
checking for nl_langinfo... yes
checking for scandir... yes
checking for alphasort... yes
checking for gettimeofday... yes
checking for mbstowcs... yes
checking for wcswidth... yes
checking for mmap... yes
checking for mincore... yes
checking for setlocale... yes
checking whether mbstowcs works... yes
checking for ssize_t... yes
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking whether the printf functions support %p... 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 unistd.h... (cached) 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 iconv.h... yes
checking for iconv... yes
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t
*inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for LC_MESSAGES... yes
checking whether getenv is declared... yes
checking whether atol is declared... yes
checking whether sbrk is declared... yes
checking whether abort is declared... yes
checking whether atof is declared... yes
checking whether getcwd is declared... yes
checking whether getwd is declared... yes
checking whether strsignal is declared... yes
checking whether putc_unlocked is declared... yes
checking whether fputs_unlocked is declared... yes
checking whether fwrite_unlocked is declared... yes
checking whether fprintf_unlocked is declared... no
checking whether strstr is declared... yes
checking whether errno is declared... yes
checking whether snprintf is declared... yes
checking whether vasprintf is declared... yes
checking whether malloc is declared... yes
checking whether realloc is declared... yes
checking whether calloc is declared... yes
checking whether free is declared... yes
checking whether basename is declared... yes
checking whether getopt is declared... no
checking whether clock is declared... yes
checking whether getrlimit is declared... yes
checking whether setrlimit is declared... yes
checking whether getrusage is declared... yes
checking whether ldgetname is declared... no
checking whether times is declared... yes
checking for struct tms... yes
checking for clock_t... yes
checking for uchar...
checking for .preinit_array/.init_array/.fini_array support... yes
checking if mkdir takes one argument... no
Using `../../gcc/config/i386/i386.c' for machine-specific logic.
Using `../../gcc/config/i386/i386.md' as machine description file.
Using the following target machine macro files:
../../gcc/config/i386/i386.h
../../gcc/config/i386/unix.h
../../gcc/config/i386/bsd.h
../../gcc/config/i386/gas.h
../../gcc/config/dbxcoff.h
../../gcc/config/i386/cygming.h
../../gcc/config/i386/mingw32.h
Using host-linux.o for host machine hooks.
checking whether NLS is requested... no
checking what assembler to use... mingw32-as
checking what linker to use... mingw32-ld
checking what nm to use... mingw32-nm
checking what objdump to use... mingw32-objdump
checking assembler for .balign and .p2align... no
checking assembler for .p2align with maximum skip... no
checking assembler for working .subsection -1... no
checking assembler for .weak... no
checking assembler for .nsubspa comdat... no
checking assembler for .hidden... no
checking linker for .hidden support... no
checking assembler for .sleb128 and .uleb128... no
checking assembler for eh_frame optimization... no
checking assembler for section merging support... no
checking assembler for thread-local storage support... no
checking assembler for filds and fists mnemonics... no
checking assembler for cmov syntax... no
checking assembler for GOTOFF in data... no
checking assembler for dwarf2 debug_line support... no
checking assembler for buggy dwarf2 .file directive... no
checking assembler for --gdwarf2 option... no
checking assembler for --gstabs option... no
checking linker read-only and read-write section mixing... unknown
checking linker PT_GNU_EH_FRAME support... no
checking linker position independent executable support... no
checking linker -Bstatic/-Bdynamic option... no
Using ggc-page for garbage collection.
checking whether to enable maintainer-specific portions of Makefiles... no
checking for the document directory.
Links are now set up to build a cross-compiler
from i686-pc-linux-gnu to i386-pc-mingw32.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating fixinc/Makefile
config.status: creating gccbug
config.status: creating mklibgcc
config.status: creating mkheaders
config.status: creating auto-host.h
config.status: executing default commands
checking whether NLS is requested... no
checking whether windows registry support is requested... no
checking what assembler to use... mingw32-as.exe
checking what linker to use... mingw32-ld.exe
checking what nm to use... mingw32-nm.exe
checking what objdump to use... mingw32-objdump.exe
checking assembler for .balign and .p2align... no
checking assembler for .p2align with maximum skip... no
checking assembler for working .subsection -1... no
checking assembler for .weak... no
checking assembler for .nsubspa comdat... no
checking assembler for .hidden... no
checking linker for .hidden support... no
checking assembler for .sleb128 and .uleb128... no
checking assembler for eh_frame optimization... no
checking assembler for section merging support... no
checking assembler for thread-local storage support... no
checking assembler for filds and fists mnemonics... no
checking assembler for cmov syntax... no
checking assembler for GOTOFF in data... no
checking assembler for dwarf2 debug_line support... no
checking assembler for buggy dwarf2 .file directive... no
checking assembler for --gdwarf2 option... no
checking assembler for --gstabs option... no
checking linker read-only and read-write section mixing... unknown
checking linker PT_GNU_EH_FRAME support... no
checking linker position independent executable support... no
checking linker -Bstatic/-Bdynamic option... no
Using ggc-page for garbage collection.
checking whether to enable maintainer-specific portions of Makefiles... no
checking for the document directory.
Links are now set up to build (on i686-pc-linux-gnu) a native compiler
for i386-pc-mingw32.
configure: creating ./config.status
config.status: creating Makefile
config.status: creating fixinc/Makefile
config.status: creating gccbug
config.status: creating mklibgcc
config.status: creating mkheaders
config.status: creating auto-host.h
config.status: executing default commands
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h config/i386/xm-mingw32.h" DEFINES="" \
/bin/sh ../gcc/mkconfig.sh config.h
TARGET_CPU_DEFAULT="TARGET_CPU_DEFAULT_pentiumpro" \
HEADERS="config/i386/i386.h config/i386/unix.h config/i386/bsd.h
config/i386/gas.h config/dbxcoff.h config/i386/cygming.h
config/i386/mingw32.h defaults.h" DEFINES="" \
/bin/sh ../gcc/mkconfig.sh tm.h
TARGET_CPU_DEFAULT="" \
HEADERS="auto-build.h ansidecl.h" DEFINES="" \
/bin/sh ../gcc/mkconfig.sh bconfig.h
i386-pc-mingw32-gcc -c -DIN_GCC -DGENERATOR_FILE -I. -I. -I../gcc -I../gcc/.
-I../gcc/../include ../gcc/genmodes.c -o genmodes.o
|