-
Notifications
You must be signed in to change notification settings - Fork 0
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
Windows Compat #1
Conversation
schneems
commented
Jul 26, 2016
- Path separators are platform dependent. We should use a cross platform API when building them.
- Path separators are platform dependent. We should use a cross platform API when building them.
os: Visual Studio 2015 | ||
|
||
install: | ||
- set PATH=C:\Ruby22\bin;%PATH% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the version of Ruby is hardcoded, so will always use the same version of Ruby, even that you have different versions in the matrix
defined beneath.
Take a look at my sample test package gem:
https://github.com/luislavena/test-ruby-c-extension/blob/master/appveyor.yml
Please note that make
in this case is available thanks to rake-compiler and DevKit integration.
If you need just make
, take a look to this thread in AppVeyor:
http://help.appveyor.com/discussions/problems/2504-what-is-the-right-way-to-include-the-ruby-devkit
Hope that helps.
Interesting, so you're saying that Ruby devkit comes with a GCC version of The makefile they're using doesn't work for nmake https://github.com/sass/libsass/blob/3ae9a2066152f9438aebaaacd12f39deaceaebc2/Makefile. Which is where I got stuck. They are tested on windows https://github.com/sass/libsass/blob/3ae9a2066152f9438aebaaacd12f39deaceaebc2/appveyor.yml however that is greek to me, I have no idea what's going on other than they're not using nmake. |
a0fad3c
to
c9c1b32
Compare
For reference this is where the LibSass Windows compilation happens
|
That is using a version of mingw just downloaded (in previous step). I no longer have a Windows machine or involved with RubyInstaller but Sorry for top posting, sent from mobile. On Jul 28, 2016 02:47, "Michael Mifsud" [email protected] wrote:
|
d6c838a
to
cf533ad
Compare
cf533ad
to
85ed673
Compare
Got it building and I believe FFI is finding and using the DLL correctly, however there's a segfault right now: https://ci.appveyor.com/project/schneems/sassc-ruby/build/17/job/lsdrbpbpr4s4vf9k#L173
i'm getting the same thing (in my VM) locally. This is my first time trying to fix a native extension (let alone one on windows). So i'm not sure the best way to debug the segfault. It could be a problem with the compilation, or a problem with how FFI is binding to the dll, or a problem with the ruby code, i'm not sure how to move forwards to narrow down possibilities. Any good resources on where to get started debugging extensions with FFI? |
@@ -19,13 +19,13 @@ | |||
file "lib/libsass.so" => "Makefile" do | |||
make_program = ENV['MAKE'] | |||
make_program ||= case RUBY_PLATFORM | |||
when /mswin/ | |||
'nmake' | |||
when /mswin|mingw/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand Ruby for Windows DevKits are based on MinGW and Visual Studio should not be used due to various incompatibilities related to the runtime C++ support. Can you try switching to make and the Unix-style build (which is also supported by libsass) and see if that fixes the segmentation fault?
So it does look like I should switch away from Development for me is insanely frustrating and slow on a Windows VM. I just finished the provisioning process through Heroku to get a IRL windows laptop. I should have physical hardware soon. I'm out on vacation next week. After that I can come back and I think i'm going to start with basics by making a "hello world" native extension that works on windows and mac/linux (using Thanks all for the help so far. It's been harder than expected, but i've learned more as well. |