Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ninja rootless patch incomplete #1428

Open
L1ghtmann opened this issue Jan 12, 2024 · 0 comments
Open

ninja rootless patch incomplete #1428

L1ghtmann opened this issue Jan 12, 2024 · 0 comments

Comments

@L1ghtmann
Copy link
Contributor

When attempting to use ninja on a build.ninja file, I am getting no such file or directory errors.

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

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

It appears this error is actually slightly misleading, as explained in ninja-build/ninja#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant