Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deb package build #4591

Merged
merged 2 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ pkg_out
pkg
CMakeUserPresets.json
bld.rippled/
.vscode
4 changes: 4 additions & 0 deletions Builds/containers/packaging/dpkg/build_dpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ if [ -e rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ] ; then
cp rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.buildinfo ${PKG_OUTDIR}
fi

pushd ${PKG_OUTDIR}
for f in *.ddeb; do mv -- "$f" "${f%.ddeb}.deb"; done
popd

cat rippled_${RIPPLED_DPKG_FULL_VERSION}_amd64.changes
# extract the text in the .changes file that appears between
# Checksums-Sha256: ...
Expand Down
18 changes: 16 additions & 2 deletions Builds/containers/packaging/dpkg/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,25 @@ override_dh_systemd_start:
dh_systemd_start --no-restart-on-upgrade

override_dh_auto_configure:
apt install --yes gcc-11 g++-11
update-alternatives --install \
/usr/bin/gcc gcc /usr/bin/gcc-11 100 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11 \
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-11 \
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-11 \
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-11 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-11 \
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-dump-11 \
--slave /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-tool-11
update-alternatives --set gcc /usr/bin/gcc-11
env
rm -rf bld

conan profile update settings.compiler.cppstd=20 gcc
conan profile update settings.compiler.version=11 gcc
conan export external/snappy snappy/1.1.9@

conan install . \
--profile gcc \
--install-folder bld/rippled \
--build missing \
--build boost \
Expand All @@ -38,12 +51,14 @@ override_dh_auto_configure:
-B bld/rippled

conan install . \
--profile gcc \
--install-folder bld/rippled-reporting \
--build missing \
--build boost \
--build sqlite3 \
--build libuv \
--settings build_type=Release \
--settings compiler.cppstd=17 \
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can't build non-reporting mode without C++20, and we can't build reporting mode with C++20? Is that right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems to be the case. IIRC, there was an issue building Cassandra.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, that's the issue I'm having:

C++20 changes std::memory_order from an enum to an enum class. Datastax supplies a C++ driver for Cassandra, a dependency of reporting mode. it defines an enum MemoryOrder whose values are copied from std::memory_order, but using values from an enum class is not allowed, causing a compile error: https://godbolt.org/z/dG943nvT7

--options reporting=True

cmake -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
Expand All @@ -58,7 +73,6 @@ override_dh_auto_configure:

override_dh_auto_build:
cmake --build bld/rippled --target rippled --target validator-keys -j${nproc}

cmake --build bld/rippled-reporting --target rippled -j${nproc}

override_dh_auto_install:
Expand Down