Bug #9256

Build failure on Mac OS X after r44257

Added by Tomoyuki Chikanaga about 1 year ago. Updated about 1 year ago.

[ruby-dev:47855]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
ruby -v:ruby 2.1.0dev (2013-12-18 trunk 44256) [x86_64-darwin13.0] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

r44257 の変更以後 Mac OS X で make enc が以下のような失敗をすることがあるようです。

making enc
linking encoding encdb.bundle
ld: warning: -pie being ignored. It is only used when linking a main executable
Undefined symbols for architecture x86_64:
"_rb_enc_set_base", referenced from:
Init_encdb in encdb.o
"_rb_enc_set_dummy", referenced from:
Init_encdb in encdb.o
"_rb_encdb_alias", referenced from:
_Init_encdb in encdb.o
"_rb_encdb_declare", referenced from:
_Init
encdb in encdb.o
"_rb_encdb_dummy", referenced from:
_Init_encdb in encdb.o
"_rb_encdb_replicate", referenced from:
_Init
encdb in encdb.o
"_rb_encdb_set_unicode", referenced from:
Init_encdb in encdb.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [.ext/x86
64-darwin13.0/enc/encdb.bundle] Error 1
make: *** [enc] Error 2

r44257 では configure の --opt-dir を処理する位置を移動しているのですが、この中に LDFLAGS と DLDFLAGS にフラグを追加する処理があります。
しかしこの結果 $target_os で分岐して darwin の時 DLDFLAGS を設定しているところの前にこの処理がきてしまったため DLDFLAGS に -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress が追加されなくなったのが直接の原因ではないかと思います。

Associated revisions

Revision 44297
Added by Nobuyoshi Nakada about 1 year ago

configure.in: use RUBY_APPEND_OPTIONS

  • configure.in: DLDFLAGS is defined in --with-opt-dir handler, so ${DLDFLAGS=} does not work now. use RUBY_APPEND_OPTIONS instead. [Bug #9256]

Revision 44297
Added by Nobuyoshi Nakada about 1 year ago

configure.in: use RUBY_APPEND_OPTIONS

  • configure.in: DLDFLAGS is defined in --with-opt-dir handler, so ${DLDFLAGS=} does not work now. use RUBY_APPEND_OPTIONS instead. [Bug #9256]

History

#1 Updated by Nobuyoshi Nakada about 1 year ago

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

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


configure.in: use RUBY_APPEND_OPTIONS

  • configure.in: DLDFLAGS is defined in --with-opt-dir handler, so ${DLDFLAGS=} does not work now. use RUBY_APPEND_OPTIONS instead. [Bug #9256]

Also available in: Atom PDF