英文:
Linux setup issue with starboard for Cobalt
问题
I recently stumbled upon Cobalt while I was looking to port my web application to Android. I followed these steps on my Linux system. I was able to complete the 'Set up your workstation' and 'Set up Developer Tools' sections.
While building, on the following line
~/cobalt$ python3 cobalt/build/gn.py -p linux-x64x11
I get the following error messages
:~/cobalt2$ python3 cobalt/build/gn.py -p linux-x64x11
gn --script-executable=/home/vermaayu/.virtualenvs/cobalt_dev/bin/python3 gen out/linux-x64x11_devel
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: /home/vermaayu/cobalt2/out/linux-x64x11_devel/
Command: /home/vermaayu/.virtualenvs/cobalt_dev/bin/python3 /home/vermaayu/cobalt2/starboard/tools/app_launcher_packager.py -l
Returned 1.
stderr:
Traceback (most recent call last):
File "/home/vermaayu/cobalt2/starboard/tools/app_launcher_packager.py", line 30, in <module>
from starboard.tools import command_line
ModuleNotFoundError: No module named 'starboard.tools'
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 "/home/vermaayu/cobalt2/cobalt/build/gn.py", line 99, in <module>
main(builds_out_directory, known_args.platform, known_args.build_type,
File "/home/vermaayu/cobalt2/cobalt/build/gn.py", line 51, in main
subprocess.check_call(gn_command)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gn', '--script-executable=/home/vermaayu/.virtualenvs/cobalt_dev/bin/python3', 'gen', 'out/linux-x64x11_devel']' returned non-zero exit status 1.
This and this, I found to be different issues than mine.
I have installed GN. I am not big on GN or GYP and limited knowledge on Python.
I have tried 2 different LTS builds from Github. Looked for similar issues with starboard but didn't find much.
Any help would be appreciated. Thanks.
英文:
I recently stumbled on to cobalt while I was looking to port my web application to android. I followed these steps on my Linux system. I was able to complete the 'Set up your workstation' and 'Set up Developer Tools' sections.
While building, on the following line
~/cobalt$ python3 cobalt/build/gn.py -p linux-x64x11
I get the following error messages
:~/cobalt2$ python3 cobalt/build/gn.py -p linux-x64x11
gn --script-executable=/home/vermaayu/.virtualenvs/cobalt_dev/bin/python3 gen out/linux-x64x11_devel
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: /home/vermaayu/cobalt2/out/linux-x64x11_devel/
Command: /home/vermaayu/.virtualenvs/cobalt_dev/bin/python3 /home/vermaayu/cobalt2/starboard/tools/app_launcher_packager.py -l
Returned 1.
stderr:
Traceback (most recent call last):
File "/home/vermaayu/cobalt2/starboard/tools/app_launcher_packager.py", line 30, in <module>
from starboard.tools import command_line
ModuleNotFoundError: No module named 'starboard.tools'
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 "/home/vermaayu/cobalt2/cobalt/build/gn.py", line 99, in <module>
main(builds_out_directory, known_args.platform, known_args.build_type,
File "/home/vermaayu/cobalt2/cobalt/build/gn.py", line 51, in main
subprocess.check_call(gn_command)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gn', '--script-executable=/home/vermaayu/.virtualenvs/cobalt_dev/bin/python3', 'gen', 'out/linux-x64x11_devel']' returned non-zero exit status 1.
This and this, I found to be different issues than mine.
I have installed GN. I am not big on GN or GYP and limited knowledge on python.
I have tried 2 different LTS builds from Github. Looked for similar issues with starboard but didn't find much.
Any help would be appreciated. Thanks.
答案1
得分: 0
问题出在由GN调用的Python脚本未能在当前目录中找到所需的代码模块(starboard)。
export PYTHONPATH=$PWD
应该解决此问题。
这也在你提供的说明的第6步中提到过。
英文:
The issue you are running into is with Python script that is invoked by GN is not finding the code modules it needs ( starboard ) from the current directory.
export PYTHONPATH=$PWD
should solve this.
It's also mentioned in step 6) of the instructions you linked to.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论