Project

General

Profile

Bug #8655

シンボル名 Init_pack が複数ファイルで定義されている

Added by ngoto (Naohisa Goto) almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.0dev (2013-07-17) [sparc64-solaris2.10]
[ruby-dev:47526]

Description

Solarisにて、make test-all すると、以下のエラーが出てテストが実行できません。
% make test-all
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" -v
/XXXXXXXXXXXXXXXXXXXXXXX/lib/rake/ext/module.rb:36:in `const_missing': uninitialized constant Integer::INTEGER_PACK_MSWORD_FIRST (NameError)

Init_pack という名前の関数が pack.c と ext/-test-/bignum/pack.c の2か所に存在し、
後からrequireした "-test/bignum.so" の Init_pack() が呼ばれないのが原因と思います。

% git grep -n Init_pack
ext/-test-/bignum/pack.c:49:Init_pack(VALUE klass)
pack.c:2003:Init_pack(void)

ext/-test-/bignum/pack.c のファイル名とInit_の関数名を変更すれば解決すると思います。
(もちろん pack.c 側を変えても構いませんが、テスト側を変更するほうが自然と思います)

#1

Updated by akr (Akira Tanaka) almost 7 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r42049.
Naohisa, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/-test-/bignum/intpack.c: Renamed from ext/-test-/bignum/pack.c. (Init_intpack): Renamed from Init_pack. Reported by Naohisa Goto. [ruby-dev:47526] [Bug #8655]

Also available in: Atom PDF