wincent / command-t

⌨️ Fast file navigation for Neovim and Vim
BSD 2-Clause "Simplified" License
2.74k stars 317 forks source link

Build failure (Windows) #349

Closed 9999years closed 5 years ago

9999years commented 5 years ago
$ ruby -v
ruby 2.5.3p105 (2018-10-18 revision 65156) [x64-mingw32]

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

Here’s a diff of a working and failing Makefile:

15c15
< topdir = /C/tools/ruby25/include/ruby-2.5.0
---
> topdir = C:/tools/ruby25/include/ruby-2.5.0
20c20
< prefix = $(DESTDIR)/C/tools/ruby25
---
> prefix = C:/tools/ruby25

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?

9999years commented 5 years ago

User error: Makefile was generated for MSYS but I was using Cygwin's make.