Fix build on Ubuntu 22.04 and 24.04 (GCC 11+, Boost 1.74+)#138
Open
melvincarvalho wants to merge 1 commit intomasterfrom
Open
Fix build on Ubuntu 22.04 and 24.04 (GCC 11+, Boost 1.74+)#138melvincarvalho wants to merge 1 commit intomasterfrom
melvincarvalho wants to merge 1 commit intomasterfrom
Conversation
- Remove ALIGN(64) from blake2 structs inside #pragma pack(1) - Move parallel state structs outside pack block - Fix blake2s array-of-1 alignment issue - Use boost::placeholders instead of std::placeholders with boost::bind - Add Dockerfile for reproducible builds with BDB 4.8 from source Fixes #137
There was a problem hiding this comment.
Pull request overview
This pull request fixes build failures on Ubuntu 22.04 and 24.04 (GCC 11+ and Boost 1.74+) by addressing three specific compatibility issues: replacing the dead Bitcoin PPA for Berkeley DB with source compilation, fixing incompatible alignment directives within packed structs, and correcting placeholder usage with boost::bind.
- Replaces std::placeholders with boost::placeholders in non-GUI code for Boost 1.74+ compatibility
- Restructures blake2.h to move alignment-sensitive structs outside pragma pack(1) blocks
- Adds Dockerfile.build that builds Berkeley DB 4.8 from source with proper patches for modern GCC
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/rpcserver.cpp | Updates two boost::bind calls to use boost::placeholders instead of std::placeholders |
| src/main.cpp | Updates wallet registration/unregistration functions to use boost::placeholders consistently |
| src/blake2s-ref.c | Changes blake2s_state from single-element array to direct variable for clarity |
| src/blake2.h | Removes ALIGN directives from packed structs and moves composite structs outside pack(1) block |
| Dockerfile.build | New Dockerfile that builds from source on Ubuntu 22.04, including BDB 4.8 compilation with GCC compatibility patches |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Fixes build failures on Ubuntu 22.04 and 24.04 (and newer systems).
Tested on:
Changes: 5 files, +68/-20 lines (mostly the Dockerfile)
Code changes: 4 files, net +2 lines
Fixes
ALIGN(64)inside#pragma pack(1)std::placeholderswithboost::bindboost::placeholdersTesting
Both 22.04 and 24.04 builds verified working.
Impact
Fixes #137