Closed
Description
Building with -DBUILD_SHARED_LIBS=ON
is broken (again) as of 0d56408 :
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD="X86;NVPTX" \
-DLLVM_EXTERNAL_PROJECTS="llvm-spirv;sycl;opencl-aot" \
-DLLVM_ENABLE_PROJECTS="clang;llvm-spirv;sycl;opencl-aot;libclc" \
-DLLVM_EXTERNAL_SYCL_SOURCE_DIR=$SYCL_BASE/llvm/sycl \
-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=$SYCL_BASE/llvm/llvm-spirv \
-DBUILD_SHARED_LIBS=ON \
-DLIBCLC_TARGETS_TO_BUILD="nvptx64--;nvptx64--nvidiacl" \
-DSYCL_BUILD_PI_CUDA=ON \
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
-DCUDA_USE_STATIC_CUDA_RUNTIME=OFF \
$SYCL_BASE/llvm/llvm
make -j`nproc` sycl-toolchain
results in
...
CMakeFiles/LLVMSYCLLowerIR.dir/LowerWGScope.cpp.o: In function `initializeSYCLLowerWGScopeLegacyPassPassOnce(llvm::PassRegistry&)':
LowerWGScope.cpp:(.text._ZL44initializeSYCLLowerWGScopeLegacyPassPassOnceRN4llvm12PassRegistryE+0x7f): undefined reference to `llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)'
CMakeFiles/LLVMSYCLLowerIR.dir/LowerWGScope.cpp.o: In function `(anonymous namespace)::SYCLLowerWGScopeLegacyPass::~SYCLLowerWGScopeLegacyPass()':
LowerWGScope.cpp:(.text._ZN12_GLOBAL__N_126SYCLLowerWGScopeLegacyPassD2Ev+0x3): undefined reference to `vtable for llvm::FunctionPass'
LowerWGScope.cpp:(.text._ZN12_GLOBAL__N_126SYCLLowerWGScopeLegacyPassD2Ev+0xf): undefined reference to `llvm::Pass::~Pass()'
...
CMakeFiles/LLVMSYCLLowerIR.dir/LowerWGScope.cpp.o:(.data.rel.ro._ZTVN12_GLOBAL__N_126SYCLLowerWGScopeLegacyPassE+0x80): undefined reference to `llvm::Pass::getAsPMDataManager()'
CMakeFiles/LLVMSYCLLowerIR.dir/LowerWGScope.cpp.o:(.data.rel.ro._ZTVN12_GLOBAL__N_126SYCLLowerWGScopeLegacyPassE+0x88): undefined reference to `llvm::Pass::verifyAnalysis() const'
CMakeFiles/LLVMSYCLLowerIR.dir/LowerWGScope.cpp.o:(.data.rel.ro._ZTVN12_GLOBAL__N_126SYCLLowerWGScopeLegacyPassE+0x90): undefined reference to `llvm::Pass::dumpPassStructure(unsigned int)'
collect2: error: ld returned 1 exit status
make[3]: *** [lib/SYCLLowerIR/CMakeFiles/LLVMSYCLLowerIR.dir/build.make:84: lib/LLVMSYCLLowerIR.11git] Error 1
make[2]: *** [CMakeFiles/Makefile2:10057: lib/SYCLLowerIR/CMakeFiles/LLVMSYCLLowerIR.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
I suspect the origin is #1306, given that the link failures are in LLVMSYCLLowerIR
.
The full build log is attached.
build.log
Metadata
Metadata
Assignees
Labels
No labels