Skip to content

undefined reference to `llvm::SimplifyExtractElementInst(llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&)' #3143

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

Closed
zjin-lcf opened this issue Feb 2, 2021 · 3 comments · Fixed by #3150
Assignees

Comments

@zjin-lcf
Copy link
Contributor

zjin-lcf commented Feb 2, 2021

Building the DPC++ toolchain shows the following error. Could you reproduce the error ? Thank you.

[ 87%] Built target clangStaticAnalyzerCore
/usr/bin/ld: CMakeFiles/LLVMGenXIntrinsics.dir/GenXSingleElementVectorUtil.cpp.o: in function llvm::genx::collapseExtractInst(llvm::ExtractElementInst*, bool)': GenXSingleElementVectorUtil.cpp:(.text._ZN4llvm4genxL19collapseExtractInstEPNS_18ExtractElementInstEb+0x79): undefined reference to llvm::SimplifyExtractElementInst(llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&)'
/usr/bin/ld: CMakeFiles/LLVMGenXIntrinsics.dir/GenXSingleElementVectorUtil.cpp.o: in function llvm::genx::collapseBitcastInstructions(llvm::Function&, bool)': GenXSingleElementVectorUtil.cpp:(.text._ZN4llvm4genxL27collapseBitcastInstructionsERNS_8FunctionEb+0x120): undefined reference to llvm::SimplifyCastInst(unsigned int, llvm::Value*, llvm::Type*, llvm::SimplifyQuery const&)'
/usr/bin/ld: CMakeFiles/LLVMGenXIntrinsics.dir/GenXSingleElementVectorUtil.cpp.o: in function llvm::genx::collapseInsertInst(llvm::InsertElementInst*, bool)': GenXSingleElementVectorUtil.cpp:(.text._ZN4llvm4genxL18collapseInsertInstEPNS_17InsertElementInstEb+0x7f): undefined reference to llvm::SimplifyInsertElementInst(llvm::Value*, llvm::Value*, llvm::Value*, llvm::SimplifyQuery const&)'
collect2: error: ld returned 1 exit status
make[3]: *** [_deps/vc-intrinsics-build/GenXIntrinsics/lib/GenXIntrinsics/CMakeFiles/LLVMGenXIntrinsics.dir/build.make:162: lib/libLLVMGenXIntrinsics.so.12git] Error 1
make[2]: *** [CMakeFiles/Makefile2:18525: _deps/vc-intrinsics-build/GenXIntrinsics/lib/GenXIntrinsics/CMakeFiles/LLVMGenXIntrinsics.dir/all] Error 2

@AlexeySachkov
Copy link
Contributor

Hi @zjin-lcf, the same error was reported in #3142.

I think as a short-term workaround you can revert #3127 locally

@DenisBakhvalov
Copy link
Contributor

DenisBakhvalov commented Feb 2, 2021

@asidoren-intel , can you please take a look?
Note, the build fails in the shared libs configuration. To reproduce add --shared-libs to the configure.py script.

DenisBakhvalov added a commit to DenisBakhvalov/vc-intrinsics that referenced this issue Feb 2, 2021
@DenisBakhvalov
Copy link
Contributor

I checked that the simple change in vc-intrinsics repo resolves the issue, but I leave the decision on the final fix for @asidoren-intel :

$ git diff
diff --git a/GenXIntrinsics/lib/GenXIntrinsics/CMakeLists.txt b/GenXIntrinsics/lib/GenXIntrinsics/CMakeLists.txt
index 8bc3c52..33de403 100755
--- a/GenXIntrinsics/lib/GenXIntrinsics/CMakeLists.txt
+++ b/GenXIntrinsics/lib/GenXIntrinsics/CMakeLists.txt
@@ -2,6 +2,7 @@ set(LLVM_COMPONENTS
   CodeGen
   Support
   Core
+  Analysis
   )
 
 if(BUILD_EXTERNAL)

I submitted a PR with the fix here: intel/vc-intrinsics#49

asi-sc pushed a commit to intel/vc-intrinsics that referenced this issue Feb 3, 2021
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

Successfully merging a pull request may close this issue.

4 participants