[Scons-users] Testing ninja build generator

Julien Pommier pommier at pianoteq.com
Fri Jun 6 04:44:17 EDT 2025


Hi,

I’m trying the ninja build generator (on macOS, with SCons 4.9.1), and have run so far into two small issues:

- ninja build commands seem to be incorrectly generated for this type of SCons command, with two chained sub-commands:

    target = env.Command("run.sh", “run.sh.txt", [ Copy("$TARGET", "$SOURCE"), Chmod("$TARGET", 0o755) ])

- it looks like the http communication part between ninja and scons does not like whitespaces in target filenames, for example this command will fail:

   target = env.Textfile("run me.sh", “foobar");

  the error is:

File "/opt/homebrew/Cellar/python at 3.12/3.12.9/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1283, in _validate_path
raise InvalidURL(f"URL can't contain control characters. {url!r} "
http.client.InvalidURL: URL can't contain control characters. '/?build=run me.sh' (found at least ' ')
ninja: build stopped: subcommand failed.scons: *** [build.ninja] CalledProcessError : Command 'ninja' returned non-zero exit status 1.


Irrelevant to this bug report: I’ve been using scons for maybe 20 years, and I’m still very happy with my initial choice of using SCons. It is powerful, it is reliable, its cache is great. Thanks for this wonderful piece of software.

Best regards,
Julien

 



More information about the Scons-users mailing list