Skip to content

Commit 84fd7d0

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop4.6
2 parents 7f52287 + 921aef9 commit 84fd7d0

File tree

27 files changed

+392
-747
lines changed

27 files changed

+392
-747
lines changed

.github/actions/dependencies/action.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ runs:
1010
shell: bash
1111
run: |
1212
conan export --version 1.1.10 external/snappy
13-
conan export --version 9.7.3 external/rocksdb
1413
conan export --version 4.0.3 external/soci
1514
conan export --version 2.3.1 external/wamr
1615
- name: add Ripple Conan remote
@@ -23,7 +22,6 @@ runs:
2322
fi
2423
conan remote add --index 0 ripple "${CONAN_URL}"
2524
echo "Added conan remote ripple at ${CONAN_URL}"
26-
2725
- name: try to authenticate to Ripple Conan remote
2826
if: env.CONAN_LOGIN_USERNAME_RIPPLE != '' && env.CONAN_PASSWORD_RIPPLE != ''
2927
id: remote
@@ -32,7 +30,6 @@ runs:
3230
echo "Authenticating to ripple remote..."
3331
conan remote auth ripple --force
3432
conan remote list-users
35-
3633
- name: list missing binaries
3734
id: binaries
3835
shell: bash

.github/workflows/macos.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ env:
2424
CONAN_GLOBAL_CONF: |
2525
core.download:parallel={{os.cpu_count()}}
2626
core.upload:parallel={{os.cpu_count()}}
27-
core:default_build_profile=libxrpl
28-
core:default_profile=libxrpl
2927
tools.build:jobs={{ (os.cpu_count() * 4/5) | int }}
3028
tools.build:verbosity=verbose
3129
tools.compilation:verbosity=verbose
@@ -95,7 +93,6 @@ jobs:
9593
shell: bash
9694
run: |
9795
conan export --version 1.1.10 external/snappy
98-
conan export --version 9.7.3 external/rocksdb
9996
conan export --version 4.0.3 external/soci
10097
conan export --version 2.3.1 external/wamr
10198
- name: add Ripple Conan remote

.github/workflows/nix.yml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ env:
2525
CONAN_GLOBAL_CONF: |
2626
core.download:parallel={{ os.cpu_count() }}
2727
core.upload:parallel={{ os.cpu_count() }}
28-
core:default_build_profile=libxrpl
29-
core:default_profile=libxrpl
3028
tools.build:jobs={{ (os.cpu_count() * 4/5) | int }}
3129
tools.build:verbosity=verbose
3230
tools.compilation:verbosity=verbose
@@ -101,7 +99,6 @@ jobs:
10199
run: tar -czf conan.tar.gz -C ${CONAN_HOME} .
102100
- name: build dependencies
103101
uses: ./.github/actions/dependencies
104-
105102
with:
106103
configuration: ${{ matrix.configuration }}
107104
- name: upload archive
@@ -359,40 +356,44 @@ jobs:
359356
cmake --build .
360357
./example | grep '^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+'
361358
362-
# NOTE we are not using dependencies built above because it lags with
363-
# compiler versions. Instrumentation requires clang version 16 or
364-
# later
365-
366359
instrumentation-build:
367-
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
368-
env:
369-
CLANG_RELEASE: 16
360+
needs: dependencies
370361
runs-on: [self-hosted, heavy]
371362
container: ghcr.io/xrplf/ci/debian-bookworm:clang-16
372-
363+
env:
364+
build_dir: .build
373365
steps:
374-
- name: checkout
375-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
366+
- name: download cache
367+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
368+
with:
369+
name: linux-clang-Debug
376370

