|
From: | Patrick Farry |
Subject: | M4 1.4 doesn't build on mingw |
Date: | Mon, 17 Dec 2018 15:35:29 +0000 |
On mingw signal.h is in include directory. Build looks for it in sys/signal.h Version of mingw - mingw-w64/i686-8.1.0-posix-dwarf-rt_v6-rev0 Windows 10 version 1803 Stack overflow link to issue
https://stackoverflow.com/questions/22601045/make-cant-find-sys-signal-h I copied signal.h into sys and the build ran and m4 seems to run fine. To reproduce with mingw installed:
$ make for subdir in doc lib src checks examples; do \ echo making all in $subdir; \ (cd $subdir && make CC='gcc' CFLAGS='-g -O' LDFLAGS='' LIBS='' prefix='/usr/local' exec_prefix='/usr/local' bindir='/usr/local/bin' infodir='/usr/local/info' all) || exit 1; \ done making all in doc make[1]: Entering directory 'C:/Program Files/Git/usr/local/m4-1.4/doc' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory 'C:/Program Files/Git/usr/local/m4-1.4/doc' making all in lib make[1]: Entering directory 'C:/Program Files/Git/usr/local/m4-1.4/lib' gcc -c -DHAVE_CONFIG_H -I.. -I. -g -O regex.c gcc -c -DHAVE_CONFIG_H -I.. -I. -g -O getopt.c getopt.c: In function '_getopt_internal': getopt.c:408:30: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] if (optind != argc && !strcmp (argv[optind], "--")) ^~~~~~ getopt.c:484:7: warning: implicit declaration of function 'strncmp' [-Wimplicit-function-declaration] if (!strncmp (p->name, nextchar, nameend - nextchar)) ^~~~~~~ getopt.c:486:32: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] if (nameend - nextchar == strlen (p->name)) ^~~~~~ getopt.c:486:32: warning: incompatible implicit declaration of built-in function 'strlen' getopt.c:486:32: note: include '<string.h>' or provide a declaration of 'strlen' getopt.c:77:1: +#include <string.h> getopt.c:486:32: if (nameend - nextchar == strlen (p->name)) ^~~~~~ getopt.c:510:16: warning: incompatible implicit declaration of built-in function 'strlen' nextchar += strlen (nextchar); ^~~~~~ getopt.c:510:16: note: include '<string.h>' or provide a declaration of 'strlen' getopt.c:540:17: warning: incompatible implicit declaration of built-in function 'strlen' nextchar += strlen (nextchar); ^~~~~~ getopt.c:540:17: note: include '<string.h>' or provide a declaration of 'strlen' getopt.c:553:17: warning: incompatible implicit declaration of built-in function 'strlen' nextchar += strlen (nextchar); ^~~~~~ getopt.c:553:17: note: include '<string.h>' or provide a declaration of 'strlen' getopt.c:557:16: warning: incompatible implicit declaration of built-in function 'strlen' nextchar += strlen (nextchar); ^~~~~~ getopt.c:557:16: note: include '<string.h>' or provide a declaration of 'strlen' gcc -c -DHAVE_CONFIG_H -I.. -I. -g -O getopt1.c gcc -c -DHAVE_CONFIG_H -I.. -I. -g -O error.c gcc -c -DHAVE_CONFIG_H -I.. -I. -g -O obstack.c obstack.c: In function '_obstack_free': obstack.c:333:5: warning: implicit declaration of function 'abort' [-Wimplicit-function-declaration] abort (); ^~~~~ obstack.c:333:5: warning: incompatible implicit declaration of built-in function 'abort' obstack.c:333:5: note: include '<stdlib.h>' or provide a declaration of 'abort' obstack.c:22:1: +#include <stdlib.h> obstack.c:333:5: abort (); ^~~~~ obstack.c: In function 'obstack_free': obstack.c:367:5: warning: incompatible implicit declaration of built-in function 'abort' abort (); ^~~~~ obstack.c:367:5: note: include '<stdlib.h>' or provide a declaration of 'abort' gcc -c -DHAVE_CONFIG_H -I.. -I. -g -O xmalloc.c gcc -c -DHAVE_CONFIG_H -I.. -I. -g -O xstrdup.c rm -f libm4.a ar cru libm4.a regex.o getopt.o getopt1.o error.o obstack.o xmalloc.o xstrdup.o : libm4.a make[1]: Leaving directory 'C:/Program Files/Git/usr/local/m4-1.4/lib' making all in src make[1]: Entering directory 'C:/Program Files/Git/usr/local/m4-1.4/src' gcc -c -DHAVE_CONFIG_H -I.. -I. -I./../lib -g -O m4.c m4.c:22:10: fatal error: sys/signal.h: No such file or directory #include <sys/signal.h> ^~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:46: m4.o] Error 1 make[1]: Leaving directory 'C:/Program Files/Git/usr/local/m4-1.4/src' make: *** [Makefile:59: all] Error 1 Patrick Farry |
[Prev in Thread] | Current Thread | [Next in Thread] |