[MacPorts] #61243: libtool @2.4.6_9: link mode ignores specified compiler

MacPorts noreply at macports.org
Mon Sep 28 19:57:45 UTC 2020


#61243: libtool @2.4.6_9: link mode ignores specified compiler
--------------------------+----------------------
 Reporter:  chrstphrchvz  |      Owner:  larryv
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.6.3
 Keywords:                |       Port:  libtool
--------------------------+----------------------
 A long-known issue (assuming it's still the same one) in libtool is that
 when run in link mode, it ignores the compiler specified on the command
 line, and instead uses whichever compiler is hardcoded in libtool, i.e.
 the one it was compiled with. The "workaround" is to configure your own
 libtool hardcoded with the compiler you intend to build other things with,
 as if you're not supposed to reuse a single libtool installation with
 other compilers.

 One way this causes problems is that on macOS 10.6
 ([https://build.macports.org/builders/ports-10.6_i386-builder/builds/14189/steps
 /install-port/logs/stdio 32 bit] and presumably 64 bit) libtool is built
 with clang 3.7, and when other ports are built with another compiler (e.g.
 clang 9.0), libtool tries using clang 3.7 anyway during link mode. Example
 for recent `libvterm` 10.6 builds
 ([https://build.macports.org/builders/ports-10.6_i386-builder/builds/18087/steps
 /install-port/logs/stdio 32 bit] and
 [https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/35247
 64 bit]):
 {{{
 glibtool --mode=link --tag=CC /opt/local/bin/clang-mp-9.0 -rpath
 /opt/local/lib -version-info 0:4:0 -o libvterm.la src/encoding.lo
 src/keyboard.lo src/mouse.lo src/parser.lo src/pen.lo src/screen.lo
 src/state.lo src/unicode.lo src/vterm.lo -L/opt/local/lib
 -Wl,-headerpad_max_install_names -arch x86_64
 glibtool: link: /opt/local/bin/clang-mp-3.7 -dynamiclib -Wl,-undefined
 -Wl,dynamic_lookup -o .libs/libvterm.0.dylib  src/.libs/encoding.o
 src/.libs/keyboard.o src/.libs/mouse.o src/.libs/parser.o src/.libs/pen.o
 src/.libs/screen.o src/.libs/state.o src/.libs/unicode.o src/.libs/vterm.o
 -L/opt/local/lib  -Wl,-headerpad_max_install_names -arch x86_64
 -install_name  /opt/local/lib/libvterm.0.dylib -compatibility_version 1
 -current_version 1.4 -Wl,-single_module
 /opt/local/bin/glibtool: line 10550: /opt/local/bin/clang-mp-3.7: No such
 file or directory
 }}}

 Do any ports work around this? If so, are they expected to?

-- 
Ticket URL: <https://trac.macports.org/ticket/61243>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list