Failures during Chromium build on Ubuntu

2019-07-19 17:56发布

问题:

I am trying to build unmodified Chromium following official instructions, but i am getting the following error, I tried reinstalling Ubuntu 8, 12 but no difference:

[10/6591] ACTION Creating jsr_305_javalib jar

FAILED: cd ../../third_party/jsr-305; python ../../build/android/jar.py "--classes-dir=../../out/Release/gen/jsr_305_javalib/classes" "--jar-path=../../out/Release/lib.java/jsr_305_javalib.jar" "--excluded-classes=\"*/R.class\" \"*/R##*.class\"" "--ignore=035ff3d8153c7ebb3e17803d6ec654de  -"

Traceback (most recent call last):
  File "../../build/android/jar.py", line 53, in <module>
    sys.exit(main(sys.argv))
  File "../../build/android/jar.py", line 46, in main
    DoJar(options)
  File "../../build/android/jar.py", line 30, in DoJar
    subprocess.check_call(jar_cmd, cwd=jar_cwd)
  File "/usr/lib/python2.7/subprocess.py", line 506, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

回答1:

I'd stopped at same error. Finally, I found my stupid mistake that I forgot to add PATH of jar command. The following command is needed in addition to the java set up guide in Chromium official build instructions.

sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_xx/bin/jar 50000


回答2:

You must install the depot_tools package. Try this commands;

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/path/to/depot_tools