Issue |
151247
|
Summary |
Failure to install libMLIR.so when LLVM_DYLIBs and TOOLCHAIN_ONLY are enabled
|
Labels |
new issue
|
Assignees |
|
Reporter |
PHHargrove
|
When I build using the commands below, the resulting installation is missing `libMLIR.so.[version]` and the ` libMLIR.so` symlink to it.
I am working with 21.1.0-rc2 at the moment.
However, I have reproduced the problem with 20.1.0 as well.
```
cmake src/llvm \
-DCMAKE_INSTALL_PREFIX=/opt/llvm \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_EXE_LINKER_FLAGS='-fuse-ld=gold' \
-DLLVM_ENABLE_PROJECTS="clang;flang;mlir;openmp" \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \
-DLLVM_TARGETS_TO_BUILD=host
make -j16 all
make -j16 install
```
The lack of libMLIR manifests as a failure running `flang-new`:
```
$ /opt/llvm/bin/flang-new --version
/opt/llvm/bin/flang-new: error while loading shared libraries: libMLIR.so.21.1-rc2: cannot open shared object file: No such file or directory
```
And can be verified directly:
```
$ find /opt/llvm -name libMLIR\*
[no output]
```
Manually copying `libMLIR.so.21.1-rc2` and `libMLIR.so` from the build directory to `/opt/llvm/lib/` is sufficient to get `flang-new` working.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs