PawseySC / rocm-from-source

Scripts to build AMD ROCm from source.
MIT License
15 stars 3 forks source link

Link stage failure when using libomptarget #13

Open dipietrantonio opened 1 year ago

dipietrantonio commented 1 year ago

When trying to compile a OpenMP code that uses offloading, I get this.

$ clang++  -fopenmp  -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx90a -lm /software/setonix/2022.11/pawsey/software/rocm/rocm-5.4.3rev0/llvm/lib/libLLVMObject.a   off.cpp
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /software/setonix/2022.11/pawsey/software/rocm/rocm-5.4.3rev0/llvm/lib/libomptarget.so: undefined reference to `llvm::object::Binary::getFileName() const'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /software/setonix/2022.11/pawsey/software/rocm/rocm-5.4.3rev0/llvm/lib/libomptarget.so: undefined reference to `llvm::object::createBinary(llvm::MemoryBufferRef, llvm::LLVMContext*, bool)'