Perfect Asistant: Build Linux failed due to module cache path on linux vs macOS

223 views Asked by At

I tried to follow along the Perfect screencast from RayWenderlich on a Mac. On Perfect Asistant (2nd screencast), he showed using Perfect Assistant, we could just click on the Build Linux and it will build on Linux given we have installed the Docker.

In my case it started to compile then it failed with error that current module cache path and the module cache path the PCH was compiled was not the same. I don't know how to update the module cache path just for Linux.

Here are the console output:

Starting Linux build of /Users/hange/Developer/RayWenderlich/Practices/ServerSide_Perfect/hello-perfect-assistant
Using image perfectassistant/helloperfectassistant
Using image perfectassistant/helloperfectassistant
Compile COpenSSL openssl.c
Compile LinuxBridge LinuxBridge.c
error: PCH was compiled with module cache path '/perfectbuild/.build_lin/debug/ModuleCache/5QE1M5WG4ATI', but the path is currently '/perfectbuild/.build/debug/ModuleCache/5QE1M5WG4ATI'
1 error generated.
Failed: systemError(1, ":0: error: build had 1 command failures\nswift-build: error: exit(1): /swift-3.1.1-RELEASE-ubuntu16.04/usr/bin/swift-build-tool -f /perfectbuild/.build/debug.yaml\n")

1

There are 1 answers

1
PerfectlyRock On BEST ANSWER

In Perfect Assistant project editor window, press and hold button "Build" and choose "Clean Project", then try building it once more.

Alternatively, press and hold button "Open" then choose "Open Terminal", and run commands below:

$ rm -rf .build*
$ rm -rf *.pins
$ rm -rf *.resolved

Then try building.

If you still couldn't understand what was going on, try opening a terminal window and run scripts below:

$ cd "/Users/hange/Developer/RayWenderlich/Practices/ServerSide_Perfect/hello-perfect-assistant"
$ rm -rf .build*
$ rm -rf *.pins
$ rm -rf *.resolved

Which should perform the same task as the second solution.