Project

General

Profile

Bug #9256

Build failure on Mac OS X after r44257

Added by Tomoyuki Chikanaga over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
ruby -v:
ruby 2.1.0dev (2013-12-18 trunk 44256) [x86_64-darwin13.0]
[ruby-dev:47855]

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 over 2 years 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 over 2 years 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 over 2 years 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 over 2 years 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