Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Cross compile #174

Closed
wants to merge 3 commits into from
Closed

Conversation

stereobooster
Copy link

No description provided.

@cowboyd cowboyd mentioned this pull request Sep 6, 2012
@cowboyd
Copy link
Collaborator

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

@stereobooster
Copy link
Author

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 rake-compiler/rake-compiler#63

@stereobooster
Copy link
Author

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

@luislavena
Copy link

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.

@stereobooster
Copy link
Author

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 rubyjs/libv8#40). And I have no clue why it happens.

I compiled list of available options

@cowboyd
Copy link
Collaborator

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?

@stereobooster
Copy link
Author

I tested against 3.11.8

@mattconnolly
Copy link

Can one of the admins verify this patch?

@stereobooster stereobooster deleted the cross-compile branch June 30, 2017 15:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants