Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Compilation error from the "getting started" instructions? #138

Closed
mvermeulen opened this issue Sep 16, 2019 · 1 comment
Closed

Compilation error from the "getting started" instructions? #138

mvermeulen opened this issue Sep 16, 2019 · 1 comment

Comments

@mvermeulen
Copy link

mvermeulen commented Sep 16, 2019

I see the following compilation error when I follow these getting started instructions on Ubuntu 16.04 modified to use "Unix Makefiles" since ninja-build wasn't new enough

git clone https://github.com/llvm/llvm-project.git
git clone https://github.com/tensorflow/mlir llvm-project/llvm/projects/mlir
mkdir llvm-project/build
cd llvm-project/build
cmake -G "Unix Makefiles" ../llvm -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="host"
cmake --build . --target check-mlir

Here is the compilation error

In file included from /media/mev/EXTRA/mlir/llvm-project/llvm/projects/mlir/lib/Analysis/LoopAnalysis.cpp:28:0:
/media/mev/EXTRA/mlir/llvm-project/llvm/projects/mlir/include/mlir/Dialect/VectorOps/VectorOps.h:207:50: fatal error: mlir/Dialect/VectorOps/VectorOps.h.inc: No such file or directory
compilation terminated.
projects/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/build.make:134: recipe for target 'projects/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/LoopAnalysis.cpp.o' failed
make[2]: *** [projects/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/LoopAnalysis.cpp.o] Error 1
CMakeFiles/Makefile2:10953: recipe for target 'projects/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/all' failed
make[1]: *** [projects/mlir/lib/Analysis/CMakeFiles/MLIRAnalysis.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

I notice there was a change 7794305 to move Linalg and VectorOps dialects to Dialect subdir.

So I tried checking out MLIR sources from the commit just before that one (f9d4405) and then my build and "check-mlir" succeeds.

Is there something I am missing? @nicolasvasilache

@joker-eph
Copy link
Contributor

I suspect there is a missing dependency which makes it pass depending on "luck" if the target is already built or not. I suspect that if you re-rerun cmake --build . --target check-mlir after the original failures it'll end-up passing.

(If you click the green check mark next to each commit you can see our CI results: https://github.com/tensorflow/mlir/commits/master )

swift-ci pushed a commit to apple/llvm-project that referenced this issue Dec 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants