michaelforney / samurai

ninja-compatible build tool written in C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alpine Linux - build of chromium unknown target '-w'

TBK opened this issue · comments

commented

Alpine has replaced ninja with samu (1.0 with these patches). Symlink /usr/bin/ninja -> samu

I am trying to build Chromium and unfortunately samu errors out on:

>>> chromium: Bootstrapping GN
ninja: unknown target '-w'
Traceback (most recent call last):
  File "tools/gn/bootstrap/bootstrap.py", line 137, in <module>
    sys.exit(main(sys.argv[1:]))
  File "tools/gn/bootstrap/bootstrap.py", line 123, in main
    ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err'])
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', '/home/builder/aports/community/chromium/src/chromium-80.0.3987.122/out/Release/gn_build', 'gn', '-w', 'dupbuild=err']' returned non-zero exit status 1

Related code: https://github.com/chromium/chromium/blob/80.0.3987.122/tools/gn/bootstrap/bootstrap.py#L123

You'll need sync chromium past this commit (or cherry-pick it):
https://chromium.googlesource.com/chromium/src/+/53b414cba10bc3c38fca88c330d2146722b4e54c%5E%21/

samurai follows the POSIX Utility Syntax Guidelines, so does not allow operands intermixed with options. I'll add this to the README.

commented

Thanks for the quick reply and solution 👍