0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-21 17:31:21 +01:00

Updated BUILD (markdown)

Jason Volk 2020-10-02 02:05:44 -07:00
parent cadcee0d53
commit ed20342092

@ -1,73 +1,57 @@
# BUILD # BUILD
##### Compatibility Primer 1. **Fetch dependencies**
This section is intended to allow building with dependencies that have not - Ubuntu Cosmic (18.10) through Focal (20.04):
made their way to mainstream systems. Important notes that may affect you: ```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 : 2. **Review special requirements for platforms and packages**
- **lz4** for database compression: `liblz4-dev`
- **GraphicsMagick** for media thumbnails: `libgraphicsmagick1-dev`
- **jemalloc** for dynamic memory: `libjemalloc-dev`
- **ICU** for unicode tools: `libicu-dev`
- Boost: The required version is available through `apt` as `libboost-all-dev` on 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.
Ubuntu Cosmic (18.10). All earlier releases (including 18.04 LTS) can configure
with `--with-included-boost` as instructed below.
- 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 git submodule update --init deps/rocksdb
distribution's package system. You do not have to build the source, but it must cd deps/rocksdb
be available. ALL UBUNTU USERS MUST BUILD THE SOURCE AS WELL (SKIP TO NEXT BULLET). git fetch --tags --force
git checkout v5.17.2
```
> 👉 For best performance and stability, please check for the version available on > 👉 For best performance and stability, please check for the version available on
your system and match that with the `git checkout` command below. your system and match that with the `git checkout` command above.
```
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.
- 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 > Ubuntu builds their library with `-Bsymbolic-functions`. This conflicts with
the requirements of Construct's embedding. 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/`. especially for development. Example `--prefix=~/.local/`.
- Binary executable `$prefix/bin/construct` - Binary executable `$prefix/bin/construct`
- Shared library `$prefix/lib/libircd.so` - Shared library `$prefix/lib/libircd.so`
- Shared library modules `$prefix/lib/modules/construct/*.so` - Shared library modules `$prefix/lib/modules/construct/*.so`
- Header files `$prefix/include/ircd/*` - Header files `$prefix/include/ircd/*`
- Read-only shared assets `$prefix/share/construct/*` - Read-only shared assets `$prefix/share/construct/*`
- Database directory may be established at `$prefix/var/db/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/.
``` > 🛑 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=$PWD/build ```
make install ./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 ##### REBUILDING FOR UPDATES