taichi-aot-demo icon indicating copy to clipboard operation
taichi-aot-demo copied to clipboard

Apple M1: symbol not found in flat namespace during runtime

Open zchrissirhcz opened this issue 3 years ago • 3 comments

Short description

Hi, maintainers, I build taichi and taichi-aot-demo on Apple M1 successfully, but when running the executables (e.g. E3_implicit_fem_headless) it failed, complaining symbol not found, which is related to CUDA.

Details

I build taichi(latest commit in 2022.10.28) with customized options, on Apple M1 (yes, clang11 installed and specified via CXX env var, the customized LLVM10 downloaded and setup):

TI_WITH_CUDA = OFF
TI_WITH_VULKAN = ON
TI_WITH_C_API = ON

And when running executable files in taichi-aot-demo:

cd /Users/zz/work/taichi-aot-demo/build/mac-arm64/headless
 ./E1_hello_world_headless
dyld[54902]: symbol not found in flat namespace (__ZN6taichi4lang4cuda10CudaDevice14get_alloc_infoENS0_16DeviceAllocationE)
c++filt __ZN6taichi4lang4cuda10CudaDevice14get_alloc_infoENS0_16DeviceAllocationE
taichi::lang::cuda::CudaDevice::get_alloc_info(taichi::lang::DeviceAllocation)

zchrissirhcz avatar Oct 29 '22 04:10 zchrissirhcz

Since no nvidia gpu on Apple M1, I think no cuda related symbols should be requested.

zchrissirhcz avatar Oct 29 '22 04:10 zchrissirhcz

thanks for the report, will look into it

PENGUINLIONG avatar Oct 30 '22 12:10 PENGUINLIONG

Seems like interops leaked through

bobcao3 avatar Oct 31 '22 07:10 bobcao3