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

Rubinius segfaults MRI when building on Win7 #1155

Closed
jonforums opened this issue Sep 17, 2011 · 7 comments
Closed

Rubinius segfaults MRI when building on Win7 #1155

jonforums opened this issue Sep 17, 2011 · 7 comments

Comments

@jonforums
Copy link
Contributor

When attempting to build on Win7 32-bit with a custom mingw-w64 DevKit, Rubinius causes my MRI 1.9.3dev build Ruby to segfault

https://gist.github.com/1222357

apparently due to a code path from

https://github.com/rubinius/rubinius/blob/master/lib/ext/melbourne/melbourne.cpp#L53-66

@jc00ke
Copy link
Member

jc00ke commented Sep 17, 2011

I don't think building w/MRI > 1.8 is supported on any platform yet, let alone on Windows.

@jonforums
Copy link
Contributor Author

The segfault is happening for me somewhere in yyparse of lib/ext/melbourne/grammar19.cpp as the n = yyparse(parser_state); line below never returns:

https://github.com/rubinius/rubinius/blob/master/lib/ext/melbourne/grammar19.cpp#L8444

While it currently appears tangential to this issue, if grammar19.cpp is a hand-edited (rather than completely tool generated) file, I suggest changing all the _MSC_VER macros to _WIN32 in areas like

https://github.com/rubinius/rubinius/blob/master/lib/ext/melbourne/grammar19.cpp#L4447-4458

since _MSC_VER is defined by MSFT's VC++ compiler but not by the MinGW flavors. _WIN32 is defined by MinGW and the MSFT compilers including the command line cl from freely available Windows SDK. IIRC, _WIN32 is also defined for 64bit builds.

Finally, if someone more familiar with Rubinius code would save me some time by suggesting a gdb --args line that isolates things to reproducing

https://gist.github.com/1222357#file_results

I'll work on getting a bt...I cringe at the idea of printf spelunking through yyparse and a bunch of recompiles :(

@jonforums
Copy link
Contributor Author

@jc00ke IIRC I also failed to build using MRI 1.8.7-p352. I'll try again and report back.

@jonforums
Copy link
Contributor Author

@jc00ke using MRI 1.8.7 allows the build to proceed much further but it still fails. Good news is the failure's changed from a segfault to an easier pathing issue #1159

@brixen
Copy link
Member

brixen commented Sep 19, 2011

I'm probably going to require MRI 1.9.2 to build Rubinius on Windows. It's plenty easy to install with RubyInstaller. I'll investigate the issue using that. I'm not going to support building with MRI dev builds.

@jc00ke
Copy link
Member

jc00ke commented Sep 19, 2011

So since this issue started off being specific to 1.9.3 I'm going to close. 1.8.7 issue is #1159.

@jc00ke jc00ke closed this as completed Sep 19, 2011
@jonforums
Copy link
Contributor Author

@brixen MRI 1.9.3 is shaping up to be a much better Ruby for Windows than 1.9.2. Given that 1.9.3 is close (??) to dropping and it may take a bit to iron out the Windows build issues, I say focus on MRI 1.9.3 rather than 1.9.2. I regularly build from source from MRI's ruby_1_9_3 branch to hopefully catch any last minute gotchas, it's pretty good.

We'll have a 1.9.3 RubyInstaller (7z archive and .exe installer) at the same time as ruby-core officially releases 1.9.3 so availability won't be an issue.

I agree with not officially supporting builds with MRI dev (i.e - from trunk) builds.

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

No branches or pull requests

3 participants