In snapcraft 2.43.1, the snapcraft command fails when executing cmake (or at least that is what the error message says). The same snapcraft.yaml builds fine directly on the host machine and the cmake command executes fine on both the host and in the docker instance. Something seems to be going wrong in how snapcraft is launching cmake and getting the result.
The error message is:
Failed to run 'cmake /home/dev/src/parts/libeigen/src -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=Release' for 'libeigen': Exited with code -11. Verify that the part is using the correct parameters and try again.
I created a wrapper around cmake that runs strace cmake, but this never seems to get executed, or at least the output file isn’t there.
On the other hand, when i strace snapcraft itself, I see the follow entry that does make it look like cmake was succesfully run:
31125 execve("/usr/bin/cmake", ["cmake", "/home/dev/src/parts/libeigen/src", "-DCMAKE_INSTALL_PREFIX=", "-DCMAKE_BUILD_TYPE=Release"], [/* 36 vars */]) = 0
This problem is readily duplicatable on all of our development machines and seems to be the result of a recent change in snapcraft. I haven’t yet examined the release notes / source of snapcraft to see what it is yet, and I would appreciate if anyone has some insight.
Here is a download of the entire strace file: