完成https://fuchsia.googlesource.com/fuchsia/+/master/docs/getting_started.md
中提到的安装步骤后我使用了fx set x64
命令,该命令在build / gn / preprocess_products.py文件中产生了错误。
错误消息如下所示-
(base) xprilion@xl:~/fuchsia$ fx set x64
+ /home/xprilion/fuchsia/scripts/build-zircon.sh -v -g -t x64
+ /home/xprilion/fuchsia/zircon/prebuilt/downloads/gn gen /home/xprilion/fuchsia/out/build-zircon --root=/home/xprilion/fuchsia/zircon
Done. Made 12304 targets from 900 files in 3216ms
+ /home/xprilion/fuchsia/buildtools/gn gen /home/xprilion/fuchsia/out/x64 --check '--args=target_cpu="x64" import("//boards/x64.gni") import("//products/core.gni") if (!defined(available)) { available = [] } available+=[] if (!defined(preinstall)) { preinstall = [] } preinstall+=[] if (!defined(monolith)) { monolith = [] } monolith+=[]'
ERROR at //build/gn/packages.gni:71:26: Script returned non-zero exit code.
_preprocessed_products = exec_script("preprocess_products.py",
^----------
Current dir: /home/xprilion/fuchsia/out/x64/
Command: /usr/bin/env /home/xprilion/fuchsia/build/gn/preprocess_products.py --monolith=["garnet/packages/products/base", "garnet/packages/prod/drivers"] --preinstall=[] --available=["garnet/packages/prod/vboot_reference", "bundles/tools"]
Returned 1.
stderr:
Traceback (most recent call last):
File "/home/xprilion/fuchsia/build/gn/preprocess_products.py", line 11, in <module>
from prepreprocess_build_packages import PackageImportsResolver, PackageLabelObserver
File "/home/xprilion/fuchsia/build/gn/prepreprocess_build_packages.py", line 74
except IOError, e:
^
SyntaxError: invalid syntax
See //build/gn/BUILD.gn:7:1: whence it was imported.
import("//build/gn/packages.gni")
^-------------------------------
如何清除此错误?
答案 0 :(得分:1)
上述问题的答案很简单-目前在构建Fuchsia时不支持Python3.7 。我改用Python3.6,它起作用了! Python 2.7也可以正常工作。
答案 1 :(得分:0)
您在这里缺少产品信息。如果您不确定要选择哪种产品,请选择https://www.mainapp.com/token
作为至少包含提纯成分以及运行紫红色所需的最少服务的产品。
core