ruru icon indicating copy to clipboard operation
ruru copied to clipboard

MS Windows support

Open Zapotek opened this issue 8 years ago • 11 comments

Does Ruru support MS Windows?

I'm trying with RubyInstaller 2.3.0 and Rust nightly but keep getting link errors with cargo build --release.

At first the file x64-msvcrt-ruby230.lib is not found, but I figured it to mean that it's looking for either libx64-msvcrt-ruby230-static.a or libx64-msvcrt-ruby230.dll.a, although still no luck when renaming either to x64-msvcrt-ruby230.lib.

Zapotek avatar Feb 17 '17 16:02 Zapotek

I found the missing file at: https://github.com/gosu/gosu/tree/master/dependencies/msvcrt-ruby

Zapotek avatar Feb 18 '17 17:02 Zapotek

Re-opening because even though I managed to compile, I immediately get a segfault when calling the initialize methods via:

Fiddle::Function.new( library['initialize'], [], Fiddle::TYPE_VOIDP ).call

Using Windows 10, same Ruby and Rust version as before.

Zapotek avatar Feb 18 '17 18:02 Zapotek

I've narrowed it down to Ruru. Loading Rust libs via FFI is working fine, but the moment Ruru gets involved the process segfaults.

Even with simple stuff like:

Class::from_existing( "String" )

Update: Segfaults with Rust stable as well.

Zapotek avatar Feb 18 '17 18:02 Zapotek

Hi @Zapotek! Right now I don't have any Windows computer to reproduce and fix the issue. I will let you know when I find it

d-unsed avatar May 24 '17 17:05 d-unsed

Windows 10 doesn't need a product key to install and it will be functional enough to debug this and it's pretty easy to setup a VM for free with VirtualBox. I'm not in any hurry for this but it will be pretty important to me in the long run and probably to others too. If you need any help with this let me know.

Zapotek avatar May 28 '17 13:05 Zapotek

Sorry that it took time to come back to this issue. One thing I've just realized is that there should not be some Windows-specific problems, at least with such simple things like Class::from_existing("String"). Since we have a test suite which is on Windows as well using AppVeyor CI, it would indicate that there are some problems on the platform.

I've faced weird segfault issues before, when a native extension was built against one version of ruby, let's say 2.2.0, but it was used with some other one like 2.3.0. The app crashed with segfault during the very first call to the ruby VM. It was related to rbenv misconfiguration for the directory where the extension was build and the directory where it was used. Could you please check if this is not an issue in your case?

d-unsed avatar Nov 27 '17 19:11 d-unsed

I removed all Ruby versions and rebuilt but I still got the same behavior.

Zapotek avatar Nov 28 '17 09:11 Zapotek

Hey @Zapotek, which shell are you using on Windows 10? Have you tried it with Bash on the Linux subsystem on Windows 10?

danielpclark avatar Nov 28 '17 12:11 danielpclark

@danielpclark Regular shell. You mean building the extension or running my entire system there? Because the latter isn't really a solution for native MS Windows support.

Zapotek avatar Nov 28 '17 12:11 Zapotek

@Zapotek, which version of Ruby is used on the machine? And how was it installed there?

d-unsed avatar Nov 28 '17 17:11 d-unsed

@d-unseductable Ruby 2.4.2p189 using RubyInstaller.

Zapotek avatar Nov 29 '17 11:11 Zapotek