Fix AlmaLinux/RHEL 8 build failure (#26) #78
No reviewers
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!78
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue26_almalinux_pam_build_fix"
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?
Closes #26.
msteinert/pam/v2's cgo preamble referencesC.RTLD_NEXTunder-std=c99, but RTLD_NEXT is gated behind glibc's#ifdef __USE_GNUindlfcn.h- without_GNU_SOURCEdefined, glibc 2.28 (RHEL/Alma 8) doesn't expose it under strict c99, and the build fails withcould not determine what C.RTLD_NEXT refers to`. Debian's glibc doesn't hit this, which is why CI and the packaged release binaries were already unaffected.Fix:
export CGO_CFLAGS = -D_GNU_SOURCEin the Makefile.Verified against a real
almalinux:8.10container, not just reasoned about - reproduced the exact reported error with both a minimal repro and this project's actualgo build ./..., then confirmed the fix resolves both.Upstream has an approved-but-unmerged fix (msteinert/pam#34); this workaround can be dropped once that lands and the dependency is bumped.
make lint/make test/make buildall still pass on the (unaffected) Debian sandbox too.requested review from @danny
assigned to @claude
Absolutely fine with this one.
approved this merge request
mentioned in commit
e701ff5e0cmentioned in commit
6c88be75e0mentioned in merge request !79
mentioned in issue #26