Unable to build on mingw-w64
jwt27 opened this issue · 2 comments
Trying to build 5.2.0 on mingw-w64, the following error occurs while compiling fixincl.c:
make[2]: Entering directory '/home/JW/build-djgpp/build/djcross-gcc-5.2.0/djcross/fixincludes'
gcc -c -g -O2 -D__USE_MINGW_ACCESS -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wno-overlength-strings -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I../../gnu/gcc-5.20/fixincludes -I../include -I../../gnu/gcc-5.20/fixincludes/../include ../../gnu/gcc-5.20/fixincludes/fixincl.c
../../gnu/gcc-5.20/fixincludes/fixincl.c:29:22: fatal error: sys/wait.h: No such file or directory
#include <sys/wait.h>
^
compilation terminated.
Makefile:76: recipe for target 'fixincl.o' failed
make[2]: *** [fixincl.o] Error 1
make[2]: Leaving directory '/home/JW/build-djgpp/build/djcross-gcc-5.2.0/djcross/fixincludes'
Makefile:3504: recipe for target 'all-fixincludes' failed
make[1]: *** [all-fixincludes] Error 2
make[1]: Leaving directory '/home/JW/build-djgpp/build/djcross-gcc-5.2.0/djcross'
Makefile:876: recipe for target 'all' failed
make: *** [all] Error 2
This is probably not an issue with the build-djgpp script per se, most likely with mingw-w64, but I'm asking here since I wouldn't know where else to post it. I can find the missing file in /usr/include/sys, but adding /usr/include to C_INCLUDE_PATH causes even more errors.
How can I resolve this?
Follow up; I got it to compile eventually by modifying the build script and appending --build=x86_64-w64-mingw32 to all ./configure calls. Previously, configure auto-detected the build platform as x86_64-pc-mingw64. Must admit, I'm not entirely sure how this affects the build process, but it compiled without errors after this change.
Ok, thank you. Because I don't have a mingw-w64 environment, I can't test it by myself... 😮