-
Notifications
You must be signed in to change notification settings - Fork 458
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
Precompile the extensions #88
Comments
I believe rake-compiler is supposed to aid in that aspect. |
Ok, as I understand it atm, I think the following has to be done: RubyGems will first check if a ‘platform’ specific version of a gem exists, in which case it will install that over the plain version of the gem. (In our case that’s This means that prebuilt extensions for all MRI versions we want to support should be in the same specific prebuilt gem for each platform (10.8 & 10.9). Regardless of how/when MRI rubies have been built, as long as the architecture and MRI versions are compatible, the same prebuilt extension should work. E.g. an extension built for OS X 10.9’s MRI v2, should also work with a MRI v2 built by e.g. RVM on OS X 10.9. The MRI versions we should support are:
In conclusion, this means that we need to push the following gems:
Finally, it would be great if we can build all these gems from one machine. Maybe we can cross compile for 10.9 from 10.8 and vice-versa. This probably depends on wether or not the 10.8/10.9 SDKs come with their respective stock rubies, which I think they don’t. Maybe we can just make copies of the stock rubies? |
Afaik patch levels should be C API compatible, but need to find out if MRI’s scheme also means that 1.9.2 is compatible to 1.9.3 and 2.0.1 would be compatible with 2.0.0. |
From @headius re MRI compatibility:
The conclusion being: We should prebuilt extensions on latest minor version and test it once on older minors. |
And the definitive answer on compatibility by Matz (http://twitter.com/yukihiro_matz/status/390055492027822081):
|
On 10.8, the stock Ruby is a universal version, which means the platform is not |
I would not bother to support Ruby 1.8.7 on OS X 10.9, who would ever want to do that? |
@irrationalfab Well, not me, but if it’s easy to switch for people, then I’m sure people will do it. But I’m not even sure if people are able/supposed to switch the Ruby versions… |
Ok, Gem::Platform has a So maybe the universal 1.8.7 stock OS X version will install a ‘x86_64’ version if no ‘universal’ package exists. But since that means it would fail on ‘i386’, in this case, that doesn’t make much sense to me. So I think we do need to have two precompiled packages, one for x64_86+i386 and one for just x64_86 and then also for 10.9, unless RubyGems accepts just ‘darwin’ for the platform, instead of ‘darwin12’ and ‘darwin13’. Finally, I have no idea how to test this, other than creating a test gem… :/ |
To be clear, I ended up only supporting OS X rubies, so:
The installer (extconf.rb) also ensures these rubies live in |
The last thing to check is if a new OS X 10.8/10.9 install comes with |
$ which make
/usr/bin/make
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
$ uname -a
Darwin Kyles-MacBook-Pro.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 |
The extensions should be pre compiled to allow installation without build tools. It should support OS X and Linux (Travis)
The text was updated successfully, but these errors were encountered: