完成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")
^-------------------------------
如何消除此错误?