|
xrpld
|
This document provides advanced instructions for setting up and configuring Conan for xrpld development: custom profiles, the lockfile, patched recipes, and profile tweaks.
If the default profile does not work for you and you do not yet have a Conan profile, you can create one by running:
You may need to make changes to the profile to suit your environment. You can refer to the provided conan/profiles/default profile for inspiration, and you may also need to apply the required tweaks to this default profile.
To achieve reproducible dependencies, we use a Conan lockfile, which has to be updated every time dependencies change.
Please see the instructions on how to regenerate the lockfile.
Occasionally, we need patched recipes or recipes not present in Conan Center. We maintain a fork of the Conan Center Index here containing the modified and newly added recipes.
To ensure our patched recipes are used, you must add our Conan remote at a higher index than the default Conan Center remote, so it is consulted first. You can do this by running:
Alternatively, you can pull our recipes from the repository and export them locally:
In the case we switch to a newer version of a dependency that still requires a patch or add a new dependency, it will be necessary for you to pull in the changes and re-export the updated dependencies with the newer version. However, if we switch to a newer version that no longer requires a patch, no action is required on your part, as the new recipe will be automatically pulled from the official Conan Center.
If you see an error similar to the following after running conan profile show:
you need to create $(conan config home)/settings_user.yml file if it doesn't exist and add the required version number(s) to the version array specific for your compiler. For example:
If you have multiple compilers installed, make sure to select the one to use in your default Conan configuration before running conan profile detect, by setting the CC and CXX environment variables.
For example, if you are running MacOS and have homebrew LLVM@18, and want to use it as a compiler in the new Conan profile:
You should also explicitly set the path to the compiler in the profile file, which helps to avoid errors when CC and/or CXX are set and disagree with the selected Conan profile. For example:
You can manage multiple Conan profiles in the directory $(conan config home)/profiles, for example renaming default to a different name and then creating a new default profile for a different compiler.
The default profile created by Conan will typically select different C++ dialect than C++23 used by this project. You should set 23 in the profile line starting with compiler.cppstd=. For example:
Linux developers will commonly have a default Conan profile that compiles with GCC and links with libstdc++. If you are linking with libstdc++ (see profile setting compiler.libcxx), then you will need to choose the libstdc++11 ABI:
Windows developers may need to use the x64 native build tools. An easy way to do that is to run the shortcut "x64 Native Tools Command Prompt" for the version of Visual Studio that you have installed.
Windows developers must also build xrpld and its dependencies for the x64 architecture:
Windows developers also must select static runtime:
If you want to experiment with a new package, follow these steps:
Regenerate the Conan lockfile so the new dependency is captured: