Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building with -DBUILD_SHARED_LIBS=ON is broken (again) #1320

Closed
fwyzard opened this issue Mar 14, 2020 · 3 comments
Closed

Building with -DBUILD_SHARED_LIBS=ON is broken (again) #1320

fwyzard opened this issue Mar 14, 2020 · 3 comments

Comments

@fwyzard
Copy link
Contributor

fwyzard commented Mar 14, 2020

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

@fwyzard
Copy link
Contributor Author

fwyzard commented Mar 14, 2020

Seems to be fixed by #1321.

@bader
Copy link
Contributor

bader commented Mar 16, 2020

Seems to be fixed by #1321.

Can we close this issue?

NOTE: we added this configuration to the post-commit, so hopefully we will detect commits regressing this configuration much earlier.

@fwyzard
Copy link
Contributor Author

fwyzard commented Mar 16, 2020

Fixed by #1321.

@fwyzard fwyzard closed this as completed Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants