You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ld64.lld: warning: Option `-keep_private_externs' is not yet implemented. Stay tuned...
ld64.lld: warning: Option `-r' is not yet implemented. Stay tuned...
ld64.lld: warning: Option `-r' is not yet implemented. Stay tuned...
ld64.lld: error: undefined symbol: main
Tip
One workaround is to disable the default use of lld via clang_use_lld=false, which switches back to ld64 (but this might cause other problems).
I think a better workaround is to pass a cached value to configure: lt_cv_apple_cc_single_mod=yes
The reason is that configure (with code from libtool.m4) tries to detect whether the linker supports -single_module and gets confused because lld prints a warning:
ld64.lld: warning: Option `-single_module' is deprecated in ld64:
ld64.lld: warning: Unnecessary option: this is already the default
This causes it to believe that this option is unsupported and the fallback options contain -keep_private_externs and -r which are not implemented.
With the cached value we tell configure that this option can be used which should be fine since this is the default of lld anyway.
Noteworthy changes in release 2.5.4 (2024-11-20) [stable]
** Bug fixes:
Fix incorrect use of workarounds designed for Darwin versions that
don't have -single_module support.
Unfortunately just updating the libtool version in the Rootfs wont change much since most autoconf based tarballs contain a pre-generated configure script which contains this code and even their own (outdated?) copy of libtool.m4.
We would probably need to regenerate the configure script and related files for each package that runs into this... or keep using a workaround until the release managers update their own libtool.
The text was updated successfully, but these errors were encountered:
benlorenz
changed the title
libtool < 2.5.4 fails to determine -single_module support for lld
configure (with libtool.m4 < 2.5.4) fails to determine -single_module support for lldJan 17, 2025
The result are errors like this (on macos):
Tip
One workaround is to disable the default use of lld via
clang_use_lld=false
, which switches back told64
(but this might cause other problems).I think a better workaround is to pass a cached value to configure:
lt_cv_apple_cc_single_mod=yes
The reason is that configure (with code from
libtool.m4
) tries to detect whether the linker supports-single_module
and gets confused because lld prints a warning:This causes it to believe that this option is unsupported and the fallback options contain
-keep_private_externs
and-r
which are not implemented.With the cached value we tell configure that this option can be used which should be fine since this is the default of
lld
anyway.This was fixed in libtool 2.5.4
See https://savannah.gnu.org/support/?110937, https://savannah.gnu.org/news/?id=10693:
Unfortunately just updating the libtool version in the Rootfs wont change much since most autoconf based tarballs contain a pre-generated
configure
script which contains this code and even their own (outdated?) copy oflibtool.m4
.We would probably need to regenerate the configure script and related files for each package that runs into this... or keep using a workaround until the release managers update their own libtool.
cc: @giordano
x-ref: #10280 (review), #7745 (comment), #7876, and probably quite a few more...
The text was updated successfully, but these errors were encountered: