[ruby-trunk - Bug #7344][Open] gem pristine bigdecimal が失敗してしまう

Issue #7344 has been reported by hsbt (Hiroshi SHIBATA).


Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344

Author: hsbt (Hiroshi SHIBATA)
Status: Open
Priority: Normal
Assignee: nahi (Hiroshi N.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by mame (Yusuke E.).

Status changed from Open to Assigned
Assignee changed from nahi (Hiroshi N.) to mrkn (Kenta M.)

mrkn さんの作った gem が悪いのでは、という説なので、
とりあえず mrkn さん調べてみてもらえますか?


Yusuke E. [email protected]

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-32852

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by mrkn (Kenta M.).

ほかの built-in 拡張ライブラリは問題ないんですかねぇ。
そうだとすれば gemspec を真似すればいいのかな。

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-32867

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by hsbt (Hiroshi SHIBATA).

他のライブラリは pure-ruby なので問題無いようです。EM 等にならってビルド時の working ディレクトリを tmp
とかにすれば良さそうな気もしますが、rubygems や fake_gem.rb
の仕組みをあまりよくわかってないので、パッチまでは作れませんでした。

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-33821

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by kou (Kouhei S.).

RubyGemsに https://github.com/rubygems/rubygems/pull/377
がマージされて、RubyGemsがRuby本体にマージされれば #7427 解決しそうな気がします。RubyGemsの方のpull
requestではdefault gemのpristineはスキップするようにしてあるので。

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-33849

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by kou (Kouhei S.).

あぁ、それは解決しないです。そっちはrubygems.orgにあるbigdecimal-1.1.0.gemをダウンロードしてビルドするのでdefault
gemとかは関係ない世界になります。

gem install bigdecimalする機会があるのかどうかはおいておくとして、bigdecimal
gemがトップレベルにextconf.rbとかbigdecimal.cとかを転がしているのをext/bigdecimal/以下に移動すれば解決するような気がします!

コマンドでいえばこんな感じです。

% mkdir -p ext/bigdecimal
% mv bigdecimal.{c,h} depend extconf.rb ext/bigdecimal/

で、それにあわせてbigdecimal.gemspecをこんな感じに編集します。

Index: bigdecimal.gemspec

— bigdecimal.gemspec (revision 37766)
+++ bigdecimal.gemspec (working copy)
@@ -10,13 +10,13 @@
s.email = “[email protected]
s.description = “This library provides arbitrary-precision decimal
floating-point number class.”
s.authors = [“Kenta M.”, “Shigeo Kobayashi”]

  • s.require_path = %[.]
    s.files = %w[
    bigdecimal.gemspec
  • bigdecimal.c
  • bigdecimal.h
  • ext/bigdecimal/bigdecimal.c
  • ext/bigdecimal/bigdecimal.h
    README
  • depend extconf.rb
  • ext/bigdecimal/depend
  • ext/bigdecimal/extconf.rb
    lib/bigdecimal/jacobian.rb
    lib/bigdecimal/ludcmp.rb
    lib/bigdecimal/math.rb
    @@ -26,5 +26,5 @@
    sample/nlsolve.rb
    sample/pi.rb
    ]
  • s.extensions = %w[extconf.rb]
  • s.extensions = %w[ext/bigdecimal/extconf.rb]
    end

これで作ったbigdecimal
gemをrubygems.orgにpushしておくといいんじゃないかと思います。(バージョンはあげないといけないと思います。)

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-33858

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by hsbt (Hiroshi SHIBATA).

須藤さんありがとうございます。直りそうな気がします!

mrkn よろしくお願いします!


Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-33870

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by mrkn (Kenta M.).

で、それにあわせてbigdecimal.gemspecをこんな感じに編集します。

このパッチは trunk の ext/bigdecimal/bigdecimal.gemspec に当てれば良いのでしょうか?

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34318

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by hsbt (Hiroshi SHIBATA).

gem install bigdecimal でも同様の結果になってしまいました。rubygems/rubygems の #377
でインストールできない問題も解決するのであれば、rubygems 側の変更でよさそうです。

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-33855

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by kou (Kouhei S.).

はい。
(もしかして、bigdecimal用の別のリポジトリがあったりします?)

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34319

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by mrkn (Kenta M.).

私の手元の環境では、以下の patch を適用し、ruby の top_srcdir で gem build
ext/bigdecimal/bigdecimal.gemspec を実行してビルドした gem
パッケージを使う事で、install/pristine/uninstall などがきちんと動くことを確認できました。

私は本来の問題を再現する環境の作り方が分からないので、以下の変更で問題ないかどうかレビューまたは確認をしていただけないでしょうか。

diff --git a/ext/bigdecimal/bigdecimal.gemspec
b/ext/bigdecimal/bigdecimal.gemspec
index 362808c…f52ac22 100644
— a/ext/bigdecimal/bigdecimal.gemspec
+++ b/ext/bigdecimal/bigdecimal.gemspec
@@ -10,21 +10,22 @@ Gem::Specification.new do |s|
s.email = “[email protected]
s.description = “This library provides arbitrary-precision decimal
floating-point number class.”
s.authors = [“Kenta M.”, “Shigeo Kobayashi”]

  • s.require_path = %[.]
  • s.require_path = %[ext/bigdecimal/lib/]
    s.files = %w[
  • bigdecimal.gemspec
  • bigdecimal.c
  • bigdecimal.h
  • README
  • depend extconf.rb
  • lib/bigdecimal/jacobian.rb
  • lib/bigdecimal/ludcmp.rb
  • lib/bigdecimal/math.rb
  • lib/bigdecimal/newton.rb
  • lib/bigdecimal/util.rb
  • sample/linear.rb
  • sample/nlsolve.rb
  • sample/pi.rb
  • ext/bigdecimal/bigdecimal.gemspec
  • ext/bigdecimal/bigdecimal.c
  • ext/bigdecimal/bigdecimal.h
  • ext/bigdecimal/README
  • ext/bigdecimal/depend
  • ext/bigdecimal/extconf.rb
  • ext/bigdecimal/lib/bigdecimal/jacobian.rb
  • ext/bigdecimal/lib/bigdecimal/ludcmp.rb
  • ext/bigdecimal/lib/bigdecimal/math.rb
  • ext/bigdecimal/lib/bigdecimal/newton.rb
  • ext/bigdecimal/lib/bigdecimal/util.rb
  • ext/bigdecimal/sample/linear.rb
  • ext/bigdecimal/sample/nlsolve.rb
  • ext/bigdecimal/sample/pi.rb
    ]
  • s.extensions = %w[extconf.rb]
  • s.extensions = %w[ext/bigdecimal/extconf.rb]
    end

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34365

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by mrkn (Kenta M.).

(もしかして、bigdecimal用の別のリポジトリがあったりします?)

いえ、ありません。ruby の trunk が唯一のリポジトリです。

ところで、io/console にも同じ問題があったりしますか?

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34362

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: mrkn (Kenta M.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by nobu (Nobuyoshi N.).

Assignee changed from mrkn (Kenta M.) to drbrain (Eric H.)

いや、これはソースディレクトリとビルドディレクトリ、インストールディレクトリを区別していないrubygemsのバグじゃないでしょうか。

I think the culprit is rubygems, which doesn’t separate build, source
and install directories.

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34388

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: drbrain (Eric H.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by hsbt (Hiroshi SHIBATA).

latest rubygems fixed this issue. I confirmed to solve gem pristine bigdecimal.

But gem install bigdecimal always failed now. I think that bigdecimal
problems at first. but nobu said it’s rubygems defects.

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34536

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: drbrain (Eric H.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by drbrain (Eric H.).

=begin
This seems fixed in ruby 2.0.0 preview2 which includes RubyGems
2.0.0.preview2 and default gems:

$ gem20 pristine bigdecimal
Restoring gems to pristine condition…
Skipped bigdecimal-1.1.0, it is a default gem
$ gem20 env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.0.preview2
- RUBY VERSION: 2.0.0 (2012-12-05 patchlevel -1)
[x86_64-darwin12.2.0]
- 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/

=end


Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34445

Author: hsbt (Hiroshi SHIBATA)
Status: Assigned
Priority: Normal
Assignee: drbrain (Eric H.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by mrkn (Kenta M.).

Status changed from Assigned to Feedback

I think we need more precise information to reproduce the issue that
gem install bigdecimal is still failed on trunk.


Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34801

Author: hsbt (Hiroshi SHIBATA)
Status: Feedback
Priority: Normal
Assignee: drbrain (Eric H.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by drbrain (Eric H.).

=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 H.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by kou (Kouhei S.).

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?

Umm… It is difficult… OK. It’s a bug in RubyGems. We can fix it by
the following change:

Index: specification.rb

— specification.rb (revision 38448)
+++ specification.rb (working copy)
@@ -648,10 +648,10 @@
unless defined?(@@all) && @@all then

   specs = {}
  •  each_default do |spec|
    
  •  each_normal do |spec|
       specs[spec.full_name] ||= spec
     end
    
  •  each_normal do |spec|
    
  •  each_default do |spec|
       specs[spec.full_name] ||= spec
     end
    

I think we need more precise information to reproduce the issue that gem install bigdecimal is still failed on trunk.

I think that install command on Mac OS X doesn’t report error for the
same source and destination file. Could you try the following commands?

% touch a
% install a a
% echo $?

Here is the result on my Debian GNU/Linux:

% touch a
% install a a
install: ‘a’ and ‘a’ are the same file
% echo $?
1

I think that install on Mac OS X returns 0 for “echo $?”.

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34830

Author: hsbt (Hiroshi SHIBATA)
Status: Feedback
Priority: Normal
Assignee: drbrain (Eric H.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by mrkn (Kenta M.).

Could you try the following commands?

This is my result:

$ touch a
$ install a a
install: a and a are the same file
$ echo $?
64
$ which install
/usr/bin/install
$ uname -a
Darwin mrkn-mbp15.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug
25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64


Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34832

Author: hsbt (Hiroshi SHIBATA)
Status: Feedback
Priority: Normal
Assignee: drbrain (Eric H.)
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
で必ず止まってしまうので困っています。

Issue #7344 has been updated by hsbt (Hiroshi SHIBATA).

I used GNU install(includes coreutils) in Mac OS. my result is same as
kou’s result of GNU/Linux.

Bug #7344: gem pristine bigdecimal が失敗してしまう
https://bugs.ruby-lang.org/issues/7344#change-34838

Author: hsbt (Hiroshi SHIBATA)
Status: Feedback
Priority: Normal
Assignee: drbrain (Eric H.)
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
で必ず止まってしまうので困っています。

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs