BitNet icon indicating copy to clipboard operation
BitNet copied to clipboard

Install/build process should check and assert the requirements (e.g. clang compiler versions)

Open bmerkle opened this issue 1 year ago • 6 comments

The readme states some requirements about python, cmake and clang version.

Currently the install/build process does not check if the clang version requirement is satisfied and ubuntu e.g. come with a clang version 14. This can also cause problems, e.g see bug report https://github.com/microsoft/BitNet/issues/30

It would be cool if the install/build process checks the requirements and stops the build process with an error it the version is not satisfied.

bmerkle avatar Oct 19 '24 19:10 bmerkle

Header file seems to be missing in the repo. Getting the following error on clang: Cannot find source file: ../../../../include/bitnet-lut-kernels.h

algorise avatar Oct 21 '24 07:10 algorise

@algorise It looks like you need to run setup_env.py at least one time. The header file is automatically generated after running the script with the instruction in README.md

edsonke avatar Oct 21 '24 08:10 edsonke

@algorise It looks like you need to run setup_env.py at least one time. The header file is automatically generated after running the script with the instruction in README.md

It is a best practice to not include generated files in versioncontrol so i think the behaviour is ok. Running setup once should generate all the necessary files and configuration

bmerkle avatar Oct 21 '24 11:10 bmerkle

In my case, the bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" installed clang-18, but didn't replace the clang-14 on my rpi5 debian.

I checked both versions were on /usr/bin, then I uninstalled clang and symlinked the all clang*18 to clang (without -18)

I wrote about the process to make it work: https://www.eddieoz.com/building-bitnet-on-raspberry-pi-5-arm64-2/

eddieoz avatar Oct 23 '24 10:10 eddieoz

instead of ln -s manually I would use: update-alternatives

sudo update-alternatives --config clang

bmerkle avatar Oct 23 '24 12:10 bmerkle

sudo update-alternatives --config clang

Thank you! I updated my post :)

eddieoz avatar Oct 24 '24 18:10 eddieoz