Skip to content
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

LLVM build fails with "No rule to make target 'NATIVE/bin/mlir-linalg-ods-yaml-gen'" #21

Open
Time0o opened this issue Oct 11, 2024 · 4 comments

Comments

@Time0o
Copy link
Member

Time0o commented Oct 11, 2024

NOTE: I have accidentally also opened this same issue using my work GitHub account, could someone with admin rights please delete that issue?

This seems like it might be an issue with llvm-project and not Cinnamon but I am unable to build the patched version of llvm with the build.sh script. It fails with:

gmake[2]: *** No rule to make target 'NATIVE/bin/mlir-linalg-ods-yaml-gen', needed by 'tools/mlir/include/mlir/Dialect/Linalg/IR/CMakeFiles/MLIRLinalgNamedStructuredOpsYamlIncGen'.  Stop.       
gmake[1]: *** [CMakeFiles/Makefile2:92185: tools/mlir/include/mlir/Dialect/Linalg/IR/CMakeFiles/MLIRLinalgNamedStructuredOpsYamlIncGen.dir/all] Error 2                                           
gmake[1]: *** Waiting for unfinished jobs....

I am getting this error both on Apple Silicon MacOS and x86 Ubuntu so I suspect it might be a systematic thing. I have recently been able to build LLVM/MLIR albeit from the latest release tag and with different CMake options.

@caelunshun
Copy link

I've encountered this issue too while trying to reproduce the paper results. @Time0o I'm curious if you found a solution?

@Thomas28M
Copy link

Thomas28M commented Feb 10, 2025

same here. I tried using the Linux version in the paper but still get the same error. Any updates on any way to fix this?

Update: After manually specifying in the build-ci.sh script to use ninja (-G Ninja) and removing gcc which was used by default instead of clank, I was able to fix this but unfortunately Cinnamon does not build

@oowekyala
Copy link
Collaborator

Hello, thanks for the report

Update: After manually specifying in the build-ci.sh script to use ninja (-G Ninja) and removing gcc which was used by default instead of clank, I was able to fix this

Thanks for sharing your solution. FWIW, you can write CMAKE_GENERATOR=Ninja in your .env file instead of patching the script. I updated the README with some recommended defaults for the .env.

but unfortunately Cinnamon does not build

Could you share what your problem is now? Maybe open a new ticket and I can help you with the setup.

@Thomas28M
Copy link

Thomas28M commented Feb 12, 2025

Excellent. The suggestion for the new .env file worked. I had to start from scratch just to confirm it works. However, I would suggest some additions to the markdown from my experience.

  1. add numpy and python3-venv as dependencies which I installed via pip3
  2. fatal error: killed signal terminated cc1plus occurred often during the build process of llvm which required me to restart multiple times due to the insane RAM requirement. (I dedicated 16 GB of RAM and a 8GB swap space in my wsl2 Ubuntu 22.04.05 LTS and still got this error)
  3. after looking at the github runner's output I would also add these in the README.md as dependencies apt-get install clang ninja-build mold libvulkan-dev
  4. I did use the new .env file suggested that only worked after I commented out LLVM_CMAKE_OPTIONS='LLVM_CCACHE_BUILD=ON which was giving an error that I file "LLVM_CCACHE_BUILD=ON" cannot be found. I unfortunately cannot reproduce it without uninstalling llvm which I'm not going to do. Installation took forever.

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

No branches or pull requests

4 participants