Project

General

Profile

Bug #11944

ruby lib version (2.4.0) doesn't match executable version (RUBY_PROGRAM_VERSION_MAJOR.RUBY_PROGRAM_VERSION_MINOR.0) (RuntimeError)

Added by ngoto (Naohisa Goto) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-dev:49468]

Description

おそらく r53314 以降、Solaris にて古い fcc (Fujitsu C Compiler) にて、
以下のエラーによりビルドに失敗します。

./miniruby -I./lib -I. -I.ext/common  ./enc/make_encmake.rb --builtin-encs="enc/ascii.o enc/us_ascii.o enc/unicode.o enc/utf_8.o" --builtin-transes="enc/trans/newline.o" --module  enc.mk
/XXXXX/rbconfig.rb:9:in `<module:RbConfig>': ruby lib version (2.4.0) doesn't match executable version (RUBY_PROGRAM_VERSION_MAJOR.RUBY_PROGRAM_VERSION_MINOR.0) (RuntimeError)
        from /XXXXX/rbconfig.rb:7:in `<top (required)>'
        from /XXXXX/lib/mkmf.rb:6:in `require'
        from /XXXXX/lib/mkmf.rb:6:in `<top (required)>'
        from ./enc/make_encmake.rb:8:in `load'
        from ./enc/make_encmake.rb:8:in `<main>'
make: *** [enc.mk] Error 1

version.h 内の

#define RUBY_BUILD_VERSION_STR_2(v) STRINGIZE(v##_MAJOR)"."STRINGIZE(v##_MINOR)
#define RUBY_BUILD_VERSION_STR_3(v) RUBY_BUILD_VERSION_STR_2(v)"."STRINGIZE(v##_TEENY)

にて文字列を作っていますが、
古いfccでは、トークン結合 ## の後のマクロ展開がおかしいことになっているようです。
RUBY_PROGRAM_VERSION_TEENY は0に展開されているので、マクロ組み合わせ時の問題?
(fccのcppのバグ?)

Associated revisions

Revision 1c8b8173
Added by ngoto (Naohisa Goto) over 3 years ago

  • version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of Fujitsu C Compiler (fcc) on Solaris. [Bug #11944] [ruby-dev:49468]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 53427
Added by ngoto (Naohisa Goto) over 3 years ago

  • version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of Fujitsu C Compiler (fcc) on Solaris. [Bug #11944] [ruby-dev:49468]

Revision 53427
Added by ngoto (Naohisa Goto) over 3 years ago

  • version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of Fujitsu C Compiler (fcc) on Solaris. [Bug #11944] [ruby-dev:49468]

Revision 53427
Added by ngoto (Naohisa Goto) over 3 years ago

  • version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of Fujitsu C Compiler (fcc) on Solaris. [Bug #11944] [ruby-dev:49468]

Revision 53427
Added by ngoto (Naohisa Goto) over 3 years ago

  • version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of Fujitsu C Compiler (fcc) on Solaris. [Bug #11944] [ruby-dev:49468]

History

Updated by ngoto (Naohisa Goto) over 3 years ago

以下のパッチでエラーが出なくなることは確認しました。

Index: version.h
===================================================================
--- version.h   (revision 53426)
+++ version.h   (working copy)
@@ -3,7 +3,7 @@
 #define RUBY_PROGRAM_VERSION_TEENY 0

 #define RUBY_BUILD_VERSION_STR_2(v) STRINGIZE(v##_MAJOR)"."STRINGIZE(v##_MINOR)
-#define RUBY_BUILD_VERSION_STR_3(v) RUBY_BUILD_VERSION_STR_2(v)"."STRINGIZE(v##_TEENY)
+#define RUBY_BUILD_VERSION_STR_3(v) STRINGIZE(v##_MAJOR)"."STRINGIZE(v##_MINOR)"."STRINGIZE(v##_TEENY)

 #define RUBY_PROGRAM_VERSION RUBY_BUILD_VERSION_STR_3(RUBY_PROGRAM_VERSION)
 #define RUBY_VERSION RUBY_PROGRAM_VERSION

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

  • Status changed from Open to Assigned
  • Assignee set to ngoto (Naohisa Goto)

まさに今試してもらおうと思っていたパッチでした。
それでお願いします。

#3

Updated by ngoto (Naohisa Goto) over 3 years ago

  • Status changed from Assigned to Closed

Applied in changeset r53427.


  • version.h (RUBY_BUILD_VERSION_STR_3): Workaround for old version of Fujitsu C Compiler (fcc) on Solaris. [Bug #11944] [ruby-dev:49468]

Also available in: Atom PDF