Skip to content

Make release build use conan deps where possible and hbb 4.0.1#516

Merged
RichardAH merged 25 commits intoXahau:devfrom
tequdev:conan-release-builder
Aug 14, 2025
Merged

Make release build use conan deps where possible and hbb 4.0.1#516
RichardAH merged 25 commits intoXahau:devfrom
tequdev:conan-release-builder

Conversation

@tequdev
Copy link
Member

@tequdev tequdev commented Jun 6, 2025

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@tequdev tequdev marked this pull request as ready for review June 8, 2025 15:02
@tequdev tequdev changed the title Make release build use conan [DO NOT MERGE] Make release build use conan Jun 16, 2025
dangell7
dangell7 previously approved these changes Jul 4, 2025
@dangell7 dangell7 requested a review from RichardAH July 4, 2025 16:01
@tequdev
Copy link
Member Author

tequdev commented Jul 10, 2025

As of the latest build of this PR (2025.7.9-HEAD+1952), I have confirmed that the following three commands work (with xahaud —version).

And in WSL(Ubuntu 20.04)

Debian 10

docker run --rm --platform linux/amd64 debian:10 bash -c "apt-get update && apt-get install -y wget && wget -O xahaud https://build.xahau.tech/2025.7.9-HEAD%2B1952 && chmod +x xahaud && ./xahaud --version"

Ubuntu 20.04

docker run --rm --platform linux/amd64 ubuntu:20.04 bash -c "apt-get update && apt-get install -y wget && wget -O xahaud https://build.xahau.tech/2025.7.9-HEAD%2B1952 && chmod +x xahaud && ./xahaud --version"

Rocky Linux 8 (RHEL8 Compatible)

docker run --rm --platform linux/amd64 rockylinux:8 bash -c "yum install -y wget && wget -O xahaud https://build.xahau.tech/2025.7.9-HEAD%2B1952 && chmod +x xahaud && ./xahaud --version"

- clarify why boost, llvm, and lld are installed separately
- explain that conan only provides shared library version
- note which deps come from packages vs source builds
@sublimator sublimator changed the title Make release build use conan Make release build use conan and hbb 4.0.1 Aug 2, 2025
@sublimator sublimator changed the title Make release build use conan and hbb 4.0.1 Make release build use conan deps where possible and hbb 4.0.1 Aug 4, 2025
cmake .. -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=ON -DLLVM_DIR=/usr/lib64/llvm13/lib/cmake/llvm/ -DLLVM_LIBRARY_DIR=/usr/lib64/llvm13/lib/ -DWasmEdge_LIB=/usr/local/lib64/libwasmedge.a &&
make -j$3 VERBOSE=1 &&
strip -s rippled &&
conan install .. --output-folder . --build missing --settings build_type=$BUILD_TYPE &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

reminder: conan has issues with concurrent use of cache

Copy link
Collaborator

Choose a reason for hiding this comment

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

I actually had to use "conan remove --locks" at one point when experimenting after canceling a build midway through

sublimator and others added 6 commits August 5, 2025 10:34
This commit resolves an issue where the xahaud binary was dynamically
linking against libstdc++ despite build flags requesting static linkage.

The root cause was a bug in the Conan 1.x CMakeDeps generator,
triggered by the snappy recipe modifying `system_libs`. This caused
Conan to inject `-lstdc++` into the build, overriding other settings.

The fix involves three parts:
1. snappy/conanfile.py: The trigger for the bug is removed by
   commenting out the modification of `system_libs`.
2. RippledCore.cmake: The math library (`libm`) is now explicitly
   linked to the final executable target as a best practice.
3. build-core.sh: The conan export for snappy is updated to the
   correct version.
ccache -s &&
strip -s rippled &&
mv rippled xahaud &&
libcheck xahaud &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

message(\"WasmEdge DONE\")
" > Builds/CMake/deps/WasmEdge.cmake &&

export LDFLAGS="-static-libstdc++"
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems to be working, but we should probably be "extending" LDFLAGS:
https://github.com/phusion/holy-build-box/blob/master/image/activate_func.sh#L14-L15

export LDFLAGS="$LDFLAGS -static-libstdc++"

Copy link
Collaborator

Choose a reason for hiding this comment

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

activate_holy_build_box_deps_installation_environment

Though that may not be relevant at all

Copy link
Collaborator

Choose a reason for hiding this comment

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

https://github.com/phusion/holy-build-box/blob/master/image/activate_func.sh#L24-L45

Ok, no, activate_holy_build_box is setting LDFLAGS too

Copy link
Collaborator

Choose a reason for hiding this comment

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

also, comment that is relevant to the conan deps (my assumption) probably good

@RichardAH
Copy link
Contributor

Awesome job guys

@RichardAH RichardAH merged commit 2fc912d into Xahau:dev Aug 14, 2025
8 checks passed
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.

4 participants