-
Notifications
You must be signed in to change notification settings - Fork 329
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
ffi won't compile on Solaris 11.x #360
Comments
I seem to have mistakenly closed this issue when posting it. Though I found a workaround, it should probably remain open, until the official version includes a fix for it. |
The original issue was #91. I'm curious why that would cause issues, though. |
Since I don't even know what -std=c99 does, I can't begin to guess on the cause of this. But when I found the other thread, and read that this was added specifically for Solaris 10, I just tried commenting it out on Solaris 11, on the offhand chance that it might work, and it did. |
As I understand it, it forces compilation with c99 (should be under /usr/bin or wherever your gcc compiler is), which means it won't use features of gcc that aren't compatible with the C99 standard. |
With the c99 option, it claims I need to install development tools first. However I've got the gcc package distributed in the official package manager by Oracle. Here's the error output: Installing ffi-1.9.3.gem ... /usr/local/bin/ruby extconf.rb extconf failed, exit code 1 Gem files will remain installed in /usr/local/lib/ruby/gems/2.1.0/gems/ffi-1.9.3 for inspection. |
Can you post the content of gem_make.out? |
I can confirm this also affects Smartos in the same way, and commenting out the same line enables extensions to compile successfully. FWIW, on the latest version of Smartos: RbConfig::CONFIG['host_os'] |
gem_make.out:
mkmf.log:
|
Should be fixed in 1.9.6 |
Okay. This I don't get. This is the result of trying to install on solaris 11 at this point. somehow Ruby installs just fine, but the headers break when trying to install gems.
|
'solaris2.11' =~ /solaris(!?2.11)/ will return 0, which in ruby is true so the flag is still present in solaris 11 ffi 1.9.6. This pull request should fix: #391 |
Neither. They don't address the whole thing. I'll get this ironed out in the morning. |
Give #399 a try. It should work for both solaris 10 and 11. I've only tested it on 11 so far. |
Tested on Solaris 11.2 and works perfectly now. |
When trying to install ffi on Solaris 11 (tested 11.1 and 11.2), you get prompted that you need to install developer tools first (even though everything is installed).
If you comment out the line that was added for Solaris 10 in ext/ffi_c/extconf.rb, then ffi installs successfully:
# $CFLAGS << " -std=c99" if RbConfig::CONFIG['host_os'] =~ /solaris/
The text was updated successfully, but these errors were encountered: