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
cannot define two Rake::ExtensionTask
s with separate cross_compiling blocks
#36
Comments
Indeed. Rake ExtensionTask defines a single cross task and that is invoked. Multiple files been added will generate duplicate spec entries. A workaround will be always place the ruby entry point inside the gem. The whole Thank you for the report. |
Are there any workarounds for this? See eventmachine/eventmachine#222 |
Will see what can be done, sorry for the delay. |
@tmm1: can you try this on EventMachine? def setup_cross_compilation(ext)
unless RUBY_PLATFORM =~ /mswin|mingw/
ext.cross_compile = true
ext.cross_platform = ['x86-mingw32', 'x86-mswin32-60']
# inject 1.8/1.9 pure-ruby entry point
# HACK: add these dependencies to the task instead of using cross_compiling
ext.cross_platform.each do |platf|
Rake::Task["native:#{GEMSPEC.name}:#{platf}"].prerequisites.unshift "lib/#{ext.name}.rb"
end
end
end |
@tmm1, ping? did the above code help you out? please let me know. |
No luck:
|
@tmm1, can you try this weird-and-shameful-hack-that-I-m-not-proud-of? |
How about packaging fastfilereader in its own gem? Wouldn't this provide the needed separation? |
…iler bug (fixes #222)
The rakefile hack works. I've merged into EM 1.0.2 to work around this bug until it is resolved. Thanks @luislavena |
eventmachine defines two extension tasks: https://github.com/eventmachine/eventmachine/blob/master/tasks/package.rake#L25-33
each one uses its own cross_compiling block to add a .rb fat-binary wrapper to spec.files, but the second extension gets rubyeventmachine.rb added to it instead of fastfilereader.rb
with this patch:
you can see the first block is getting called twice:
The text was updated successfully, but these errors were encountered: