[MacPorts] #57612: libtool does not respect -syslibroot when linking

MacPorts noreply at macports.org
Fri Nov 16 00:01:55 UTC 2018


#57612: libtool does not respect -syslibroot when linking
---------------------+--------------------
  Reporter:  kencu   |      Owner:  (none)
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:          |
---------------------+--------------------

Comment (by kencu):

 You might think this should work as well:
 {{{
 if {${configure.sdkroot} ne ""} {
      configure.ldflags-append -isysroot${configure.sdkroot}
 }
 }}}
 But it doesn't. Although that is passed to `libtool`, `libtool` does not
 pass it on to the link line, and the link fails:
 {{{
 libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I. -I..
 -I/opt/universal/include
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
 -pipe -Os -arch i386
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
 -c readline.c -o readline.o >/dev/null 2>&1
 /bin/sh ../libtool  --tag=CC   --mode=link /usr/bin/clang  -pipe -Os -arch
 i386
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
 -no-undefined -version-info 0:58:0 -L/opt/universal/lib
 -Wl,-headerpad_max_install_names
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
 -arch i386
 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
 -o libedit.la -rpath /opt/universal/lib chared.lo common.lo el.lo eln.lo
 emacs.lo hist.lo keymacro.lo map.lo chartype.lo parse.lo prompt.lo read.lo
 refresh.lo search.lo sig.lo terminal.lo tty.lo vi.lo wcsdup.lo
 tokenizer.lo tokenizern.lo history.lo historyn.lo filecomplete.lo
 readline.lo literal.lo        -lncurses
 libtool: link: /usr/bin/clang -dynamiclib  -o .libs/libedit.0.dylib
 .libs/chared.o .libs/common.o .libs/el.o .libs/eln.o .libs/emacs.o
 .libs/hist.o .libs/keymacro.o .libs/map.o .libs/chartype.o .libs/parse.o
 .libs/prompt.o .libs/read.o .libs/refresh.o .libs/search.o .libs/sig.o
 .libs/terminal.o .libs/tty.o .libs/vi.o .libs/wcsdup.o .libs/tokenizer.o
 .libs/tokenizern.o .libs/history.o .libs/historyn.o .libs/filecomplete.o
 .libs/readline.o .libs/literal.o   -L/opt/universal/lib -lncurses  -Os
 -arch i386 -Wl,-headerpad_max_install_names -arch i386 -Wl,-syslibroot
 -Wl,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
 -install_name  /opt/universal/lib/libedit.0.dylib -compatibility_version 1
 -current_version 1.58 -Wl,-single_module
 ld: warning: The i386 architecture is deprecated for macOS (remove from
 the Xcode build setting: ARCHS)
 ld: warning: ignoring file
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd,
 missing required architecture i386 in file
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
 Undefined symbols for architecture i386:
   "__DefaultRuneLocale", referenced from:
       _ce__isword in chared.o
       _cv__isword in chared.o
       _cv__isWord in chared.o
       _cv_next_word in chared.o
       _cv_prev_word in chared.o
       _cv__endword in chared.o
       _ed_move_to_beg in common.o
       ...
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/57612#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list