llvm-project
llvm-project copied to clipboard
mlir build failed with "library not found for -lMLIRExecutionEngine"
When I build mlir, specifically, toy-ch6. Reported the following error.
ld: library not found for -lMLIRExecutionEngine
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I find the missing lib?
@llvm/issue-subscribers-mlir
One thing to check is that you're building for the correct architecture. I hit this same issue when accidentally using -DLLVM_TARGETS_TO_BUILD="X86"
on an M1 Mac. Switching to -DLLVM_TARGETS_TO_BUILD="AArch64"
built cleanly. See this CMakeLists comment for why this happened in my case.
I hit this same issue when accidentally using -DLLVM_TARGETS_TO_BUILD="X86" on an M1 Mac. Switching to -DLLVM_TARGETS_TO_BUILD="AArch64" built cleanly.
That's exactly the mistake I've made. Thanks for your help!
This looks like something to catch with some nice error message at CMake configuration time instead of failing with a linker error later?