I can't compile fat binaries using "just" 1.8.6 or "just" 1.9.1
I assume this is expected? (I hadn't anticipated it, but hey).
Also my one suggestion for rake compiler would be to be able to
target multiple ruby versions within the rakefile itself, something
likelike
Rake::ExtensionTask.new('ruby_prof', spec) do |ext|
ext.cross_compile = true
ext.cross_platform = 'i386-mswin32'
ext.targets = ['1.8.6', '1.9.1'] # add this one
ext.targets = ['1.8.6p368', '1.9.1p376'] # or this one or what not
end
This would be nice because it would ensure the .so's paths aren't
different depending on the parameters passed to Rake.
It wouldn't actually (necessarily) download those versions--just use
them--i.e. this is instead of calling rake with
RUBY_CC_VERSION=1.8.6:1.9.1
each time.
Thoughts?
Thanks.
-rp
The whole concept of fat is that you put two versions inside, which
you define by RUBY_CC_VERSION
If you only provide one, it will not generate fat ones.
Also, you can't use 1.9 to cross compile for 1.8, that is a known
limitation of Ruby itself, since it uses your ruby + rbconfig to
compile.
> Also my one suggestion for rake compiler would be to be able to
> target multiple ruby versions within the rakefile itself, something
> likelike
>
> Rake::ExtensionTask.new('ruby_prof', spec) do |ext|
> ext.cross_compile = true
> ext.cross_platform = 'i386-mswin32'
> ext.targets = ['1.8.6', '1.9.1'] # add this one
> ext.targets = ['1.8.6p368', '1.9.1p376'] # or this one or what not
> end
>
The first thing is move move the task dependency definition to a later
process instead of RUBY_CC_VERSION.
At this time, things are parsed when rake loads the file, The changes
to rake-compiler will allow you do this:
rake fat cross native gem
and it will take the versions defined in fat and push dependencies to targets.
It will also help silence the warnings received right now for projects
that have C and JRuby extensions.
> This would be nice because it would ensure the .so's paths aren't
> different depending on the parameters passed to Rake.
>
Well, don't think I understand what you're saying.
At this time rake-compiler uses the rake-compiler configuration that
defines X.Y.Z, no matter what patchlevel.
It is true that when doing fat binaries it uses only X.Y when copying
to lib/, that's what you mean?
> It wouldn't actually (necessarily) download those versions--just use
> them--i.e. this is instead of calling rake with
> RUBY_CC_VERSION=1.8.6:1.9.1
> each time.
>
Hmn, still don't get you. calling RUBY_CC_VERSION do not download
them, it try to find the records in .rake-compiler/config.yml
If they are missing, then will let you know:
luis@seyori ~/projects/oss/sqlite3-ruby[master]$ rake cross compile
RUBY_CC_VERSION=1.8.6:1.9.9
(in /Users/luis/projects/oss/sqlite3-ruby)
no configuration section for specified version of Ruby (rbconfig-1.9.9)
no configuration section for specified version of Ruby (rbconfig-1.9.9)
> Thoughts?
Sorry for not understand you, perhaps if you rephrase what you're
saying my small brain will be able to understand it (I hope).
Thank you,
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
> > Rake::ExtensionTask.new('ruby_prof', spec) do |ext|
> > ext.cross_compile = true
> > ext.cross_platform = 'i386-mswin32'
> > ext.targets = ['1.8.6', '1.9.1'] # add this one
> > ext.targets = ['1.8.6p368', '1.9.1p376'] # or this one or what not
> > end
makes
$ rake cross compile RUBY_CC_VERSION=1.8.6:1.9.9
become
$ rake cross compile
(only).
HTH.
-r
Got it.
Once this gets implemented:
http://github.com/luislavena/rake-compiler/issues#issue/16
I'll be able change task definitions at runtime instead of what
happens right now (at loading time).
Please open a new issue and I'll prioritize it afterwards.
Thank you.
Sure thing.
Also (silly me) I forgot I forgot that you can just set
ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
within the Rakefile itself. That should work for me for now.
Thanks.
-r
Yeah, but that needs to appear before the Rake::ExtensionTask for it
to work, my change will allow a lazy evaluation of the tasks...
Too many cool things to do, so little amount of time to do them ...