377-
- name: prepare environment
371+
- name: extract cache
378372
run: |
379-
mkdir ${GITHUB_WORKSPACE}/.build
380-
echo "SOURCE_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV
381-
echo "BUILD_DIR=$GITHUB_WORKSPACE/.build" >> $GITHUB_ENV
373+
mkdir -p ${CONAN_HOME}
374+
tar -xzf conan.tar.gz -C ${CONAN_HOME}
382375
383-
- name: configure Conan
376+
- name: check environment
384377
run: |
385-
echo "${CONAN_GLOBAL_CONF}" >> $(conan config home)/global.conf
386-
conan config install conan/profiles/ -tf $(conan config home)/profiles/
387-
conan export --version 2.3.1 external/wamr
388-
conan profile show
389-
- name: build dependencies
378+
echo ${PATH} | tr ':' '\n'
379+
conan --version
380+
cmake --version
381+
env | sort
382+
ls ${CONAN_HOME}
383+
384+
- name: checkout
385+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
386+
387+
- name: dependencies
388+
uses: ./.github/actions/dependencies
389+
with:
390+
configuration: Debug
391+
392+
- name: prepare environment
390393
run: |
391-
cd ${BUILD_DIR}
392-
conan install ${SOURCE_DIR} \
393-
--output-folder ${BUILD_DIR} \
394-
--build missing \
395-
--settings:all build_type=Debug
394+
mkdir -p ${build_dir}
395+
echo "SOURCE_DIR=$(pwd)" >> $GITHUB_ENV
396+
echo "BUILD_DIR=$(pwd)/${build_dir}" >> $GITHUB_ENV
396397
397398
- name: build with instrumentation
398399
run: |

.github/workflows/windows.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ env:
2727
CONAN_GLOBAL_CONF: |
2828
core.download:parallel={{os.cpu_count()}}
2929
core.upload:parallel={{os.cpu_count()}}
30-
core:default_build_profile=libxrpl
31-
core:default_profile=libxrpl
3230
tools.build:jobs=24
3331
tools.build:verbosity=verbose
3432
tools.compilation:verbosity=verbose
@@ -90,7 +88,6 @@ jobs:
9088
shell: bash
9189
run: |
9290
conan export --version 1.1.10 external/snappy
93-
conan export --version 9.7.3 external/rocksdb
9491
conan export --version 4.0.3 external/soci
9592
conan export --version 2.3.1 external/wamr
9693
- name: add Ripple Conan remote

BUILD.md

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,6 @@ which allows you to statically link it with GCC, if you want.
172172
conan export --version 1.1.10 external/snappy
173173
```
174174

175-
Export our [Conan recipe for RocksDB](./external/rocksdb).
176-
It does not override paths to dependencies when building with Visual Studio.
177-
178-
```
179-
# Conan 2.x
180-
conan export --version 9.7.3 external/rocksdb
181-
```
182-
183175
Export our [Conan recipe for SOCI](./external/soci).
184176
It patches their CMake to correctly import its dependencies.
185177

@@ -390,10 +382,7 @@ and can be helpful for detecting `#include` omissions.
390382
After any updates or changes to dependencies, you may need to do the following:
391383

