fix: support building on Alpine Linux 3.17+ (musl) without libexecinfo-dev#204
Draft
M-Elsaeed wants to merge 5 commits into
Draft
fix: support building on Alpine Linux 3.17+ (musl) without libexecinfo-dev#204M-Elsaeed wants to merge 5 commits into
M-Elsaeed wants to merge 5 commits into
Conversation
On musl-based systems (Alpine Linux 3.17+), execinfo.h is not available as the libexecinfo package was removed. This causes a build failure in the bundled aws-lambda-cpp when backward.cpp is compiled. This change makes backward.cpp compilation conditional on execinfo.h availability via CMake's check_include_file_cxx. When absent, stack trace support is disabled but all RIC functionality works correctly. Fixes aws#128 Relates to aws#144
…ball The tarball was repacked on macOS, adding 69 ._* resource-fork files. This strips them; the only real-content change remains the CMakeLists.txt execinfo.h guard. Real file contents are byte-identical to the prior commit.
Adds a job that runs the documented end-user 'pip install .' flow (BUILD unset, so the native aws-lambda-cpp extension is actually compiled) and asserts the runtime_client extension imports. Covers the full Alpine range that dropped libexecinfo-dev (3.17-3.21) - the integration-test matrix only starts at 3.19 - plus a glibc Debian check to ensure stack-trace support still compiles where execinfo.h exists. Directly guards against regressions of issue aws#128.
Per review feedback, collapse the per-Alpine-version matrix into a single representative row per OS family, pinned to the newest Python (3.14): alpine 3.21, debian bookworm, ubuntu 24.04, amazonlinux2023. Reuses the per-OS Dockerfiles + RIE invoke. The Alpine (musl) row still guards the libexecinfo/execinfo.h regression from aws#128. Amazon Linux 2 is omitted as it does not provide Python 3.14.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Alpine Linux 3.17+,
libexecinfo-devwas removed because musl libc does not supportexecinfo.h. This causespip install awslambdaricto fail when building from source on Alpine (nomusllinuxwheels are published):Fix
Make
backward.cppcompilation conditional onexecinfo.havailability in the bundledaws-lambda-cpp-0.2.6CMakeLists.txt. Whenexecinfo.his absent, stack trace support is disabled but all Lambda RIC functionality works correctly.Testing
Verified with Docker on
python:3.12-alpine3.20(autoconf 2.72, nolibexecinfo-dev):import awslambdaricworksContext
libexecinfo-devin v3.17 (Nov 2022)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.