Xcode 14.0 GCC-12 链接器问题

Ron*_*Ron 5 macos xcode gcc ld

我的 Mac 将 Xcode 更新到版本 14.0。安装新的命令行工具后,我开始遇到ld其附带版本的问题。更具体地说,我有一个使用 g++-12 编译器(通过自制程序安装)编译的项目,当我尝试编译具有以下输出的任何内容时,链接器炸弹会发生:

[  0%] Linking CXX shared library ../../lib/libeckit.dylib
0  0x10675fffa  __assert_rtn + 139
1  0x10659328d  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 4989
2  0x106583f8f  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 207
3  0x1065fa9d4  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 2036
4  0x1065fdfa0  ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 48
5  0x7ff80248534a  _dispatch_client_callout2 + 8
6  0x7ff8024968f5  _dispatch_apply_invoke + 213
7  0x7ff802485317  _dispatch_client_callout + 8
8  0x7ff802494c0c  _dispatch_root_queue_drain + 673
9  0x7ff80249525c  _dispatch_worker_thread2 + 160
10  0x7ff802638f8a  _pthread_wqthread + 256
A linker snapshot was created at:
        /tmp/libeckit.dylib-2022-09-15-112741.ld-snapshot
ld: Assertion failed: (_file->_atomsArrayCount == computedAtomCount && "more atoms allocated than expected"), function parse, file macho_relocatable_file.cpp, line 2061.
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libeckit.dylib] Error 1
Run Code Online (Sandbox Code Playgroud)

我尝试重新安装所有自制软件包,但这似乎没有影响任何东西。

Nel*_*z11 2

这似乎是最近的链接器错误,我找到了一些参考资料,我认为这个 SO 线程描述了 xcode/命令行工具的降级来解决它,直到该错误在 xcode 14 中得到修复。