Bug #7897
closed
rubygems 2.0 has an incompatibility about installation of extension libraries if gem package does not contain lib directory
Added by mrkn (Kenta Murata) almost 12 years ago.
Updated almost 12 years ago.
ruby -v:
ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]
[ruby-core:52614]
Description
Hi,
rubygems 2.0 has an incompatibility about installation of extension libraries.
If a gem package does not contain lib directory,
an extension library file is copied as a file named "lib".
You can reproduce this problem by installing msgpack version 0.4.7.
The following patch fixes this problem.
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 0865a6d..b8a6d2b 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -672,6 +672,7 @@ TEXT
begin
Dir.chdir extension_dir do
-
FileUtils.mkdir_p(dest_path)
results = builder.build(extension, gem_dir, dest_path,
results, @build_args)
I'm sorry, the previous patch is wrong.
The following is right.
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb
index 0865a6d..e5a5e0e 100644
--- a/lib/rubygems/installer.rb
+++ b/lib/rubygems/installer.rb
@@ -4,6 +4,7 @@
See LICENSE.txt for permissions.¶
#++
+require 'fileutils'
require 'rubygems/exceptions'
require 'rubygems/package'
require 'rubygems/ext'
@@ -672,6 +673,7 @@ TEXT
begin
Dir.chdir extension_dir do
-
FileUtils.mkdir_p(dest_path)
results = builder.build(extension, gem_dir, dest_path,
results, @build_args)
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r39366.
Kenta, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/rubygems/installer.rb (build_extensions): Create extension
install destination before building extension. Patch by Kenta Murata.
[ruby-trunk - Bug #7897]
- test/rubygems/test_gem_installer.rb: Test for the above.
As Vit Ondruch has noted, it seems to be a bug in the Makefile generated by mkmf.rb as ruby 1.9.3 without Murata-san's patch correctly installs lib/msgpack.bundle.
Nobu, can you check it?
Just to be safe, I committed Murata-san's patch and will open a backport request.
- Status changed from Closed to Assigned
- Assignee changed from drbrain (Eric Hodel) to nobu (Nobuyoshi Nakada)
- % Done changed from 100 to 50
It caused by r38864, which removes timestamp files in dependency rules.
Now mkmf uses those files to fix parallel make issues.
- Status changed from Assigned to Closed
- Assignee changed from nobu (Nobuyoshi Nakada) to drbrain (Eric Hodel)
- % Done changed from 50 to 100
Then RubyGems breaks mkmf.rb's Makefile and Murata-san's patch fixes it.
Thank you for checking!
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0Like0Like0Like0