Skip to content

Commit

Permalink
Document why Alpine image can't be used for building to Go code
Browse files Browse the repository at this point in the history
  • Loading branch information
bgandon committed May 11, 2024
1 parent 3ef88af commit d7c22b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci/release_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Improvements

- Document why Alpine image can't be used for building to Go code
14 changes: 14 additions & 0 deletions ci/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,20 @@ resources:
source:
repository: golang
semver_constraint: "< 1970" # Avoid YYYYMMDD tags like '20231219'
# NOTICE:
#
# TL;DR: No Alpine for building Golang code with CGO_ENABLED=1
#
# We can't use 'variant: alpine' here, because the 'go test -race' we
# use in Makefile requires CGO_ENABLED=1, which requires a C compiler,
# and a libc that implements the non-POSIX pread64() and pwrite64()
# functions. Only GNU libc ships with these. The musl libc from Alpine
# doesn't.
#
# The only solution is to revert back using a Debian image with proper
# GCC and GNU libc.
#
# See also: <https://stackoverflow.com/a/78096319/12178803>

- name: alpine-latest
type: registry-image
Expand Down

0 comments on commit d7c22b0

Please sign in to comment.