I’m attempting to build Zig from source by following the instruction on the repo’s wiki. Per the recommendation from one of my previous topics, I am using LLVM 19 built from source using more instructions from the wiki.
However, when I run make install
I get the following error:
$ make install
[ 5%] Building CXX object CMakeFiles/zigcpp.dir/src/zig_llvm.cpp.o
/home/theshinx317/Coding/zig/src/zig_llvm.cpp:753:68: error: static assertion failed
753 | static_assert((Triple::EnvironmentType)ZigLLVM_LastEnvironmentType == Triple::LastEnvironmentType, "");
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/theshinx317/Coding/zig/src/zig_llvm.cpp:753:68: note: the comparison reduces to ‘(42 == 45)’
make[2]: *** [CMakeFiles/zigcpp.dir/build.make:76: CMakeFiles/zigcpp.dir/src/zig_llvm.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: CMakeFiles/zigcpp.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I suspect the small difference between EnvironmentType
s are do to subtly different version of the LLVM’s git commits, but I’m not fluent enough in this domain to know for sure.
Any thoughts on what could be causing this error?
System details: