2

I'm following the guide below to build a mingw-w64 tool chain to cross compile for windows64 on Fedora 26. (I can't use the buildin tool chain, as the Fedora people decided to activate certain compiler options that i want disabled.)

http://pete.akeo.ie/2010/07/compiling-mingw-w64-with-multilib-on.html

I know it is not the most recent one, but all steps seem reasonable and version independent.

So now here is my problem: When I try to do the last gcc build "Gcc, pass 2", I am presented with the following error message:

<path to build dir>/mingw-w64/build/gcc/./gcc/xgcc -B<path to build dir>/mingw-w64/build/gcc/./gcc/ -L<path to local install dir>/mingw-local/x86_64-w64-mingw32/lib -L<path to local install dir>/mingw-local/mingw/lib -isystem <path to local install dir>/mingw-local/x86_64-w64-mingw32/include -isystem <path to local install dir>/mingw-local/mingw/include -B<path to local install dir>/mingw-local/x86_64-w64-mingw32/bin/ -B<path to local install dir>/mingw-local/x86_64-w64-mingw32/lib/ -isystem <path to local install dir>/mingw-local/x86_64-w64-mingw32/include -isystem <path to local install dir>/mingw-local/x86_64-w64-mingw32/sys-include    -g -O2 -m32 -O2 -I../../../../../gcc-7.2.0/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../.././gcc -I../../../../../gcc-7.2.0/libgcc -I../../../../../gcc-7.2.0/libgcc/. -I../../../../../gcc-7.2.0/libgcc/../gcc -I../../../../../gcc-7.2.0/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../../../gcc-7.2.0/libgcc/libgcc2.c 

In file included from ../../../../../gcc-7.2.0/libgcc/../gcc/tsystem.h:44:0,
             from ../../../../../gcc-7.2.0/libgcc/libgcc2.c:27:
<path to build dir>/mingw-w64/build/gcc/gcc/include/stddef.h:1:15: fatal error: stddef.h: No such file or directory
#include_next <stddef.h>
           ^~~~~~~~~~
compilation terminated.

I'm using following version numbers:

  • binutils-2.29
  • gcc-7.2.0
  • gmp-6.1.2
  • mingw-w64-v5.0.3
  • mpc-1.1.0
  • mpfr-4.0.0

Also Fedora's own gcc is version 7.2.1, which i can't download from gnu.org. (I mention it anyway since some solutions I found mentioned there might be a version conflict.)

I'm stuck here, hope anyone can help.

D. Asyl
  • 31
  • 1
  • 5
  • Possible duplicate of [Compilation error: "stddef.h: No such file or directory"](https://stackoverflow.com/questions/31600600/compilation-error-stddef-h-no-such-file-or-directory) – Oleksandr Kravchuk Jan 21 '18 at 21:17
  • Maybe try the MXE. – Velkan Jan 22 '18 at 09:44
  • MXE works like a charm! Thanks! I'd still like to know what is going on here, because I disagree that it's a versioning issue like in the link from the duplicate. I checked and all version numbers are matching. – D. Asyl Jan 23 '18 at 07:16

0 Answers0