michaelforney / samurai

ninja-compatible build tool written in C
Other
824 stars 46 forks source link

when used as drop in replacement for ninja via symlink it fails to build Mesa #72

Closed mkaracsony81 closed 3 years ago

mkaracsony81 commented 3 years ago

Tested this with Mesa version 20.3.5. The build stops complaining about some missing header file which was supposed to be generated and ready to use at that point. Tried this multiple times, and it stops at the same part of the compilation, looking for the same file. /usr/bin/ninja is a symlink which points to /usr/bin/samu on my system. After installing ninja however, I was able to build that version of Mesa without such problems. The problem must be some obscure ninja command line option not yet implemented perhaps?

michaelforney commented 3 years ago

Can you provide the failing build log?

A compile error about a missing header is almost certainly a missing dependency in the meson.build files. The usual problem is that the header is generated, but there is no dependency on that header from a compile action that requires it. As mentioned in the README, samurai doesn't execute the build graph in the same order as ninja, which sometimes exposes these bugs (it could be hit with ninja as well depending on the number of parallel jobs and how long they take).

michaelforney commented 3 years ago

Is the missing header git_sha1.h? I fixed this in https://gitlab.freedesktop.org/mesa/mesa/-/commit/434da21a7c81acbe03f0e1621e80904313c0b05c, but it looks like it didn't make it into the 20 branch. You'll have to apply that patch or update to mesa 21.

mkaracsony81 commented 3 years ago

Yes it was, sorry for the delay:

[594/2492] Compiling C object 'src/intel/common/985c144@@intel_common@sta/gen_urb_config.c.o'. ../src/intel/common/gen_uuid.c:25:10: fatal error: git_sha1.h: No such file or directory 25 | #include "git_sha1.h" | ^~~~ compilation terminated.

Thank you for the patch. Closing this issue.