392384
1. Remove your build directory.
393-
2. Remove the Conan cache:
394-
```
395-
rm -rf ~/.conan/data
396-
```
385+
2. Remove the Conan cache: `conan remove "*" -c`
397386
3. Re-run [conan install](#build-and-test).
398387

399388
### 'protobuf/port_def.inc' file not found
@@ -412,50 +401,6 @@ For example, if you want to build Debug:
412401
1. For conan install, pass `--settings build_type=Debug`
413402
2. For cmake, pass `-DCMAKE_BUILD_TYPE=Debug`
414403

415-
### no std::result_of
416-
417-
If your compiler version is recent enough to have removed `std::result_of` as
418-
part of C++20, e.g. Apple Clang 15.0, then you might need to add a preprocessor
419-
definition to your build.
420-
421-
```
422-
conan profile update 'options.boost:extra_b2_flags="define=BOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
423-
conan profile update 'env.CFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
424-
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"' default
425-
conan profile update 'conf.tools.build:cflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
426-
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_HAS_STD_INVOKE_RESULT"]' default
427-
```
428-
429-
### call to 'async_teardown' is ambiguous
430-
431-
If you are compiling with an early version of Clang 16, then you might hit
432-
a [regression][6] when compiling C++20 that manifests as an [error in a Boost
433-
header][7]. You can workaround it by adding this preprocessor definition:
434-
435-
```
436-
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default
437-
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
438-
```
439-
440-
### recompile with -fPIC
441-
442-
If you get a linker error suggesting that you recompile Boost with
443-
position-independent code, such as:
444-
445-
```
446-
/usr/bin/ld.gold: error: /home/username/.conan/data/boost/1.77.0/_/_/package/.../lib/libboost_container.a(alloc_lib.o):
447-
requires unsupported dynamic reloc 11; recompile with -fPIC
448-
```
449-
450-
Conan most likely downloaded a bad binary distribution of the dependency.
451-
This seems to be a [bug][1] in Conan just for Boost 1.77.0 compiled with GCC
452-
for Linux. The solution is to build the dependency locally by passing
453-
`--build boost` when calling `conan install`.
454-
455-
```
456-
conan install --build boost ...
457-
```
458-
459404
## Add a Dependency
460405

461406
If you want to experiment with a new package, follow these steps:

conan/profiles/libxrpl renamed to conan/profiles/default

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[settings]
1010
os={{ os }}
1111
arch={{ arch }}
12+
build_type=Debug
1213
compiler={{compiler}}
1314
compiler.version={{ compiler_version }}
1415
compiler.cppstd=20
@@ -17,3 +18,17 @@ compiler.runtime=static
1718
{% else %}
1819
compiler.libcxx={{detect_api.detect_libcxx(compiler, version, compiler_exe)}}
1920
{% endif %}
21+
22+
[conf]
23+
{% if compiler == "clang" and compiler_version >= 19 %}
24+
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
25+
{% endif %}
26+
{% if compiler == "apple-clang" and compiler_version >= 17 %}
27+
tools.build:cxxflags=['-Wno-missing-template-arg-list-after-template-kw']
28+
{% endif %}
29+
{% if compiler == "gcc" and compiler_version < 13 %}
30+
tools.build:cxxflags=['-Wno-restrict']
31+
{% endif %}
32+
33+
[tool_requires]
34+
!cmake/*: cmake/[>=3 <4]

conanfile.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ def configure(self):
106106
def requirements(self):
107107
# Conan 2 requires transitive headers to be specified
108108
transitive_headers_opt = {'transitive_headers': True} if conan_version.split('.')[0] == '2' else {}
109-
self.requires('boost/1.83.0', force=True, **transitive_headers_opt)
109+
self.requires('boost/1.86.0', force=True, **transitive_headers_opt)
110110
self.requires('date/3.0.4', **transitive_headers_opt)
111111
self.requires('lz4/1.10.0', force=True)
112112
self.requires('protobuf/3.21.12', force=True)
113113
self.requires('sqlite3/3.49.1', force=True)
114114
if self.options.jemalloc:
115115
self.requires('jemalloc/5.3.0')
116116
if self.options.rocksdb:
117-
self.requires('rocksdb/9.7.3')
117+
self.requires('rocksdb/10.0.1')
118118
self.requires('xxhash/0.8.3', **transitive_headers_opt)
119119

120120
exports_sources = (
@@ -146,8 +146,6 @@ def generate(self):
146146
tc.variables['static'] = self.options.static
147147
tc.variables['unity'] = self.options.unity
148148
tc.variables['xrpld'] = self.options.xrpld
149-
if self.settings.compiler == 'clang' and self.settings.compiler.version == 16:
150-
tc.extra_cxxflags = ["-DBOOST_ASIO_DISABLE_CONCEPTS"]
151149
tc.generate()
152150

153151
def build(self):

external/rocksdb/conandata.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)