Add Alpine (musl) build environment alongside Debian 13 and Rocky Linux 9
Mirrors the same pinned third-party library build sequence as debian13/ on Alpine 3.24, targeting musl libc, with the fixes needed to get the whole non-Meta stack building cleanly: - Adjusts the package install step for apk; builds makeself from a pinned source tag since it isn't packaged for stable Alpine releases; adds coreutils so GNU realpath (needed by liburing's configure script) is available in place of busybox's; drops sha256 checksum verification on curl-fetched archives. - CMake on 3.24 is 4.x, which removed compatibility with cmake_minimum_required() versions below 3.5. Adds -DCMAKE_POLICY_VERSION_MINIMUM=3.5 (CMake's own sanctioned workaround, not a source patch) to every cmake configure call so unmigrated CMakeLists.txt in our pinned dependencies still configure. - GCC on 3.24 is 15, which defaults to C23; C23 redefines an empty `()` in a function declaration to mean "no parameters" instead of the old K&R "unspecified parameters", which breaks a decades-old conftest in GMP 6.3.0's configure. Pins GMP's build to -std=gnu17 to restore the old semantics for that one dependency. - Switches the GitHub mirror from gh-proxy.com (which started rejecting some repos with a content-filter 403 in this environment) to the project's own reverse proxy at wangguofang.net/github.com/. Folly/Fizz/Wangle/mvfst/fbthrift/CacheLib are left commented out: their portability layer reaches for glibc-only macros/symbols in multiple places with no musl branch (off64_t/lseek64/pread64 in folly/portability/Unistd.h, __ELF_NATIVE_CLASS in folly/debugging/symbolizer/Elf.cpp, and likely more further in), and patching each one as it surfaces risks introducing subtle bugs in code we don't own. The reasoning is recorded inline for anyone revisiting this later. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGpSs9pKTbvPkmFvBaWhBp
This commit is contained in:
1 parent
e384a71dc9
commit
d1ce99a0d0
6 files changed
+630
-1
No files matched your search
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
IMAGE_NAME="${IMAGE_NAME:-alpine3.24-source-stack}"
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
|
||||
if [ -n "${CONTAINER_ENGINE:-}" ]; then
|
||||
ENGINE=$CONTAINER_ENGINE
|
||||
elif command -v docker >/dev/null 2>&1; then
|
||||
ENGINE=docker
|
||||
elif command -v podman >/dev/null 2>&1; then
|
||||
ENGINE=podman
|
||||
else
|
||||
echo "Error: Docker or Podman is required." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Building image $IMAGE_NAME with $ENGINE ..."
|
||||
exec "$ENGINE" build --tag "$IMAGE_NAME" "$SCRIPT_DIR"
|
||||
Reference in new issue
Block a user