From dfc722aa059b5f6f4036b4fb1391d67799bbd14b Mon Sep 17 00:00:00 2001 From: Elliot Lee Date: Thu, 19 Feb 2026 16:32:44 +0900 Subject: [PATCH] docs(BUILD): make it easier to find environment.md (#4507) Make the instructions a bit easier to follow. Users on different platforms can look for their platform name to find relevant information. --- BUILD.md | 79 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 27 deletions(-) diff --git a/BUILD.md b/BUILD.md index 721dda053..5aafb547f 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,7 +1,7 @@ -> These instructions assume you have a C++ development environment ready -> with Git, Python, Conan, CMake, and a C++ compiler. For help setting one up -> on Linux, macOS, or Windows, see [our guide](./docs/build/environment.md). -> +| :warning: **WARNING** :warning: +|---| +| These instructions assume you have a C++ development environment ready with Git, Python, Conan, CMake, and a C++ compiler. For help setting one up on Linux, macOS, or Windows, [see this guide](./docs/build/environment.md). | + > These instructions also assume a basic familiarity with Conan and CMake. > If you are unfamiliar with Conan, > you can read our [crash course](./docs/build/conan.md) @@ -29,9 +29,12 @@ branch. git checkout develop ``` - ## Minimum Requirements +See [System Requirements](https://xrpl.org/system-requirements.html). + +Building rippled generally requires git, Python, Conan, CMake, and a C++ compiler. Some guidance on setting up such a [C++ development environment can be found here](./docs/build/environment.md). + - [Python 3.7](https://www.python.org/downloads/) - [Conan 2.x](https://conan.io/downloads) - [CMake 3.16](https://cmake.org/download/) @@ -46,6 +49,21 @@ The [minimum compiler versions][2] required are: | Apple Clang | 13.1.6 | | MSVC | 19.23 | +### Linux + +The Ubuntu operating system has received the highest level of +quality assurance, testing, and support. + +Here are [sample instructions for setting up a C++ development environment on Linux](./docs/build/environment.md#linux). + +### Mac + +Many xahaud engineers use macOS for development. + +Here are [sample instructions for setting up a C++ development environment on macOS](./docs/build/environment.md#macos). + +### Windows + We don't recommend Windows for `xahaud` production at this time. As of November 2025, Ubuntu has the highest level of quality assurance, testing, and support. @@ -54,21 +72,23 @@ Windows developers should use Visual Studio 2019. `xahaud` isn't compatible with [Boost](https://www.boost.org/) 1.78 or 1.79, and Conan can't build earlier Boost versions. -**Note:** 32-bit Windows development isn't supported. - - ## Steps - ### Set Up Conan -1. (Optional) If you've never used Conan, use autodetect to set up a default profile. +After you have a [C++ development environment](./docs/build/environment.md) ready with Git, Python, Conan, CMake, and a C++ compiler, you may need to set up your Conan profile. + +These instructions assume a basic familiarity with Conan and CMake. + +If you are unfamiliar with Conan, then please read [this crash course](./docs/build/conan.md) or the official [Getting Started][3] walkthrough. + +You'll need at least one Conan profile: ``` conan profile detect --force ``` -2. Update the compiler settings. +Update the compiler settings: For Conan 2, you can edit the profile directly at `~/.conan2/profiles/default`, or use the Conan CLI. Ensure C++20 is set: @@ -85,10 +105,10 @@ can't build earlier Boost versions. compiler.cppstd=20 ``` - 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. +**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: ``` # In ~/.conan2/profiles/default, ensure: @@ -96,9 +116,9 @@ can't build earlier Boost versions. compiler.libcxx=libstdc++11 ``` - On Windows, you should 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 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 `xahaud` and its dependencies for the x64 architecture. @@ -109,10 +129,7 @@ can't build earlier Boost versions. arch=x86_64 ``` -3. (Optional) If you have multiple compilers installed on your platform, - make sure that Conan and CMake select the one you want to use. - This setting will set the correct variables (`CMAKE__COMPILER`) - in the generated CMake toolchain file. +### Multiple compilers ``` # In ~/.conan2/profiles/default, add under [conf] section: @@ -129,16 +146,24 @@ can't build earlier Boost versions. CXX= ``` -4. Export our [Conan recipe for Snappy](./external/snappy). - It doesn't explicitly link the C++ standard library, - which allows you to statically link it with GCC, if you want. +It should choose the compiler for dependencies as well, +but not all of them have a Conan recipe that respects this setting (yet). +For the rest, you can set these environment variables. +Replace `` with paths to the desired compilers: + +- `conan profile update env.CC= default` +- `conan profile update env.CXX= default` + +Export our [Conan recipe for Snappy](./external/snappy). +It does not explicitly link the C++ standard library, +which allows you to statically link it with GCC, if you want. ``` conan export external/snappy --version 1.1.10 --user xahaud --channel stable ``` -5. Export our [Conan recipe for SOCI](./external/soci). - It patches their CMake to correctly import its dependencies. +Export our [Conan recipe for SOCI](./external/soci). +It patches their CMake to correctly import its dependencies. ``` conan export external/soci --version 4.0.3 --user xahaud --channel stable