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

Add docs for Ubuntu 24.04 builds #4505

Merged
merged 1 commit into from
Oct 15, 2024
Merged
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
50 changes: 32 additions & 18 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,38 @@ In order to install the llvm (clang) toolchain, you may have to follow instructi

sudo apt-get install clang-format-12

### Ubuntu 24.04 and Newer Linux Versions

Some newer Ubuntu versions have reported issues with older compiler versions. For Ubuntu 24.04 and
other newer Linux distros, it is recommended to build with gcc-13 or clang-18. This can be installed as follows:

```zsh
# if using clang
sudo apt-get install clang-18
# if using g++ or building with libstdc++
# sudo apt-get install gcc-13 g++-13 cpp-13
# if building with libc++
sudo apt-get install libc++-18-dev libc++abi-18-dev
```

Note that installing libc++-18 via apt will uninstall all other libc++ versions.

Additionally, some newer Linux distros no longer package clang-format-12, and newer clang-format versions are
not backwards compatible. To build from source, you'll need to do the following:

```zsh
sudo apt-get install ninja-build cmake
git clone --depth 1 --branch llvmorg-12.0.1 https://github.com/llvm/llvm-project.git
cd llvm-project
sed -i "17i #include <stdint.h>" llvm/include/llvm/Support/Signals.h
CC=clang CXX=clang++ cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
cd build
ninja clang-format
sudo cp bin/clang-format /usr/bin/clang-format-12
cd ../..
rm -rf llvm-project/
```

### MacOS
When building on MacOS, here's some dependencies you'll need:
- Install xcode
Expand Down Expand Up @@ -150,24 +182,6 @@ clang-format --version
### Windows
See [INSTALL-Windows.md](INSTALL-Windows.md)

### Ubuntu 24.04 and Newer Linux Versions

Some newer Linux distros no longer package clang-format-12, and newer clang-format versions are
not backwards compatible. To build from source, you'll need to do the following:

```zsh
sudo apt-get install ninja-build cmake
git clone --depth 1 --branch llvmorg-12.0.1 https://github.com/llvm/llvm-project.git
cd llvm-project
sed -i "17i #include <stdint.h>" llvm/include/llvm/Support/Signals.h
CC=clang CXX=clang++ cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS="clang" -DCMAKE_BUILD_TYPE=Release
cd build
ninja clang-format
sudo cp bin/clang-format /usr/bin/clang-format-12
cd ../..
rm -rf llvm-project/
```

## Basic Installation

- `git clone https://github.com/stellar/stellar-core.git`
Expand Down
Loading