After I started using MacOS Ventura with Xcode 14, compiling a Fortran code in a conda environment failed. The error seems to be due to ld:
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libSystem.tbd' for architecture x86_64
The ld in Anaconda3/bin/ supports only Apple TAPI version 10.0.0
@(#)PROGRAM:ld PROJECT:ld64-530 BUILD 07:42:29 Sep 7 2022 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS) LTO support using: LLVM version 14.0.6 (static support for 26, runtime is 29) TAPI support using: Apple TAPI version 10.0.0 (tapi-1000.10.8)
Outside Anaconda, compiling works and the ld in /usr/bin/ supports Apple TAPI version 14.0.0
@(#)PROGRAM:ld PROJECT:ld64-819.6 BUILD 21:47:27 Sep 13 2022 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em LTO support using: LLVM version 14.0.0, (clang-1400.0.29.102) (static support for 29, runtime is 29) TAPI support using: Apple TAPI version 14.0.0 (tapi-1400.0.11)
To fix the problem, first, I tried both Xcode 14.01 and 14.1 (13.4 was incompatible with Ventura), but they didn't work.
Second, I tried using old SDK following here, but this also didn't work.
Since I want to stay in a conda environment managing python tools combined with Fortran, any way to resolve the issue is very much appreciated!