Skip to content

Fix Alpine build: make execinfo.h optional#360

Merged
fcostaoliveira merged 1 commit intoredis:masterfrom
filipecosta90:fix-alpine-execinfo
Mar 23, 2026
Merged

Fix Alpine build: make execinfo.h optional#360
fcostaoliveira merged 1 commit intoredis:masterfrom
filipecosta90:fix-alpine-execinfo

Conversation

@fcostaoliveira
Copy link
Copy Markdown
Collaborator

@fcostaoliveira fcostaoliveira commented Mar 22, 2026

Summary

  • libexecinfo-dev was removed in Alpine 3.17+, causing fatal error: execinfo.h: No such file or directory during build
  • Added AC_CHECK_HEADERS([execinfo.h]) to configure.ac so the build system detects availability
  • Guarded #include <execinfo.h> and backtrace()/backtrace_symbols() calls behind #ifdef HAVE_EXECINFO_H with a graceful fallback message
  • Added Alpine CI matrix job (3.17, 3.18, 3.19, 3.20, 3.21, latest) that builds and runs --version

Closes #358

Test plan

  • Verify all Alpine matrix jobs pass (build + --version)
  • Verify existing Debian/Ubuntu/macOS CI jobs still pass (no regression)

🤖 Generated with Claude Code


Note

Low Risk
Low risk: build/CI portability changes only; runtime behavior changes only in crash-reporting paths where stack traces may now be omitted with a fallback message if execinfo.h is unavailable.

Overview
Fixes Alpine (3.17+) build failures by making execinfo.h optional: configure.ac now probes for it and memtier_benchmark.cpp conditionally compiles the execinfo include and backtrace()/backtrace_symbols() usage with a graceful fallback message.

CI is extended with a new build-alpine matrix job that builds and runs ./memtier_benchmark --version across multiple Alpine versions (3.17-3.21 and latest).

Written by Cursor Bugbot for commit 5a871da. This will update automatically on new commits. Configure here.

libexecinfo-dev was removed in Alpine 3.17+, causing build failures.
Add a configure check for execinfo.h and guard the include and
backtrace() calls behind HAVE_EXECINFO_H. Also add Alpine CI matrix
(3.17–3.21 + latest) to verify the build and --version on every PR.

Closes redis#358

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Mar 22, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@fcostaoliveira fcostaoliveira merged commit 2f74d61 into redis:master Mar 23, 2026
47 checks passed
@fcostaoliveira fcostaoliveira deleted the fix-alpine-execinfo branch March 23, 2026 09:57
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.

since v2.2.1 build failed on Alpine Linux

2 participants