Linux设置与Cobalt的星板问题。

huangapple go评论63阅读模式
英文:

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, [ &quot;-l&quot; ], &quot;trim string&quot;)
              ^----------
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 &quot;/home/vermaayu/cobalt2/starboard/tools/app_launcher_packager.py&quot;, line 30, in &lt;module&gt;
    from starboard.tools import command_line
ModuleNotFoundError: No module named &#39;starboard.tools&#39;

See //starboard/BUILD.gn:72:5: which caused the file to be included.
    &quot;//starboard/tools:build_app_launcher_zip&quot;,
    ^-----------------------------------------
Traceback (most recent call last):
  File &quot;/home/vermaayu/cobalt2/cobalt/build/gn.py&quot;, line 99, in &lt;module&gt;
    main(builds_out_directory, known_args.platform, known_args.build_type,
  File &quot;/home/vermaayu/cobalt2/cobalt/build/gn.py&quot;, line 51, in main
    subprocess.check_call(gn_command)
  File &quot;/usr/lib/python3.10/subprocess.py&quot;, line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command &#39;[&#39;gn&#39;, &#39;--script-executable=/home/vermaayu/.virtualenvs/cobalt_dev/bin/python3&#39;, &#39;gen&#39;, &#39;out/linux-x64x11_devel&#39;]&#39; 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.

huangapple
  • 本文由 发表于 2023年6月13日 15:20:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76462530.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定