Skip to content

Fix CGO gcc exec failure by adding bash-binsh to base image#91

Merged
JAORMX merged 1 commit intomainfrom
fix/add-bash-binsh-for-cgo
Mar 25, 2026
Merged

Fix CGO gcc exec failure by adding bash-binsh to base image#91
JAORMX merged 1 commit intomainfrom
fix/add-bash-binsh-for-cgo

Conversation

@JAORMX
Copy link
Copy Markdown
Contributor

@JAORMX JAORMX commented Mar 25, 2026

Wolfi's gcc package installs a shell wrapper (gcc-wrapper) at
/usr/local/bin/gcc with a #!/bin/sh shebang. The busybox trigger
that normally provides /usr/bin/sh doesn't always fire reliably
in Docker builds, leaving /bin/sh missing. This causes CGO to
fail with a misleading "fork/exec /usr/local/bin/gcc: no such
file or directory" — the kernel returns ENOENT for the missing
interpreter, not the gcc binary itself.

Add bash-binsh, the official Wolfi subpackage that provides
/usr/bin/sh -> /usr/bin/bash with proper APK dependency tracking
and provider-priority 60.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Wolfi's gcc package installs a shell wrapper (gcc-wrapper) at
/usr/local/bin/gcc with a #!/bin/sh shebang. The busybox trigger
that normally provides /usr/bin/sh doesn't always fire reliably
in Docker builds, leaving /bin/sh missing. This causes CGO to
fail with a misleading "fork/exec /usr/local/bin/gcc: no such
file or directory" — the kernel returns ENOENT for the missing
interpreter, not the gcc binary itself.

Add bash-binsh, the official Wolfi subpackage that provides
/usr/bin/sh -> /usr/bin/bash with proper APK dependency tracking
and provider-priority 60.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JAORMX JAORMX merged commit 1b8ce08 into main Mar 25, 2026
8 checks passed
@JAORMX JAORMX deleted the fix/add-bash-binsh-for-cgo branch March 25, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant