Build Fails on Alma Linux #26
Labels
No labels
Bug
BuildIssue
Claude-fixed
Enhancement
In Progress
Low priority
On Hold
Rejected
Security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
keyop-go/nfq_forwarder#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Owing to an issue in
msteinert/pam, the build will fail on Alma Linux. The builds from the CI releases will still work though.The issue is described in https://github.com/msteinert/pam/issues/34, and the proposed and approved fix there would fix the problem.
changed the description
Root cause confirmed and fix verified against a real AlmaLinux 8.10 container (not just reasoned about):
msteinert/pam/v2's cgo preamble includes<dlfcn.h>and referencesC.RTLD_NEXTunder-std=c99. RTLD_NEXT is gated behind glibc's#ifdef __USE_GNUin that header - without_GNU_SOURCEdefined, glibc 2.28 (RHEL/Alma 8's version) does not expose it under strict c99, and the build fails with exactly the reported error ("could not determine what C.RTLD_NEXT refers to"). Debian's glibc doesn't hit this, which is why CI/the packaged release binaries (built in the Debian-based golang-ci image) already work - only a local build actually run on such a host fails, matching this ticket's description exactly.Reproduced the failure against a real
almalinux:8.10container, then confirmedCGO_CFLAGS=-D_GNU_SOURCEfixes it (both a minimal repro and the full project build withgo build ./...).Fix:
export CGO_CFLAGS = -D_GNU_SOURCEin the Makefile (alongside the existingCGO_LDFLAGS_ALLOWexport for libcap) - applies tomake build/test/lint/package/release/coverageautomatically, and is harmless on distros that don't need it. Upstream has an approved-but-unmerged fix (msteinert/pam#34); this workaround can be dropped once that lands and the dependency is bumped.mentioned in commit
26bc72113dmentioned in merge request !78
mentioned in commit
e701ff5e0cmentioned in commit
6c88be75e0Merged via !78 (merge commit
e701ff5).This only affects local compilation (a Makefile
CGO_CFLAGSexport) - the packaged release binaries were already unaffected (built in the Debian-based golang-ci image, which never hit this), so I'd suggest this doesn't need a version tag either. Let me know if you'd like one anyway.