pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: heads-up for macOS users re new ld(1) implementation



On 9/29/23 21:18, Tobias Nygren wrote:
Hi,

With the latest macOS 14 Xcode update comes a Command Line Tools update.
This brings a new implementation of ld(1) which unfortunately
has bugs that break some packages (ffmpeg5, gcc, ...)

If you have installed this update and encounter strange linker breakage,
sometimes it helps to locally put this line into the package's Makefile:

LDFLAGS.Darwin+=	-Wl,-ld_classic

Please don't commit such fixes yet though since it might break
packages for old CLT versions. People have reported bugs to Apple,
hopefully they will release a bugfix update soon.

Kind regards,
-Tobias

This doesn't help gcc12, but I'm not sure the LDFLAGS addition is
getting through to libtool, based on this terminal output:

libtool: link:
/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/./gcc/xgcc
-shared-libgcc -B/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/./gcc
-nostdinc++
-L/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/src
-L/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/src/.libs
-L/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/libsupc++/.libs
-B/Users/bacon/Pkgsrc/pkg/gcc12/aarch64-apple-darwin23/bin/
-B/Users/bacon/Pkgsrc/pkg/gcc12/aarch64-apple-darwin23/lib/ -isystem
/Users/bacon/Pkgsrc/pkg/gcc12/aarch64-apple-darwin23/include -isystem
/Users/bacon/Pkgsrc/pkg/gcc12/aarch64-apple-darwin23/sys-include
-dynamiclib  -o .libs/libstdc++.6.dylib .libs/libstdc++.6.dylib-master.o

-L/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/libsupc++/.libs
-L/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/src
-L/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/src/.libs
-L/Users/bacon/Pkgsrc/pkg/lib /Users/bacon/Pkgsrc/pkg/lib/libiconv.dylib
-lm  -Wl,-exported_symbols_list -Wl,libstdc++-symbols.explist
-install_name  /Users/bacon/Pkgsrc/pkg/gcc12/lib/libstdc++.6.dylib
-compatibility_version 7 -current_version 7.30
-macosx_version_min has been renamed to -macos_version_min
ld: warning: ignoring duplicate libraries: '-lgcc'
ld: warning: search path '/Users/bacon/Pkgsrc/pkg/gcc12//lib/.' not found
ld: warning: search path '/Users/bacon/Pkgsrc/pkg/gcc12/lib/.' not found
0  0x104f0b648  __assert_rtn + 72
1  0x104e3ffac  ld::AtomPlacement::findAtom(unsigned char, unsigned long
long, ld::AtomPlacement::AtomLoc const*&, long long&) const + 1204
2  0x104e55924
ld::InputFiles::SliceParser::parseObjectFile(mach_o::Header const*)
const + 15164
3  0x104e62e30  ld::InputFiles::parseAllFiles(void (ld::AtomFile const*)
block_pointer)::$_7::operator()(unsigned long, ld::FileInfo const&)
const + 420
4  0x18043d950  _dispatch_client_callout2 + 20
5  0x1804521a4  _dispatch_apply_invoke_and_wait + 176
6  0x180451464  _dispatch_apply_with_attr_f + 1176
7  0x180451650  dispatch_apply + 96
8  0x104edd3b8  ld::AtomFileConsolidator::parseFiles(bool) + 292
9  0x104e7e170  main + 9048
ld: Assertion failed: (resultIndex < sectData.atoms.size()), function
findAtom, file Relocations.cpp, line 1336.
collect2: error: ld returned 1 exit status
gmake[5]: *** [Makefile:751: libstdc++.la] Error 1
gmake[5]: Leaving directory
'/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/src'
gmake[4]: *** [Makefile:784: all-recursive] Error 1
gmake[4]: Leaving directory
'/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3/src'
gmake[3]: *** [Makefile:576: all-recursive] Error 1
gmake[3]: Leaving directory
'/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3'
gmake[2]: *** [Makefile:501: all] Error 2
gmake[2]: Leaving directory
'/Users/bacon/Pkgsrc/pkgsrc/lang/gcc12/work/build/aarch64-apple-darwin23/libstdc++-v3'
gmake[1]: *** [Makefile:13597: all-target-libstdc++-v3] Error 2



Home | Main Index | Thread Index | Old Index