我尝试在 Mac 上跟随 RayWenderlich 的 Perfect 截屏视频。在 Perfect Asistant(第 2 次截屏视频)中,他展示了使用 Perfect Assistant,我们只需单击 Build Linux,它就会在 Linux 上构建,因为我们已经安装了 Docker。
在我的情况下,它开始编译然后失败,错误是当前模块缓存路径和编译 PCH 的模块缓存路径不一样。我不知道如何仅为 Linux 更新模块缓存路径。
以下是控制台输出:
启动 /Users/hange/Developer/RayWenderlich/Practices/ServerSide_Perfect/hello-perfect-assistant 的 Linux 构建
使用 image perfectassistant/helloperfectassistant
使用 image perfectassistant/helloperfectassistant
编译 COpenSSL openssl.c
编译 LinuxBridge LinuxBridge.c
错误:PCH 是用模块缓存编译的路径 '/perfectbuild/.build_lin/debug/ModuleCache/5QE1M5WG4ATI',但路径当前是 '/perfectbuild/.build/debug/ModuleCache/5QE1M5WG4ATI'
生成 1 个错误。
失败:systemError(1, ":0: error: build has 1 command failures\nswift-build: error: exit(1): /swift-3.1.1-RELEASE-ubuntu16.04/usr/bin/swift-build-工具 -f /perfectbuild/.build/debug.yaml\n")