← Back to issue list

Snapcraft ignores SNAPCRAFT_BUILD_ENVIRONMENT_* environment variables on MacOS

View original Github issue

Metadata

Project
snapcraft
Number
#6025
Type
issue
State
open
Author
pachulo
Labels
Status: Triaged Type: Enhancement
Created
2026-02-10 01:58:38+00:00
Updated
2026-02-12 20:53:48+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description I'm trying to build the nextcloud snap on my MacBook and setting the following env variables: ``` export SNAPCRAFT_BUILD_ENVIRONMENT_CPU=3 export SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=8G ``` As documented [here](https://github.com/canonical/snapcraft/blob/main/docs/how-to/set-up-snapcraft.rst#install-multipass), but snapcraft keeps on creating a machine with just 2 CPUs and 2G or RAM, so the build fails. How can I make it create a bigger VM? Should the documentation be updated? ### Steps to reproduce 1. Install both multipass & snapcraft using brew: `brew install multipass snapcraft` 2. Update the PATH variable, so that the multipass CLI is available: `export PATH="/usr/local/bin:$PATH"` 3. Update the env variables: `export SNAPCRAFT_BUILD_ENVIRONMENT_CPU=4 && export SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=12G` 4. Build the snap: `snapcraft pack` ### Environment This is on a MacBook Pro with an Apple M2 Pro chip, on macOS Tahoe 26.2. ### Log output ```shell 2026-02-10 03:12:57.242 Starting snapcraft, version 8.13.2 2026-02-10 03:12:57.242 Log verbosity level set to BRIEF 2026-02-10 03:12:57.242 Setting up Project 2026-02-10 03:12:57.242 Project file found at '/Users/marc/Software/github.com/pachulo/nextcloud-snap/snap/snapcraft.yaml' 2026-02-10 03:12:57.242 Loading project file 'snap/snapcraft.yaml 2026-02-10 03:12:57.259 Preparing application... 2026-02-10 03:12:57.260 Setting up ConfigService 2026-02-10 03:12:57.260 App is not running as a snap - snap config handler not created. 2026-02-10 03:12:57.260 Falling back from craft-application to snapcraft. 2026-02-10 03:12:57.260 lifecycle command: 'pack', arguments: Namespace(destructive_mode=False, use_lxd=False, debug=True, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for=None, http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_plugins=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None) 2026-02-10 03:12:57.260 command: pack, arguments: Namespace(destructive_mode=False, use_lxd=False, debug=True, enable_manifest=False, manifest_image_information=None, bind_ssh=False, build_for=None, http_proxy=None, https_proxy=None, ua_token=None, enable_experimental_ua_services=False, enable_experimental_plugins=False, enable_experimental_extensions=False, enable_developer_debug=False, enable_experimental_target_arch=False, target_arch=None, provider=None, directory=None, output=None) 2026-02-10 03:12:57.286 CPU count (from multiprocessing): 10 2026-02-10 03:12:57.286 Invalid SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT '' 2026-02-10 03:12:57.286 Running on arm64 for arm64 2026-02-10 03:12:57.288 Checking if 'version' exists. 2026-02-10 03:12:57.288 Getting value for 'version'. 2026-02-10 03:12:57.288 Got 'git' (updated=False) for 'version'. 2026-02-10 03:12:57.288 'version' exists. 2026-02-10 03:12:57.288 Getting value for 'version'. 2026-02-10 03:12:57.288 Got 'git' (updated=False) for 'version'. 2026-02-10 03:12:57.288 Checking if 'grade' exists. 2026-02-10 03:12:57.288 Getting value for 'grade'. 2026-02-10 03:12:57.288 Got 'stable' (updated=False) for 'grade'. 2026-02-10 03:12:57.288 'grade' exists. 2026-02-10 03:12:57.288 Getting value for 'grade'. 2026-02-10 03:12:57.288 Got 'stable' (updated=False) for 'grade'. 2026-02-10 03:12:57.292 Checking build provider availability 2026-02-10 03:12:57.292 Not loading snap config because snapcraft is not running as a snap. 2026-02-10 03:12:57.292 Using default provider 'multipass' on non-linux system. 2026-02-10 03:12:57.292 Executing on host: multipass version 2026-02-10 03:12:57.322 Using snapcraft from snap store channel 'latest/stable' in instance because snap injection is only supported on Linux hosts. 2026-02-10 03:12:57.323 Using hostname 'snapcraft-nextcloud-on-arm64-for-arm64-1298853' 2026-02-10 03:12:57.323 Launching instance... 2026-02-10 03:12:57.323 Converted name 'snapcraft-nextcloud-on-arm64-for-arm64-1298853' to instance name 'snapcraft-nextcloud-on-arm64-for-arm64-1298853' 2026-02-10 03:12:57.323 Executing on host: multipass list --format json 2026-02-10 03:12:57.355 Executing on host: multipass launch snapcraft:22.04 --name snapcraft-nextcloud-on-arm64-for-arm64-1298853 --cpus 2 --memory 2G --disk 64G ```

Evaluation history

No evaluation history available.