Cross compile #174

wants to merge 3 commits into


None yet
4 participants

No description provided.

cowboyd referenced this pull request Sep 6, 2012




cowboyd commented Sep 6, 2012

Curious here why you prepose to remove gem-compiler with this PR. The purpose as I see it is to avoid having one-off build hackery for every gem, and if possible, I'd like to keep therubyracer using it. What makes it a deal-breaker in this case? /cc @luislavena

I'm not insisting. But rake compiler provides its onw native task.

  sh "rake native gem"

or it can be called like this

task :gem # dummy task
task "build:native" => [:native, :gem]

Discussed in luislavena/rake-compiler#63

Update pack v8.dll into windows binary gem commit to be the same as in #172

Hello @stereobooster and @cowboyd, late to the party on my end.

As creator of both gem-compiler and rake-compiler, I can point out that both gems serve different purposes.

Former, is an out-side approach, aiming you don't modify a gem source to be able to generate a gem, to be used in cases you work with 3rd party gems and need to generate binaries for your scenarios.

Later, on the other hand serves as convention over configuration approach to generate gems, where to place and how to compile extensions used by the gem.

Also rake-compiler do weird things with rake task dependency that building a sane sequence of pre and post requirements can become a problem.

One last recommendation to @stereobooster, do not build a shared library for v8, and don't modify the ENV["PATH"] to load the DLL, that is a bad practice.

I've been inculcating over past years how to avoid bundle dlls while dealing with gems (like sqlite3-ruby, nokogiri and others).

I strongly recommend you build a static version, like the original one and minimize the platform-specific changes to compile against it.

Sidenote: I'm still working on transition cross-compilation and fat-binaries aspect from my private project into gem-compiler.

I strongly recommend you build a static version, like the original one and minimize the platform-specific changes to compile against it.

I know. But the problem is that the tests freeze with static library (see cowboyd/libv8#40). And I have no clue why it happens.

I compiled list of available options


cowboyd commented Sep 6, 2012

I see, thanks for the clarification. So from your description @luislavena, it really it sounds as though I should be using just plain rake-compiler.

However, being able to cross-compile and produce fat 1.8, 1.9 (and eventually 2.0) binary gems for free is something I want to benefit from when it does eventually come. Is that going to make its way into rake-compiler at some point?

@stereobooster what version of libv8 did you test against that it was still freezing?

I tested against 3.11.8

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment