Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS Windows support #65

Open
Zapotek opened this issue Feb 17, 2017 · 11 comments
Open

MS Windows support #65

Zapotek opened this issue Feb 17, 2017 · 11 comments

Comments

@Zapotek
Copy link

Zapotek commented Feb 17, 2017

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
Copy link
Author

Zapotek commented Feb 18, 2017

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

@Zapotek Zapotek closed this as completed Feb 18, 2017
@Zapotek
Copy link
Author

Zapotek commented Feb 18, 2017

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 Zapotek reopened this Feb 18, 2017
@Zapotek
Copy link
Author

Zapotek commented Feb 18, 2017

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.

@d-unsed
Copy link
Owner

d-unsed commented May 24, 2017

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

@Zapotek
Copy link
Author

Zapotek commented May 28, 2017

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.

@d-unsed
Copy link
Owner

d-unsed commented Nov 27, 2017

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?

@Zapotek
Copy link
Author

Zapotek commented Nov 28, 2017

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

@danielpclark
Copy link
Contributor

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

@Zapotek
Copy link
Author

Zapotek commented Nov 28, 2017

@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.

@d-unsed
Copy link
Owner

d-unsed commented Nov 28, 2017

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

@Zapotek
Copy link
Author

Zapotek commented Nov 29, 2017

@d-unseductable Ruby 2.4.2p189 using RubyInstaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants