andymeneely / squib

A Ruby DSL for prototyping card games.
http://squib.rocks
MIT License
917 stars 67 forks source link

Cannot update to current Squib gem on Windows 10 #326

Closed XCompWiz closed 2 years ago

XCompWiz commented 3 years ago

I've been using squib for all kinds of things, and I really love it. :D It's surprisingly versatile. I even used it for my wedding placecards!

I tried updating to a more current squib version on my computer, and that fails. Current squib version: 0.14.2 Ruby version: 2.5.5p157

Error from `gem up squib` ``` PS D:\development\....> ruby --version ruby 2.5.5p157 (2019-03-15 revision 67260) [x64-mingw32] PS D:\development\....> gem up squib Updating installed gems Updating squib Temporarily enhancing PATH for MSYS/MINGW... Installing required msys2 packages: mingw-w64-x86_64-glib2 warning: mingw-w64-x86_64-glib2-2.58.3-1 is up to date -- skipping Building native extensions. This could take a while... ERROR: Error installing squib: ERROR: Failed to build gem native extension. current directory: D:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/glib2-3.4.3/ext/glib2 D:/Ruby25-x64/bin/ruby.exe -r ./siteconf20201102-19536-i3v22w.rb extconf.rb checking for --enable-debug-build option... no checking for -Wall option to compiler... yes checking for -Waggregate-return option to compiler... yes checking for -Wcast-align option to compiler... yes checking for -Wextra option to compiler... yes checking for -Wformat=2 option to compiler... yes checking for -Winit-self option to compiler... yes checking for -Wlarger-than-65500 option to compiler... yes checking for -Wmissing-declarations option to compiler... yes checking for -Wmissing-format-attribute option to compiler... yes checking for -Wmissing-include-dirs option to compiler... yes checking for -Wmissing-noreturn option to compiler... yes checking for -Wmissing-prototypes option to compiler... yes checking for -Wnested-externs option to compiler... yes checking for -Wold-style-definition option to compiler... yes checking for -Wpacked option to compiler... yes checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes checking for -Wpointer-arith option to compiler... yes checking for -Wundef option to compiler... yes checking for -Wout-of-line-declaration option to compiler... no checking for -Wunsafe-loop-optimizations option to compiler... yes checking for -Wwrite-strings option to compiler... yes checking for Homebrew... no checking for gobject-2.0 version (>= 2.12.0)... yes checking for gthread-2.0... yes checking for unistd.h... no checking for io.h... no checking for g_spawn_close_pid() in glib.h... no checking for g_thread_init() in glib.h... no checking for g_main_depth() in glib.h... no checking for g_listenv() in glib.h... no checking for rb_check_array_type() in ruby.h... no checking for rb_check_hash_type() in ruby.h... no checking for rb_exec_recursive() in ruby.h... no checking for rb_errinfo() in ruby.h... no checking for rb_thread_call_without_gvl() in ruby.h... no checking for ruby_native_thread_p() in ruby.h... no checking for rb_thread_call_with_gvl() in ruby.h... no checking for rb_gc_register_mark_object() in ruby.h... no checking for rb_exc_new_str() in ruby.h... no checking for rb_enc_str_new_static() in ruby.h... no checking for curr_thread in ruby.h,node.h... no checking for rb_curr_thread in ruby.h,node.h... no creating ruby-glib2.pc creating glib-enum-types.c creating glib-enum-types.h creating Makefile current directory: D:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/glib2-3.4.3/ext/glib2 make "DESTDIR=" clean current directory: D:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/glib2-3.4.3/ext/glib2 make "DESTDIR=" compiling glib-enum-types.c /bin/sh: -c: line 0: syntax error near unexpected token `(' /bin/sh: -c: line 0: `x86_64-w64-mingw32-gcc -I. -ID:/Ruby25-x64/include/ruby-2.5.0/x64-mingw32 -I/D/Ruby25-x64/include/ruby-2.5.0/ruby/backward -I/D/Ruby25-x64/include/ruby-2.5.0 -I. -IC:/Program Files (x86)/GtkSharp/2.12//INCLUDE -I./.gem.20201102-19536-1hiyppz -I/D/Ruby25-x64/lib/ruby/vendor_ruby/2.5.0/x64-msvcrt -ID:/Ruby25-x64/msys64/mingw64/include -ID:/Ruby25-x64/msys64/mingw64/lib/libffi-3.2.1/include -ID:/Ruby25-x64/msys64/mingw64/include/glib-2.0 -ID:/Ruby25-x64/msys64/mingw64/lib/glib-2.0/include -ID:/Ruby25-x64/msys64/mingw64/include -ID:/Ruby25-x64/msys64/mingw64/include/glib-2.0 -ID:/Ruby25-x64/msys64/mingw64/lib/glib-2.0/include -DRUBY_GLIB2_COMPILATION -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 -O3 -fno-fast-math -Wall -Waggregate-return -Wcast-align -Wextra -Wformat=2 -Winit-self -Wlarger-than-65500 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wp,-D_FORTIFY_SOURCE=2 -Wpointer-arith -Wundef -Wunsafe-loop-optimizations -Wwrite-strings -mms-bitfields -pthread -mms-bitfields -o glib-enum-types.o -c glib-enum-types.c' make: *** [Makefile:242: glib-enum-types.o] Error 1 make failed, exit code 2 Gem files will remain installed in D:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/glib2-3.4.3 for inspection. Results logged to D:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/glib2-3.4.3/gem_make.out Gems updated: glib2 Gems already up-to-date: squib ```
andymeneely commented 3 years ago

Have you tried using Ruby 2.6 or 2.7?

XCompWiz commented 3 years ago

I have not. Has the minimum Ruby version changed? I can try that when I next try to update.

I'll also check if the compilation tools are properly in place in my set up, as that was an issue in the image set up. I feel like the install/set up instruction should fail more gracefully or at least inform of the missing tools, but I don't know if that's a Ruby issue or something Squib can do anything about.

andymeneely commented 3 years ago

According to my latest builds it does work on Ruby 2.5 for Ubuntu and MacOS.

I don't have the build server configured for Windows yet, but I personally am using Ruby 2.6 on Windows. I got it from here, and I got the version with DevKit (which is required for Squib, and really most Ruby gems since it will compile gems with native C extensions). My guess is that you have the Windows Ruby without DevKit.

FYI on Christmas 2020, Ruby 3.0 is coming out. The compatibility changes are tiny, so I would plan on upgrading to that. Squib will work on 3.0, and the Windows build for 3.0 will probably come out around then (sometimes there's a lag).