mirror of
https://github.com/matrix-construct/construct
synced 2024-11-24 15:52:34 +01:00
Updated BUILD (markdown)
parent
cadcee0d53
commit
ed20342092
1 changed files with 35 additions and 51 deletions
86
BUILD.md
86
BUILD.md
|
@ -1,73 +1,57 @@
|
|||
# BUILD
|
||||
|
||||
##### Compatibility Primer
|
||||
1. **Fetch dependencies**
|
||||
|
||||
This section is intended to allow building with dependencies that have not
|
||||
made their way to mainstream systems. Important notes that may affect you:
|
||||
- Ubuntu Cosmic (18.10) through Focal (20.04):
|
||||
```autoconf autoconf-archive autoconf2.13 automake autotools-dev boost1.71 build-essential cmake curl git libbz2-dev libmagic-dev libnss-db libsodium-dev libssl-dev libtool shtool xz-utils```
|
||||
|
||||
- Make sure you have all **required dependencies** installed. You can install
|
||||
them with your favorite package manager. These are:
|
||||
```
|
||||
autoconf autoconf-archive autoconf2.13 automake autotools-dev boost1.71 build-essential cmake curl git libbz2-dev libmagic-dev libnss-db libsodium-dev libssl-dev libtool shtool xz-utils
|
||||
```
|
||||
|
||||
- Optional dependencies are :
|
||||
- **lz4** for database compression: `liblz4-dev`
|
||||
- **GraphicsMagick** for media thumbnails: `libgraphicsmagick1-dev`
|
||||
- **jemalloc** for dynamic memory: `libjemalloc-dev`
|
||||
- **ICU** for unicode tools: `libicu-dev`
|
||||
2. **Review special requirements for platforms and packages**
|
||||
|
||||
- Boost: The required version is available through `apt` as `libboost-all-dev` on
|
||||
Ubuntu Cosmic (18.10). All earlier releases (including 18.04 LTS) can configure
|
||||
with `--with-included-boost` as instructed below.
|
||||
THE COMPLETE SOURCE-CODE OF ROCKSDB MUST BE AVAILABLE TO BUILD CONSTRUCT. This is different from the `include/` and `lib/` files installed by your distribution's package system. Most platforms do not have to build the source, but it must be available.
|
||||
|
||||
- RocksDB: THE COMPLETE SOURCE-CODE OF ROCKSDB MUST BE AVAILABLE TO BUILD CONSTRUCT.
|
||||
This is different from the `include/` and `lib/` files installed by your
|
||||
distribution's package system. You do not have to build the source, but it must
|
||||
be available. ALL UBUNTU USERS MUST BUILD THE SOURCE AS WELL (SKIP TO NEXT BULLET).
|
||||
```
|
||||
git submodule update --init deps/rocksdb
|
||||
cd deps/rocksdb
|
||||
git fetch --tags --force
|
||||
git checkout v5.17.2
|
||||
```
|
||||
> 👉 For best performance and stability, please check for the version available on
|
||||
your system and match that with the `git checkout` command below.
|
||||
|
||||
```
|
||||
git submodule update --init deps/rocksdb
|
||||
cd deps/rocksdb
|
||||
git fetch --tags --force
|
||||
git checkout v5.17.2
|
||||
```
|
||||
|
||||
- RocksDB: **All Ubuntu users on all releases must configure Construct with the
|
||||
option `--with-included-rocksdb`**. This will fetch and properly build rocksdb.
|
||||
your system and match that with the `git checkout` command above.
|
||||
|
||||
- Ubuntu (ALL RELEASES):
|
||||
You must configure Construct with the option `--with-included-rocksdb`. This will fetch and properly build rocksdb.
|
||||
> Ubuntu builds their library with `-Bsymbolic-functions`. This conflicts with
|
||||
the requirements of Construct's embedding.
|
||||
|
||||
##### Installation Primer
|
||||
- Ubuntu Bionic (18.04) and earlier:
|
||||
Remove `boost1.71` from the package list in the earlier section; add `--with-included-boost` to `./configure` when instructed below.
|
||||
|
||||
A general overview of what construct will build and install is given here. At
|
||||
this time it is suggested to supply `./configure` with a `--prefix` path,
|
||||
|
||||
3. **Review the installation layout**
|
||||
|
||||
At this time it is suggested to supply `./configure` with a `--prefix` path,
|
||||
especially for development. Example `--prefix=~/.local/`.
|
||||
|
||||
- Binary executable `$prefix/bin/construct`
|
||||
- Shared library `$prefix/lib/libircd.so`
|
||||
- Shared library modules `$prefix/lib/modules/construct/*.so`
|
||||
- Header files `$prefix/include/ircd/*`
|
||||
- Read-only shared assets `$prefix/share/construct/*`
|
||||
- Database directory may be established at `$prefix/var/db/construct/`
|
||||
- Binary executable `$prefix/bin/construct`
|
||||
- Shared library `$prefix/lib/libircd.so`
|
||||
- Shared library modules `$prefix/lib/modules/construct/*.so`
|
||||
- Header files `$prefix/include/ircd/*`
|
||||
- Read-only shared assets `$prefix/share/construct/*`
|
||||
- Database directory may be established at `$prefix/var/db/construct/`
|
||||
|
||||
> ❗ Do not set your `--prefix` path to a directory inside your git repository or an invocation of `git clean` will erase your database in $prefix/var/db/.
|
||||
4. **Build Construct**
|
||||
|
||||
### 🟢 STANDALONE BUILD PROCEDURE
|
||||
> ❗ Do not set your `--prefix` path to a directory inside your git repository or an invocation of `git clean` will erase your database in $prefix/var/db/.
|
||||
|
||||
```
|
||||
./autogen.sh
|
||||
./configure --prefix=$PWD/build
|
||||
make install
|
||||
```
|
||||
> 🛑 Any `--with-included-*` option to configure will fetch, configure **and build** the dependencies included as submodules. The result cannot be installed on the system without this repository remaining intact. Please review the special requirements first to understand which options you need or don't need on your system.
|
||||
|
||||
```
|
||||
./autogen.sh
|
||||
./configure --prefix=$HOME/construct-build
|
||||
make install
|
||||
```
|
||||
|
||||
> The `--with-included-*` will fetch, configure **and build** the dependencies included
|
||||
as submodules. The result will not be installable on the system without this repository
|
||||
remaining intact. Please read the compatibility primer first to understand which options
|
||||
you need or don't need on your system.
|
||||
|
||||
##### REBUILDING FOR UPDATES
|
||||
|
||||
|
|
Loading…
Reference in a new issue