xcode YAML文件GFortran中的“ld:unsupported tapi file type '!tapi-tbd'”

sxpgvts3  于 2023-03-24  发布在  其他
关注(0)|答案(1)|浏览(206)

我尝试运行basing Hello,World! Fortran代码,但出现以下错误:
ld:不支持的tapi文件类型'!tapi-tbd'在YAML文件'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDK/MacOSX.sdk/usr/lib/libSystem.tbd'中用于体系结构x86_64
收集2:错误:ld返回1退出状态
我在用

  • macOS v13.1(Ventura)(22C65)
  • Xcode版本14.2(14 C18)
  • GCC版本12

我试过了

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

但运气不好。

pobjuy32

pobjuy321#

这个问题源于一个架构冲突--具体来说,我已经通过x86_64架构的自制软件安装了GCC。解决方案是为arm 64安装自制软件,然后安装GCC。

gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/12.2.0/bin/../libexec/gcc/aarch64-apple-darwin22/12/lto-wrapper
Target: aarch64-apple-darwin22

相关问题