Cobalt 23.lts.1+ error

210 views
Skip to first unread message

kguru...@gmail.com

unread,
Jul 20, 2022, 3:48:56 AM7/20/22
to cobalt-dev
Hi, 

I've been following the following instructions to build cobalt 23
https://cobalt.foo/development/setup-linux.html

when i run the following command on my ubuntu i get the following error

Command: python cobalt/build/gn.py -c gold -p android-arm

out/android-arm_gold/args.gn already exists. Running ninja will regenerate build files automatically.
gn gen out/android-arm_gold
Build Accelerator: ccache
ERROR at //starboard/tools/BUILD.gn:18:15: Script returned non-zero exit code.
  file_list = exec_script(script, [ "-l" ], "trim string")
              ^----------
Current dir: ~/cobalt/out/android-arm_gold/
Command: python ~/cobalt/starboard/tools/app_launcher_packager.py -l
Returned 1.
stderr:Traceback (most recent call last):
  File "~/cobalt/starboard/tools/app_launcher_packager.py", line 30, in <module>
    from starboard.tools import command_line
ModuleNotFoundError: No module named 'starboard'


i assume the starboard is installed as part of pre requirements step in the instructions.

Anyone faced this issue ?

Thanks.

kguru...@gmail.com

unread,
Jul 20, 2022, 3:57:30 AM7/20/22
to cobalt-dev
complete error:


out/android-arm_gold/args.gn already exists. Running ninja will regenerate build files automatically.
gn gen out/android-arm_gold
Build Accelerator: ccache
ERROR at //starboard/tools/BUILD.gn:18:15: Script returned non-zero exit code.
  file_list = exec_script(script, [ "-l" ], "trim string")
              ^----------
Current dir:~/cobalt/out/android-arm_gold/
Command: python ~/cobalt/starboard/tools/app_launcher_packager.py -l
Returned 1.
stderr:

Traceback (most recent call last):
  File "~/cobalt/starboard/tools/app_launcher_packager.py", line 30, in <module>
    from starboard.tools import command_line
ModuleNotFoundError: No module named 'starboard'

See //starboard/BUILD.gn:72:5: which caused the file to be included.
    "//starboard/tools:build_app_launcher_zip",
    ^-----------------------------------------

Traceback (most recent call last):
  File "cobalt/build/gn.py", line 96, in <module>
    known_args.overwrite_args, unknown_args)
  File "cobalt/build/gn.py", line 47, in main
    subprocess.check_call(gn_command)
  File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gn', 'gen', 'out/android-arm_gold']' returned non-zero exit status 1.

Jake

unread,
Jul 20, 2022, 9:39:28 AM7/20/22
to cobalt-dev
You need to set the PYTHONPATH environment variable to point to the root of the cobalt repo. So say you cloned the repo to /somedir/cobalt, PYTHONPATH would be /somedir/cobalt.

kguru...@gmail.com

unread,
Jul 20, 2022, 12:49:01 PM7/20/22
to cobalt-dev
Yup. i see my PYTHONPATH has an extra character. I tried to correct it and restarted the terminal and did source on bashrc. Problem resolved.

Manoj A

unread,
Jan 9, 2024, 2:35:37 AM1/9/24
to cobalt-dev
Hi,

I follow instructions to build Cobalt 24, from this link,

https://cobalt.googlesource.com/cobalt.git/+/refs/heads/24.lts.stable/cobalt/site/docs/development/setup-linux.md

and stuck with this below error,

~/src$ python3 cobalt/cobalt/build/gn.py -c debug -p android-arm64

Traceback (most recent call last):
  File "cobalt/cobalt/build/gn.py", line 25, in <module>
    from starboard.build.platforms import PLATFORMS
ModuleNotFoundError: No module named 'starboard.build'

when i run the following command on my ubuntu i get the following error

Command: python cobalt/cobalt/build/gn.py -c gold -p android-arm64

After setting the pythonpath and also did source on bashrc. Still facing the same issue?

Garo Bournoutian

unread,
Jan 10, 2024, 4:06:30 AM1/10/24
to Manoj A, cobalt-dev
Based on the paths you mention, I think you are one directory up from where you want to be.

E.g. instead of running "python3 cobalt/cobalt/build/gn.py" from ~/src, you should be running "python3 cobalt/build/gn.py" from ~/src/cobalt

Additionally, then your PYTHONPATH should be set to ~/src/cobalt


You received this message because you are subscribed to the Google Groups "cobalt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobalt-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cobalt-dev/58ffd3c9-756d-4a36-bd86-5eb90d056eabn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages