Skip to content

Commit

Permalink
rm macOS for now
Browse files Browse the repository at this point in the history
  • Loading branch information
legleux committed Feb 12, 2024
1 parent 69b4fc5 commit f9a45bd
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 34 deletions.
77 changes: 61 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@




# Witness Server for XRPL Sidechains

This is the Witness Server for [XLS-38d Cross-Chain bridge project](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0038d-cross-chain-bridge). "Witness Servers" validate transfers between "door accounts" that connect a locking chain to each issuing chain by listening for transactions on one or both of the chains and signing attestations to prove certain events happened on a chain.
Expand All @@ -19,7 +23,7 @@ This is the Witness Server for [XLS-38d Cross-Chain bridge project](https://gith
|-------------|---------|
| GCC | 11 |
| Clang | 13 |
| Apple Clang | 14.0.3 |
| Apple clang | 15 |

## Build and run

Expand All @@ -29,58 +33,99 @@ This is the Witness Server for [XLS-38d Cross-Chain bridge project](https://gith
mkdir .build && cd .build
```

2) Configure Conan (once before first build)
2. Configure Conan.

Add Ripple's Artifactory as a Conan remote to source the `libxrpl` Conan package.

```bash
conan remote add --insert 0 conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
conan remote add --insert 0 conan-non-prod http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod

```
<details>
<summary> Optional local development of <code>xrpl</code> library</summary>

3. Configure the Conan profile.
The Conan `xrpl` recipe is also available by checking out the [`rippled` source](https://github.com/XRPLF/rippled.git) and exporting the recipe locally.

```bash
git clone https://github.com/XRPLF/rippled.git
cd rippled
conan export .
```
</details>

```bash
conan profile update settings.cppstd=20 default
conan profile update settings.compiler.libcxx=libstdc++11 default
```
Your profile should look like:
<br>
<details>
<summary>Example Conan profiles</summary>

### Linux
```ini
[settings]
arch=x86_64
arch_build=x86_64
os=Linux
os_build=Linux
build_type=Release
compiler=gcc
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=11
```
### macOS

On macOS [you may get an error from Boost](https://github.com/XRPLF/rippled/blob/develop/BUILD.md#call-to-async_teardown-is-ambiguous)
which requires adding some CMake flags to your Conan profile.
```
conan profile update 'env.CXXFLAGS="-DBOOST_ASIO_DISABLE_CONCEPTS"' default
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
```

```ini
[settings]
arch=x86_64
arch_build=x86_64
os=Linux
os_build=Linux
os=Macos
os_build=Macos
arch=armv8
arch_build=armv8
compiler=apple-clang
compiler.version=15
build_type=Release
compiler=gcc
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=11
compiler.libcxx=libc++
[options]
[conf]
tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
[build_requires]
[env]
CXXFLAGS=-DBOOST_ASIO_DISABLE_CONCEPTS
```
</details>

4. Run Conan to install and/or build dependencies.
3. Run Conan to install and/or build dependencies.

``` bash
conan install .. \
--output-folder . \
--build missing \
--settings build_type=Release
```
5. Configure CMake.
4. Configure CMake.

``` bash
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
```

6) Build with CMake.
5. Build with CMake.

``` bash
cmake --build --parallel $(nproc)
```

7) Run the unit tests.
6. Run the unit tests.

``` bash
./xbridge_witnessd --unittest
Expand Down
18 changes: 0 additions & 18 deletions run-xbwd-build.sh

This file was deleted.

0 comments on commit f9a45bd

Please sign in to comment.