The Makefile generated with extconf.rb seems to compile incorrectly in a way that’s been seen before (the link is in Japanese, but the sets for fixing their build that they presented also worked here, so it seems the two are related). There’s only a few lines that have to be changed for it to compile correctly, but I’d prefer to not have to change anything.
Failing build:
$ make V=1
x86_64-w64-mingw32-gcc -I. -IC:/tools/ruby25/include/ruby-2.5.0/x64-mingw32 -I/C/tools/ruby25/include/ruby-2.5.0/ruby/backward -I/C/tools/ruby25/include/ruby-2.5.0 -I. -DHAVE_FCNTL_H -DHAVE_STDINT_H -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -march=x86-64 -mtune=generic -O2 -pipe -Wall -Wextra -Wno-unused-parameter -o ext.o -c ext.c
In file included from ext.c:4:0:
matcher.h:4:10: fatal error: ruby.h: No such file or directory
#include <ruby.h>
^~~~~~~~
compilation terminated.
make: *** [Makefile:242: ext.o] Error 1
The
Makefile
generated withextconf.rb
seems to compile incorrectly in a way that’s been seen before (the link is in Japanese, but the sets for fixing their build that they presented also worked here, so it seems the two are related). There’s only a few lines that have to be changed for it to compile correctly, but I’d prefer to not have to change anything.Failing build:
Here’s a diff of a working and failing Makefile:
Failing Makefile
I’d love to help fix this but I’m not quite sure where to start, and I’m not a Ruby expert; where might this error be coming from?