[llvm-dev] Build Error from mlir-capi-ir-test

Vermeersch, Aaron via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 12 11:52:03 PST 2021


Hello,

I'm having an issue installing LLVM and Flang on a SGI and Cray machine and both are giving me the same error. This is using the latest version from GitHub that I just downloaded. I use the following for the cmake instruction:


cmake -G "Unix Makefiles" -DLLVM_ENABLE_PROJECTS=flang -DCMAKE_INSTALL_PREFIX=install_prefix -DCMAKE_CXX_COMPILER=pathway_to_g++ -DCMAKE_C_COMPILER=pathway_to_gcc ../llvm

The installation crashes with the following message:


Scanning dependencies of target mlir-capi-ir-test

[ 78%] Building C object tools/mlir/test/CAPI/CMakeFiles/mlir-capi-ir-test.dir/ir.c.o

[ 78%] Linking C executable ../../../../bin/mlir-capi-ir-test

CMakeFiles/mlir-capi-ir-test.dir/ir.c.o: In function `printAffineExpr':

/llvm-project/mlir/test/CAPI/ir.c:1272: undefined reference to `mlirAffineExprIsNull'

collect2: error: ld returned 1 exit status

make[2]: *** [bin/mlir-capi-ir-test] Error 1

make[1]: *** [tools/mlir/test/CAPI/CMakeFiles/mlir-capi-ir-test.dir/all] Error 2

make: *** [all] Error 2

In a previous build, I was able to use:


cmake --build . --target check-mlir

Following the instructions here: https://github.com/tensorflow/mlir/issues/138 to fix a similar issue but it hasn't been successful this time. Does anyone know what might be happening and how to fix the issue?


​Aaron Vermeersch

HPC Computational Scientist



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210112/a2ed1684/attachment-0001.html>


More information about the llvm-dev mailing list