From: "drbrain (Eric Hodel)" Date: 2012-12-15T06:47:22+09:00 Subject: [ruby-dev:46740] [ruby-trunk - Bug #7344] gem pristine bigdecimal が失敗してしまう Issue #7344 has been updated by drbrain (Eric Hodel). =begin I think I understand the comments on this bug thanks to google translate but please inform me of anything important I did not address. Using recent ruby and rubygems: $ gem20 env RubyGems Environment: - RUBYGEMS VERSION: 2.0.0.preview2.1 - RUBY VERSION: 2.0.0 (2012-12-15 patchlevel -1) [x86_64-darwin12.2.1] - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.0.0 - RUBY EXECUTABLE: /usr/local/bin/ruby20 - EXECUTABLE DIRECTORY: /usr/local/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-darwin-12 - GEM PATHS: - /usr/local/lib/ruby/gems/2.0.0 - /Users/drbrain/.gem/ruby/2.0.0 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :backtrace => false - :bulk_threshold => 1000 - :benchmark => false - "gemcutter_key" => "********************************" - "install" => "--format-executable --no-user-install" - "update" => "--format-executable --no-user-install" - "uninstall" => "--format-executable --no-user-install" - REMOTE SOURCES: - http://rubygems.org/ I can pristine big decimal (like hsbt): $ gem20 pristine bigdecimal Restoring gems to pristine condition... Skipped bigdecimal-1.1.0, it is a default gem and ((%gem pristine --all%)) works: $ sudo gem20 pristine --all Password: Restoring gems to pristine condition… […] Skipped bigdecimal-1.1.0, it is a default gem […] I can install bigdecimal: $ gem20 install bigdecimal Building native extensions. This could take a while... Successfully installed bigdecimal-1.1.0 Parsing documentation for bigdecimal-1.1.0 Done installing documentation for bigdecimal (1 sec). 1 gem installed The installed version of bigdecimal and the default gem version are the same, so the installed version can't be used: $ ruby20 -rbigdecimal -e 'p $".grep(/bigdecimal/)' ["/usr/local/lib/ruby/2.0.0/x86_64-darwin12.2.1/bigdecimal.bundle"] I don't know if this is a bug in RubyGems or not. kou, can you comment? You also can't uninstall the duplicate version you installed, this is a bug: $ gem20 uninstall bigdecimal ERROR: While executing gem ... (Gem::InstallError) gem "bigdecimal" cannot be uninstalled because it is a default gem I will fix this bug ^ NOTE: RubyGems will build bigdecimal.so then install bigdecimal.so and ext/bigdecimal/lib/ into lib/. RubyGems edits the Makefile so ((%make install%)) will copy the files: https://github.com/rubygems/rubygems/blob/master/lib/rubygems/ext/builder.rb#L19-L23 So source/build directories and lib directories can be separate (but not source, build and lib). =end ---------------------------------------- Bug #7344: gem pristine bigdecimal が失敗してしまう https://bugs.ruby-lang.org/issues/7344#change-34753 Author: hsbt (Hiroshi SHIBATA) Status: Assigned Priority: Normal Assignee: drbrain (Eric Hodel) Category: core Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-11-13) [x86_64-darwin12.2.1] gem pristine bigdecimal を実行すると以下のエラーが発生して落ちてしまいます。 % gem pristine bigdecimal Restoring gems to pristine condition... Building native extensions. This could take a while... ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. /Users/hsbt/.rbenv/versions/2.0.0-dev/bin/ruby extconf.rb checking for labs() in stdlib.h... yes checking for llabs() in stdlib.h... yes creating Makefile make compiling bigdecimal.c linking shared-object bigdecimal.bundle make install /usr/local/Cellar/coreutils/8.19/libexec/gnubin/install -c -m 0755 bigdecimal.bundle /Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/gems/bigdecimal-1.1.0/. /usr/local/Cellar/coreutils/8.19/libexec/gnubin/install: ‘bigdecimal.bundle’ and ‘/Users/hsbt/.rbenv/versions/2.0.0-dev/lib/ruby/gems/2.0.0/gems/bigdecimal-1.1.0/./bigdecimal.bundle’ are the same file make: *** [install-so] Error 1 単独で実行している時は影響がないのですが、 OS アップデート時などに gem pristine --all を実行した時は b で必ず止まってしまうので困っています。 -- http://bugs.ruby-lang.org/