Skip to content

Conversation

@melvincarvalho
Copy link
Contributor

@melvincarvalho melvincarvalho commented Jan 8, 2026

Summary

Fixes build failures on Ubuntu 22.04 and 24.04 (and newer systems).

Tested on:

  • Ubuntu 22.04 (GCC 11, Boost 1.74)
  • Ubuntu 24.04 (GCC 14, Boost 1.83)

Changes: 5 files, +68/-20 lines (mostly the Dockerfile)
Code changes: 4 files, net +2 lines

Fixes

Problem Solution
BDB 4.8 PPA dead Dockerfile builds from source
ALIGN(64) inside #pragma pack(1) Remove alignment, restructure
std::placeholders with boost::bind Use boost::placeholders

Testing

docker build -f Dockerfile.build -t bitmark-builder .
docker run --rm bitmark-builder /output/bitmarkd --version
# Bitmark Core Daemon version v0.9.7.4-...-beta

Both 22.04 and 24.04 builds verified working.

Impact

  • Breaking changes: None
  • Consensus changes: None
  • Pure build-system compatibility fixes

Fixes #137

- 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
@melvincarvalho melvincarvalho changed the title Fix build on Ubuntu 22.04+ (GCC 11+, Boost 1.74) Fix build on Ubuntu 22.04 and 24.04 (GCC 11+, Boost 1.74+) Jan 8, 2026
@melvincarvalho melvincarvalho requested a review from Copilot January 8, 2026 10:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

Build fails on Ubuntu 22.04+ (GCC 11+, Boost 1.74)

2 participants