My computer:
snap 2.48.2 snapd 2.48.2 series 16 ubuntu 20.04 kernel 5.8.0-41-generic
Here is my yml:
name: someproject
version: '3.3.1.0'
base: core20
summary: "someproject: asdfasdf"
description: |
someproject asdfasdf.
grade: devel
confinement: strict
apps:
someprojectd:
daemon: forking
command: |
someprojectd-wrapper --detach --data-dir ${SNAP_COMMON} --config-file ${SNAP_USER_DATA}/etc/someprojectd.conf
plugs:
- network
- network-bind
someproject-wallet-rpc:
command: |
someproject-wallet-rpc --log-file ${SNAP_USER_DATA}
plugs:
- home
- network
- network-bind
someproject-wallet-cli:
command: |
someproject-wallet-cli --log-file ${SNAP_USER_DATA}
plugs:
- home
- network
parts:
cmake-build:
plugin: cmake
cmake-parameters:
- -DBDB_STATIC=1
- -DUPNP_STATIC=1
- -DBoost_USE_STATIC_LIBS=1
- -DBoost_USE_STATIC_RUNTIME=1
- -DARCH=default
source: .
build-packages:
- gcc
- pkg-config
- libunbound-dev
- libevent-dev
- libboost-all-dev
- libdb-dev
- libunwind-dev
- libminiupnpc-dev
- libldns-dev
- libexpat1-dev
- bison
- doxygen
- graphviz
stage-packages:
- libminiupnpc17
- libunbound8
- libunwind8
prime:
- bin
- usr/lib/
- -usr/lib/gcc
- -usr/share
dist-files:
plugin: dump
source: .
organize:
contrib/snap/someprojectd.conf: etc/someprojectd.conf
contrib/snap/someprojectd-wrapper: bin/someprojectd-wrapper
prime:
- etc
- bin
The error I receive is:
cmake /root/parts/cmake-build/src/ -G Unix Makefiles -DBDB_STATIC=1 -DUPNP_STATIC=1 -DBoost_USE_STATIC_LIBS=1 -DBoost_USE_STATIC_RUNTIME=1 -DARCH=default CMake Error: The current CMakeCache.txt directory /root/parts/cmake-build/src/CMakeCache.txt is different than the directory /home/chris/etnsnap where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt Failed to build 'cmake-build'.
Recommended resolution: Check the build logs and ensure the part's configuration and sources are correct.
I understand how to fix this issue within a local environment; other posts have been made about how to do that and I'm fine building locally. However, this seems like an issue with Snapcraft itself. It seems like the cmakecache.txt is first generated in the local environment and then everything else is done inside the vm causing the conflict. I never used to get this issue. Does anyone have any ideas? Thanks