Nix expression for opencilk

Hey! I’m trying to build opencilk, a fork of LLVM with extensions for parallel programming, with Nix.

If you clone my repo and run nix-build on it, perhaps, you’ll see what I see now: Cmake seems to start fine but then it fails in make at around 9%. Here is a tail of my terminal output:

...
[  7%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86ModRMFilters.cpp.o
[  9%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o
[  9%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/WebAssemblyDisassemblerEmitter.cpp.o
[  9%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/CTagsEmitter.cpp.o
[  9%] Built target obj.llvm-tblgen
[  9%] Built target RTAsan_dynamic.x86_64
[  9%] Built target RTAsan.x86_64
make: *** [Makefile:156: all] Error 2
error: boost::bad_format_string: format-string is ill-formed

the last line is particularly weird: judging by this thread, it’s a Nix issue with printing errors? I’m not sure how to debug my actual issue any further withought seeing what went wrong…

For completeness, here’s the full build log.

Yeah, maybe a nix error. But also maybe not? Is there any indication of a line number at all? I mean, what about [Makefile:156: all]? Did you look there?

1 Like

@mightyiam I’m not sure how to access that Makefile because it’s generated by cmake during the build phase. I also don’t see which of the many subprojects fails, so I don’t even know where the said Makefile lives…

@mightyiam I posted the full build log for completeness: https://julia.prl.fit.cvut.cz/~artem/opencilk-2.1.drv.log.txt

K900 on the Matrix channel helped me to grep through the log (obtained by nix log <opencilk derivation>) and it seems the real error is:

/build/opencilk/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:180:10: fatal error: crypt.h: No such file or directory
  180 | #include <crypt.h>
      |          ^~~~~~~~~
compilation terminated.

Glad you made progress.

1 Like