{"action":"closed","issue":{"url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/364","labels_url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/364/labels{/name}","comments_url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/364/comments","events_url":"https://api.github.com/repos/Alexpux/MSYS2-packages/issues/364/events","html_url":"https://github.com/Alexpux/MSYS2-packages/issues/364","id":111453058,"number":364,"title":"Can't build ruby extension with msys/ruby 2.1.5-1","user":{"login":"mario-grgic","id":1044216,"avatar_url":"https://avatars.githubusercontent.com/u/1044216?v=3","gravatar_id":"","url":"https://api.github.com/users/mario-grgic","html_url":"https://github.com/mario-grgic","followers_url":"https://api.github.com/users/mario-grgic/followers","following_url":"https://api.github.com/users/mario-grgic/following{/other_user}","gists_url":"https://api.github.com/users/mario-grgic/gists{/gist_id}","starred_url":"https://api.github.com/users/mario-grgic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mario-grgic/subscriptions","organizations_url":"https://api.github.com/users/mario-grgic/orgs","repos_url":"https://api.github.com/users/mario-grgic/repos","events_url":"https://api.github.com/users/mario-grgic/events{/privacy}","received_events_url":"https://api.github.com/users/mario-grgic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-14T17:49:25Z","updated_at":"2015-10-14T22:24:18Z","closed_at":"2015-10-14T22:24:18Z","body":"I am trying to build command-t vim plugin for msys/vim 7.4.872-2 which was built against msys/ruby 2.1.5-1 (also installed).\r\n\r\n/usr/bin/vi :version prints\r\n\r\n```\r\nVIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 16 2015 08:44:57)\r\nIncluded patches: 1-872\r\nCompiled by <alexpux@gmail.com>\r\nHuge version without GUI.  Features included (+) or not (-):\r\n+acl             +cscope          +folding         +menu            +netbeans_intg   -sniff           +virtualedit\r\n+arabic          +cursorbind      -footer          +mksession       +path_extra      +startuptime     +visual\r\n+autocmd         +cursorshape     +fork()          +modify_fname    +perl/dyn        +statusline      +visualextra\r\n-balloon_eval    +dialog_con      +gettext         +mouse           +persistent_undo -sun_workshop    +viminfo\r\n-browse          +diff            -hangul_input    -mouseshape      +postscript      +syntax          +vreplace\r\n++builtin_terms  +digraphs        +iconv           +mouse_dec       +printer         +tag_binary      +wildignore\r\n+byte_offset     -dnd             +insert_expand   -mouse_gpm       +profile         +tag_old_static  +wildmenu\r\n+cindent         -ebcdic          +jumplist        -mouse_jsbterm   +python/dyn      -tag_any_white   +windows\r\n-clientserver    +emacs_tags      +keymap          +mouse_netterm   +python3/dyn     -tcl             +writebackup\r\n+clipboard       +eval            +langmap         +mouse_sgr       +quickfix        +terminfo        -X11\r\n+cmdline_compl   +ex_extra        +libcall         -mouse_sysmouse  +reltime         +termresponse    -xfontset\r\n+cmdline_hist    +extra_search    +linebreak       +mouse_urxvt     +rightleft       +textobjects     -xim\r\n+cmdline_info    +farsi           +lispindent      +mouse_xterm     +ruby/dyn        +title           -xsmp\r\n+comments        +file_in_path    +listcmds        +multi_byte      +scrollbind      -toolbar         -xterm_clipboard\r\n+conceal         +find_in_path    +localmap        +multi_lang      +signs           +user_commands   -xterm_save\r\n+cryptv          +float           -lua             -mzscheme        +smartindent     +vertsplit       -xpm\r\n   system vimrc file: \"/etc/vimrc\"\r\n     user vimrc file: \"$HOME/.vimrc\"\r\n 2nd user vimrc file: \"~/.vim/vimrc\"\r\n      user exrc file: \"$HOME/.exrc\"\r\n  fall-back for $VIM: \"/etc\"\r\n f-b for $VIMRUNTIME: \"/usr/share/vim/vim74\"\r\nCompilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -D_FORTIFY_SOURCE=2 -I/usr/include/ncursesw  -march=x86-64 -mtune=gene\r\nric -O2 -pipe -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1\r\nLinking: gcc   -L. -pipe -fstack-protector -pipe -Wl,--as-needed -o vim.exe        -lm    -lncursesw -liconv -lintl   -p\r\nipe -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong  -L/usr/lib/\r\nperl5/core_perl/CORE -lperl -lpthread -ldl -lcrypt\r\n```\r\n\r\nAnd simple commands like ```:ruby puts 1``` work just fine in Vim. \r\n\r\nHowever, if I download the command-t plugin which needs ruby native C extension and try to build it, I run into following problems:\r\n\r\nFirst /usr/include is not on include path. This can be fixed by passing a flag to ```ruby extconf.rb --with-opt-dir=/usr```\r\n\r\nBut the next problem is complaining about missing win32.h and conflicting type definitions:\r\n\r\n```\r\n$ ruby extconf.rb --with-opt-dir=/usr/\r\nchecking for float.h... /usr/lib/ruby/2.1.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError)\r\nYou have to install development tools first.\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:588:in `try_cpp'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:1121:in `block in find_header'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:919:in `block in checking_for'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:352:in `block (2 levels) in postpone'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:322:in `open'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:352:in `block in postpone'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:322:in `open'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:348:in `postpone'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:918:in `checking_for'\r\n        from /usr/lib/ruby/2.1.0/mkmf.rb:1120:in `find_header'\r\n        from extconf.rb:7:in `header'\r\n        from extconf.rb:14:in `<main>'\r\n$\r\n```\r\n\r\nHere is the mkmf.log \r\n\r\n```\r\n\"gcc -o conftest.exe -I/usr/include/ruby-2.1.0/x86_64-msys -I/usr/include/ruby-2.1.0/ruby/backward -I/usr/include/ruby-2.1.0 -I. -I/usr//include -D_FORTIFY_SOURCE=2   -march=x86-64 -mtune=generic -O2 -pipe -fno-strict-aliasing  conftest.c  -L. -L/usr/lib -L/usr//lib -L. -pipe -fstack-protector     -lruby210  -lpthread -lgmp -ldl -lcrypt  \"\r\nIn file included from C:/msys64/usr/include/stdio.h:48:0,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby/defines.h:26,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby/ruby.h:29,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby.h:33,\r\n                 from conftest.c:1:\r\nC:/msys64/usr/include/sys/types.h:124:18: error: conflicting types for 'time_t'\r\n typedef _TIME_T_ time_t;\r\n                  ^\r\nIn file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:7:0,\r\n                 from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/5.2.0/include/stddef.h:1,\r\n                 from C:/msys64/usr/include/sys/cdefs.h:45,\r\n                 from C:/msys64/usr/include/stdio.h:35,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby/defines.h:26,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby/ruby.h:29,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby.h:33,\r\n                 from conftest.c:1:\r\nC:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h:138:20: note: previous declaration of 'time_t' was here\r\n typedef __time64_t time_t;\r\n                    ^\r\nIn file included from C:/msys64/usr/include/ruby-2.1.0/ruby/defines.h:51:0,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby/ruby.h:29,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby.h:33,\r\n                 from conftest.c:1:\r\nC:/msys64/usr/include/inttypes.h:23:0: warning: \"__STRINGIFY\" redefined\r\n #define __STRINGIFY(a) #a\r\n ^\r\nIn file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw.h:12:0,\r\n                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/crtdefs.h:10,\r\n                 from C:/msys64/mingw64/x86_64-w64-mingw32/include/stddef.h:7,\r\n                 from C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/5.2.0/include/stddef.h:1,\r\n                 from C:/msys64/usr/include/sys/cdefs.h:45,\r\n                 from C:/msys64/usr/include/stdio.h:35,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby/defines.h:26,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby/ruby.h:29,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby.h:33,\r\n                 from conftest.c:1:\r\nC:/msys64/mingw64/x86_64-w64-mingw32/include/_mingw_mac.h:10:0: note: this is the location of the previous definition\r\n #define __STRINGIFY(x) #x\r\n ^\r\nIn file included from C:/msys64/usr/include/ruby-2.1.0/ruby/ruby.h:29:0,\r\n                 from C:/msys64/usr/include/ruby-2.1.0/ruby.h:33,\r\n                 from conftest.c:1:\r\nC:/msys64/usr/include/ruby-2.1.0/ruby/defines.h:217:24: fatal error: ruby/win32.h: No such file or directory\r\ncompilation terminated.\r\nchecked program was:\r\n/* begin */\r\n1: #include \"ruby.h\"\r\n2: \r\n3: int main(int argc, char **argv)\r\n4: {\r\n5:   return 0;\r\n6: }\r\n/* end */\r\n```\r\n"}}