Forum: Ruby-core [ruby-trunk - Bug #7897][Open] rubygems 2.0 has an incompatibility about installation of extension l

Posted by mrkn (Kenta Murata) (Guest)
on 2013-02-21 08:41
(Received via mailing list)
Issue #7897 has been reported by mrkn (Kenta Murata).

----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897

Author: mrkn (Kenta Murata)
Status: Open
Priority: Urgent
Assignee: drbrain (Eric Hodel)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Posted by mrkn (Kenta Murata) (Guest)
on 2013-02-21 09:04
(Received via mailing list)
Issue #7897 has been updated by mrkn (Kenta Murata).


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)

----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897#change-36704

Author: mrkn (Kenta Murata)
Status: Open
Priority: Urgent
Assignee: drbrain (Eric Hodel)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Posted by mrkn (Kenta Murata) (Guest)
on 2013-02-21 09:05
(Received via mailing list)
Issue #7897 has been updated by mrkn (Kenta Murata).


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)

----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897#change-36705

Author: mrkn (Kenta Murata)
Status: Open
Priority: Urgent
Assignee: drbrain (Eric Hodel)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Posted by Vít Ondruch (vo_x)
on 2013-02-21 15:50
(Received via mailing list)
Issue #7897 has been updated by vo.x (Vit Ondruch).


I guess this regression was introduced in r37016 by dropping this line 
[1] in mkmf. Not sure what was the intention, since creating directory 
seems unrelated to the timestamp dependencies IMO


[1] 
https://github.com/ruby/ruby/commit/ba3d6005837aab...
----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897#change-36713

Author: mrkn (Kenta Murata)
Status: Open
Priority: Urgent
Assignee: drbrain (Eric Hodel)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-02-21 23:24
(Received via mailing list)
Issue #7897 has been updated by drbrain (Eric Hodel).


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.
----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897#change-36720

Author: mrkn (Kenta Murata)
Status: Closed
Priority: Urgent
Assignee: drbrain (Eric Hodel)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-02-21 23:27
(Received via mailing list)
Issue #7897 has been updated by drbrain (Eric Hodel).

Status changed from Closed to Assigned
Assignee changed from drbrain (Eric Hodel) to nobu (Nobuyoshi Nakada)
% Done changed from 100 to 50


----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897#change-36721

Author: mrkn (Kenta Murata)
Status: Assigned
Priority: Urgent
Assignee: nobu (Nobuyoshi Nakada)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Posted by Nobuyoshi Nakada (nobu)
on 2013-02-22 02:36
(Received via mailing list)
Issue #7897 has been updated by nobu (Nobuyoshi Nakada).


It caused by r38864, which removes timestamp files in dependency rules.
Now mkmf uses those files to fix parallel make issues.
----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897#change-36754

Author: mrkn (Kenta Murata)
Status: Assigned
Priority: Urgent
Assignee: nobu (Nobuyoshi Nakada)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Posted by drbrain (Eric Hodel) (Guest)
on 2013-02-22 03:41
(Received via mailing list)
Issue #7897 has been updated by drbrain (Eric Hodel).

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!
----------------------------------------
Bug #7897: rubygems 2.0 has an incompatibility about installation of 
extension libraries if gem package does not contain lib directory
https://bugs.ruby-lang.org/issues/7897#change-36758

Author: mrkn (Kenta Murata)
Status: Closed
Priority: Urgent
Assignee: drbrain (Eric Hodel)
Category: lib
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.2]


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.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.