Problems installing byebug on Windows
Closed this issue · 2 comments
I am new to ruby and trying to setup my dev environment (Windows 10). I have installed ruby and rails but cannot install byebug. From what I read I need the DevKit first. So I installed it by following the guide here:
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
and then tried to install the gem but have no luck.
I have tried to uninstall and then force install DevKit but still cant get byebug installed.
This is what I am seeing:
C:\RubySDK>gem install byebug
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing byebug:
ERROR: Failed to build gem native extension.
C:/Ruby22/bin/ruby.exe -r ./siteconf20150923-3628-5vg5h3.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating byebug-i386-mingw32.def
compiling breakpoint.c
In file included from c:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
from ./byebug.h:4,
from breakpoint.c:1:
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:111:14: error: size of array 'ruby_check_sizeof_voidp' is negative
In file included from c:/Ruby22/include/ruby-2.2.0/ruby.h:33:0,
from ./byebug.h:4,
from breakpoint.c:1:
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_obj_freeze_inline':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1156:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1157:2: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1158:6: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1158:27: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_data_object_get':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1192:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_obj_written':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1271:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1271:34: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_num2char_inline':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1344:36: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1345:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_class_of':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1670:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h: In function 'rb_type':
c:/Ruby22/include/ruby-2.2.0/ruby/ruby.h:1687:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'eval_expression':
breakpoint.c:21:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:21:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:21:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'filename_cmp_impl':
breakpoint.c:288:11: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:288:11: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:288:11: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:292:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:292:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:292:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'find_breakpoint_by_pos':
breakpoint.c:458:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:458:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:458:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:460:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:460:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:460:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c: In function 'find_breakpoint_by_method':
breakpoint.c:480:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:480:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
breakpoint.c:480:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
cc1.exe: all warnings being treated as errors
make: *** [breakpoint.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby22/lib/ruby/gems/2.2.0/gems/byebug-6.0.2 for inspection.
Results logged to C:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/byebug-6.0.2/gem_make.out
Is there another way around this?
Thanks
Hi!
I can't be very helpful here since I don't use Windows nor have access to a Windows box. However, although those warnings could be fixed inside byebug, other warnings are also reported inside Ruby sources, so I guess the problem is that your ruby was compiled with a wrong configuration.
These compilation problems in Windows have been very common since the beginning of byebug. Ideally I'd like to ship precompiled extensions for the most common platforms, try compiling the extension on the fly for "unsupported" platforms and default to a extension-less byebug if compilation fails. I think this is something similar to what concurrent-ruby does. But there's a long way to go for this yet.
Unfortunately none of this is helpful for you to fix the problem. Maybe someone can step in and help you properly get this working.
I'm going to close this because the OP didn't reply anymore.