Open L1ghtmann opened 10 months ago
When attempting to use ninja on a build.ninja file, I am getting no such file or directory errors.
ninja
build.ninja
Relevant test setup:
test |-- build.ninja `-- main.cpp
build.ninja:
# Variable declarations cxx = /var/jb/usr/bin/clang++ src = main.cpp out = main # Build rule rule cxx_compile command = $cxx -c $in -o $out # Build edge build $out.o: cxx_compile $src # Link rule rule cxx_link command = $cxx $in -o $out # Link edge build $out: cxx_link $out.o
Note: cxx = clang++ does not affect the end result
cxx = clang++
main.cpp:
#include<iostream> int main(){ std::cout << "Hello world!"; return 0; }
Error: [0/2] /var/jb/usr/bin/clang++ -c main.cpp -o main.oninja: fatal: posix_spawn: No such file or directory
[0/2] /var/jb/usr/bin/clang++ -c main.cpp -o main.oninja: fatal: posix_spawn: No such file or directory
It appears this error is actually slightly misleading, as explained in https://github.com/ninja-build/ninja/issues/1750. In this case, the issue likely spawns (ha) from https://github.com/ninja-build/ninja/blob/master/src/subprocess-posix.cc. Possibly a missing prefix error? Don't believe /dev/null is the issue, as it was in the linked issue.
/dev/null
Setup: iP7 15.8 Rootless
When attempting to use
ninja
on abuild.ninja
file, I am getting no such file or directory errors.Relevant test setup:
build.ninja:
Note:
cxx = clang++
does not affect the end resultmain.cpp:
Error:
[0/2] /var/jb/usr/bin/clang++ -c main.cpp -o main.oninja: fatal: posix_spawn: No such file or directory
It appears this error is actually slightly misleading, as explained in https://github.com/ninja-build/ninja/issues/1750. In this case, the issue likely spawns (ha) from https://github.com/ninja-build/ninja/blob/master/src/subprocess-posix.cc. Possibly a missing prefix error? Don't believe
/dev/null
is the issue, as it was in the linked issue.Setup: iP7 15.8 Rootless