Open zhk1211 opened 1 year ago
Yes, this is an issue, but it is intentional:
From Ventura (macOS13) the APIs have changed for accessing some of the information that the sanitisers need. At present, we do not have support in GCC for accessing those APIs and have had to disable the sanitisers until a working solution can be found.
g++-13 M_tree.cpp -o /Users/zhaohaikun/Desktop/code/M_tree -fsanitize=undefined
ld: library not found for -lubsan collect2: error: ld returned 1 exit status
Mac 13.4
g++-13 -v Using built-in specs. COLLECT_GCC=g++-13 COLLECT_LTO_WRAPPER=/opt/homebrew/Cellar/gcc/13.1.0/bin/../libexec/gcc/aarch64-apple-darwin22/13/lto-wrapper Target: aarch64-apple-darwin22 Configured with: ../configure --prefix=/opt/homebrew/opt/gcc --libdir=/opt/homebrew/opt/gcc/lib/gcc/current --disable-nls --enable-checking=release --with-gcc-major-version-only --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-13 --with-gmp=/opt/homebrew/opt/gmp --with-mpfr=/opt/homebrew/opt/mpfr --with-mpc=/opt/homebrew/opt/libmpc --with-isl=/opt/homebrew/opt/isl --with-zstd=/opt/homebrew/opt/zstd --with-pkgversion='Homebrew GCC 13.1.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --with-system-zlib --build=aarch64-apple-darwin22 --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.1.0 (Homebrew GCC 13.1.0)