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

Cross version compilation on OS X #91

Open
Chris911 opened this issue Apr 14, 2014 · 1 comment
Open

Cross version compilation on OS X #91

Chris911 opened this issue Apr 14, 2014 · 1 comment

Comments

@Chris911
Copy link

Hi again,

I know issues are normally not for support but I don't know where to ask. I got rake-compiler to work on OS X with some specific frameworks but I just figured out it the generated gem only works for 1 version of Ruby (the one I compiled with). I've been trying to figure out to build the gem to work with multiple version of Ruby but not luck so far.

I installed the rake-compiler dev box (vagrant) but since I need some OS X librairies with the gem that option didn't work since the box runs linux and those librairies are not available.

I have all the developer tools installed on my dev machine but couldn't get any of the rake cross [...] commands to work. What am I missing?

tl;dr I want to build a gem for multiple ruby version (not multiple platforms) on my mac. What are the steps needed to get this to work?

Thanks for your time!

@luislavena
Copy link
Contributor

Right now rake-compiler uses the cross-compilation technique to target other platforms, but it could be tricked to target different versions of the same platform you're running.

You will need to look at how data is pulled from ~/.rake-compiler/config.yml and that it defines the version and the platform indicated.

I don't have the time to provide you with a fully functional example, but you can look at define_cross_platform_tasks_with_version in lib/rake/extensiontask.rb

You will need to use cross_compile and cross_platform values to indicate targeting at your installation.

Last but not least, you will need the configuration YAML file that indicates were to retrieve the particular version of Ruby to be used. See cross-ruby.rake on the format used for such YAML file:

https://github.com/luislavena/rake-compiler/blob/master/tasks/bin/cross-ruby.rake#L167-L204

Will keep this open if you have further questions.

Cheers.

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

2 participants