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
"rake cross compile" doesn't choose correct g++ executable #12
Comments
Thank you Lyle This is actually not a rake-compiler issue, but the lack of rbconfig to setup CXX. rake-compiler uses rbconfig in combination with mkmf. rbconfig was generated by miniruby during the build process, and lacks that information. The only place rake-compiler defines the compiler itself is here: http://github.com/luislavena/rake-compiler/blob/master/lib/rake/extensioncompiler.rb And the only purpose is to help determine the platform and the executable for manual execution. But this is not used by mkmf or the cross compile process at all. I advice you setup an environment variable or a extconf parameter that let you assign the CXX properly. I advice against using ExtensionCompiler to define that in extconf (since the gem will not be available in that particular version of the cross-compiled ruby). |
OK, I understand. Trying now with:
and that seems to be working a little better (so far!) |
Good news. Feel free to create a patch then that extend ExtensionCompiler to define the g ++ executable for the mingw host. |
This did not resolve my issue, on Fedora 13. I get this error: |
Did you tried setting CXX before invoking rake compiler? Do you have cross compiling toolset installed in that machine? |
passing it as a flag did not work, but setting the env variable did. Thanks for your help. |
I ran into this as well, and used the following in EM:
|
I'm keeping this open as documentation thread. Do you guys think this should be covered/set by rake-compiler in the cross task? |
Yes, I would prefer if this was default behavior inside rake-compiler.. I don't think there's any downside of adding an ENV['CXX'] ||= so there is a default value set? |
Yeah, that can work, but that will make ExtensionTask depend on ExtensionCompiler Since I'm planning a huge internal change of rake-compiler, will table this until then. |
I'm working with the latest rake-compiler (post-0.6.0) from GitHub and it seems that while the "rake cross compile" task does correct set the C compiler (to "i586-mingw32msvc-cc" on my machine) it doesn't get the C++ compiler right (it chooses plain old "g++" instead of "i586-mingw32msvc-g++"). I'm looking into this and will provide a patch if I figure it out; just wanted to get it recorded somewhere.
The text was updated successfully, but these errors were encountered: