[MacOS] error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Metadata
Current evaluation
Fixed by commit 1a8a3f46, which added the charm plugin's required build packages so pack no longer failed when x86_64-linux-gnu-gcc was unavailable.
Resolution: closed resolved
Reason: Commit 1a8a3f46 added the charm plugin build packages, eliminating the need for users to add build-essential through the reported workaround. This addressed the missing compiler-toolchain failure.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Hi Team,
running on macOS 12.2.1 (Intel CPU) the charmcraft 1.4.0 and multipass 1.8.1
```
charmcraft init
charmcraft pack
```
see the following errors
```
2022-03-10 15:54:04.722 :: 2022-03-10 15:53:45.348 :: Collecting PyYAML
2022-03-10 15:54:04.722 :: 2022-03-10 15:53:45.389 :: Downloading PyYAML-6.0.tar.gz (124 kB)
2022-03-10 15:54:04.722 :: 2022-03-10 15:53:45.657 :: Installing build dependencies: started
2022-03-10 15:54:04.722 :: 2022-03-10 15:54:03.286 :: Installing build dependencies: finished with status 'error'
2022-03-10 15:54:04.722 :: 2022-03-10 15:54:03.286 :: ERROR: Command errored out with exit status 1:
2022-03-10 15:54:04.722 :: 2022-03-10 15:54:03.286 :: command: /root/parts/charm/build/staging-venv/bin/python3 /root/parts/charm/build/staging-venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-nedyydq_/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Cython
...
2022-03-10 15:54:04.724 :: 2022-03-10 15:54:03.342 :: x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/root/parts/charm/build/staging-venv/include -I/usr/include/python3.8 -c /tmp/pip-install-q6ivu611/Cython/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-3.8/tmp/pip-install-q6ivu611/Cython/Cython/Plex/Scanners.o
2022-03-10 15:54:04.724 :: 2022-03-10 15:54:03.342 :: unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
2022-03-10 15:54:04.724 :: 2022-03-10 15:54:03.342 :: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
```
charmcraft 1.4.0 and multipass 1.8.1 was installed with homebrew help
```
brew install charmcraft multipass
```
### Workaround
install build-essential as build dependency, it is needed to add the following section into `charmcraft.yaml`
```
parts:
charm:
build-packages:
- build-essential
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by commit 1a8a3f46, which added the charm plugin's required build packages so pack no longer failed when x86_64-linux-gnu-gcc was unavailable. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #718, which corrected the Multipass image remote so the Linux build environment could compile Cython successfully (commit c929f310). | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #718, which corrected Charmcraft's Multipass image remote so the build VM provided the required compiler toolchain. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a documented code fix or resolving PR; adding build-essential to charmcraft.yaml remained the reported workaround. | |
| stealth/space-bunny-alpha | — | closed stale | Reported macOS Multipass packing failed because build-essential was absent; closed without a recorded fix after a maintainer offered to investigate. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a linked fix after the reporter identified build-essential as a workaround. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a documented fix after the maintainer confirmed the macOS/Multipass failure and offered to take over; build-essential remained a user workaround. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a documented code fix; adding build-essential to charmcraft.yaml was the workaround for the missing x86_64-linux-gnu-gcc compiler. | |
| stealth/space-bunny-alpha | — | closed stale | Charmcraft 1.4.0 on macOS failed compiling Cython because x86_64-linux-gnu-gcc was missing. Closed without a documented fix; adding build-essential was the workaround. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Build failed on macOS and Ubuntu due to missing x86_64-linux-gnu-gcc during charmcraft pack. A workaround adding build-essential to charmcraft.yaml was provided. The issue was closed after a maintainer confirmed the bug and implemented a fix. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after a maintainer confirmed the issue and volunteered to fix it. The author provided a workaround adding build-essential to charmcraft.yaml to resolve the missing compiler error. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed after maintainer acknowledged the issue. Resolved via a provided workaround: adding build-essential to charmcraft.yaml build-packages to fix the missing gcc error in multipass containers. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.