mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
* build docs : markdown cleanup & reformatting
This commit is contained in:
parent
8e1687e7b3
commit
890807b8d7
5 changed files with 278 additions and 320 deletions
|
@ -4,129 +4,34 @@ Building on Unix systems
|
|||
First of all we need to make sure that all dependencies are satisfied.
|
||||
|
||||
This doc is trying to cover:
|
||||
|
||||
* [Debian/Ubuntu](#debian-ubuntu) (contains packaging instructions)
|
||||
* [Fedora/Centos](#fedora-centos)
|
||||
* [Fedora/Centos](#mac-os-x)
|
||||
* [FreeBSD](#freebsd)
|
||||
|
||||
Make sure you have all required dependencies for your system successfully installed.
|
||||
See [this](requirements.md) page for common requirements.
|
||||
|
||||
If so then we are ready to go!
|
||||
Let's clone the repository and start building the i2pd:
|
||||
```bash
|
||||
git clone https://github.com/PurpleI2P/i2pd.git
|
||||
cd i2pd/build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release # more options could be passed, see "CMake Options"
|
||||
make # you may add VERBOSE=1 to cmdline for debugging
|
||||
```
|
||||
|
||||
git clone https://github.com/PurpleI2P/i2pd.git
|
||||
|
||||
Generic build process looks like this (with cmake):
|
||||
|
||||
cd i2pd/build
|
||||
cmake <cmake options> . # see "CMake Options" section below
|
||||
make # you may add VERBOSE=1 to cmdline for debugging
|
||||
|
||||
..or with quick-and-dirty way with just make:
|
||||
|
||||
cd i2pd/
|
||||
make
|
||||
|
||||
After successfull build i2pd could be installed with:
|
||||
```bash
|
||||
make install
|
||||
```
|
||||
or you can just use 'make' once you have all dependencies (boost and openssl) installed
|
||||
|
||||
```bash
|
||||
git clone https://github.com/PurpleI2P/i2pd.git
|
||||
cd i2pd
|
||||
make
|
||||
```
|
||||
|
||||
Debian/Ubuntu
|
||||
-------------
|
||||
|
||||
You will need a compiler and other tools that could be installed with `build-essential` package:
|
||||
```bash
|
||||
sudo apt-get install build-essential
|
||||
```
|
||||
|
||||
Also you will need a bunch of development libraries:
|
||||
```bash
|
||||
sudo apt-get install \
|
||||
libboost-chrono-dev \
|
||||
libboost-date-time-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-system-dev \
|
||||
libboost-thread-dev \
|
||||
libssl-dev
|
||||
```
|
||||
|
||||
If you need UPnP support (don't forget to run CMake with `WITH_UPNP=ON`) miniupnpc development library should be installed:
|
||||
```bash
|
||||
sudo apt-get install libminiupnpc-dev
|
||||
```
|
||||
|
||||
You may also build deb-package with the following:
|
||||
```bash
|
||||
sudo apt-get install fakeroot devscripts
|
||||
cd i2pd
|
||||
debuild --no-tgz-check
|
||||
```
|
||||
|
||||
Fedora/Centos
|
||||
-------------
|
||||
|
||||
You will need a compiler and other tools to perform a build:
|
||||
```bash
|
||||
sudo yum install make cmake gcc gcc-c++
|
||||
```
|
||||
|
||||
*Latest Fedora system using [DNF](https://en.wikipedia.org/wiki/DNF_(software)) instead of YUM by default, you may prefer to use DNF, but YUM should be ok*
|
||||
|
||||
Also you will need a bunch of development libraries
|
||||
```bash
|
||||
sudo yum install boost-devel openssl-devel
|
||||
```
|
||||
|
||||
If you need UPnP support (don't forget to run CMake with `WITH_UPNP=ON`) miniupnpc development library should be installed:
|
||||
```bash
|
||||
miniupnpc-devel
|
||||
```
|
||||
> *Centos 7 has CMake 2.8.11 in the official repositories that too old to build i2pd, CMake >=2.8.12 is required.*
|
||||
>
|
||||
> But you can use cmake3 from the epel repository:
|
||||
> ```bash
|
||||
> yum install epel-release -y
|
||||
> yum install make cmake3 gcc gcc-c++ miniupnpc-devel boost-devel openssl-devel -y
|
||||
> cmake3 -DWITH_LIBRARY=OFF -DWITH_UPNP=ON -DWITH_HARDENING=ON -DBUILD_SHARED_LIBS:BOOL=OFF
|
||||
> make
|
||||
> ```
|
||||
|
||||
MAC OS X
|
||||
--------
|
||||
|
||||
Requires [homebrew](http://brew.sh/)
|
||||
|
||||
```bash
|
||||
brew install libressl boost
|
||||
```
|
||||
|
||||
Then build:
|
||||
```bash
|
||||
make HOMEBREW=1
|
||||
```
|
||||
|
||||
|
||||
FreeBSD
|
||||
-------
|
||||
|
||||
For 10.X use clang. You would also need boost and openssl ports.
|
||||
Type gmake, it invokes Makefile.bsd, make necessary changes there is required.
|
||||
|
||||
Branch 9.X has gcc v4.2, that knows nothing about required c++11 standart.
|
||||
|
||||
Required ports:
|
||||
|
||||
* `devel/cmake`
|
||||
* `devel/boost-libs`
|
||||
* `lang/gcc47`(or later version)
|
||||
|
||||
To use newer compiler you should set these variables(replace "47" with your actual gcc version):
|
||||
```bash
|
||||
export CC=/usr/local/bin/gcc47
|
||||
export CXX=/usr/local/bin/g++47
|
||||
```
|
||||
make install
|
||||
|
||||
CMake Options
|
||||
-------------
|
||||
|
@ -137,12 +42,94 @@ Available CMake options(each option has a form of `<key>=<value>`, for more info
|
|||
* `WITH_BINARY` build i2pd itself
|
||||
* `WITH_LIBRARY` build libi2pd
|
||||
* `WITH_STATIC` build static versions of library and i2pd binary
|
||||
* `WITH_UPNP` build with UPnP support (requires libupnp)
|
||||
* `WITH_AESNI` build with AES-NI support (ON/OFF)
|
||||
* `WITH_UPNP` build with UPnP support (requires libminiupnp)
|
||||
* `WITH_AESNI` build with AES-NI support (ON/OFF)
|
||||
* `WITH_HARDENING` enable hardening features (ON/OFF) (gcc only)
|
||||
* `WITH_PCH` use pre-compiled header (experimental, speeds up build)
|
||||
|
||||
Also there is `-L` flag for CMake that could be used to list current cached options:
|
||||
```bash
|
||||
cmake -L
|
||||
```
|
||||
|
||||
cmake -L
|
||||
|
||||
Debian/Ubuntu
|
||||
-------------
|
||||
|
||||
You will need a compiler and other tools that could be installed with `build-essential` package:
|
||||
|
||||
sudo apt-get install build-essential
|
||||
|
||||
Also you will need a bunch of development libraries:
|
||||
|
||||
sudo apt-get install \
|
||||
libboost-chrono-dev \
|
||||
libboost-date-time-dev \
|
||||
libboost-filesystem-dev \
|
||||
libboost-program-options-dev \
|
||||
libboost-system-dev \
|
||||
libboost-thread-dev \
|
||||
libssl-dev
|
||||
|
||||
If you need UPnP support miniupnpc development library should be installed (don't forget to rerun CMake with needed option):
|
||||
|
||||
sudo apt-get install libminiupnpc-dev
|
||||
|
||||
You may also build deb-package with the following:
|
||||
|
||||
sudo apt-get install fakeroot devscripts
|
||||
cd i2pd
|
||||
debuild --no-tgz-check
|
||||
|
||||
Fedora/Centos
|
||||
-------------
|
||||
|
||||
You will need a compiler and other tools to perform a build:
|
||||
|
||||
sudo yum install make cmake gcc gcc-c++
|
||||
|
||||
Also you will need a bunch of development libraries
|
||||
|
||||
sudo yum install boost-devel openssl-devel
|
||||
|
||||
If you need UPnP support miniupnpc development library should be installed (don't forget to rerun CMake with needed option):
|
||||
|
||||
sudo yum install miniupnpc-devel
|
||||
|
||||
Latest Fedora systems using [DNF](https://en.wikipedia.org/wiki/DNF_(software)) instead of YUM by default, you may prefer to use DNF, but YUM should be ok
|
||||
|
||||
Centos 7 has CMake 2.8.11 in the official repositories that too old to build i2pd, CMake >=2.8.12 is required.
|
||||
But you can use cmake3 from the epel repository:
|
||||
|
||||
yum install epel-release -y
|
||||
yum install make cmake3 gcc gcc-c++ miniupnpc-devel boost-devel openssl-devel -y
|
||||
|
||||
...and then use 'cmake3' instead 'cmake'.
|
||||
|
||||
MAC OS X
|
||||
--------
|
||||
|
||||
Requires [homebrew](http://brew.sh)
|
||||
|
||||
brew install boost libressl
|
||||
|
||||
Then build:
|
||||
|
||||
make HOMEBREW=1
|
||||
|
||||
FreeBSD
|
||||
-------
|
||||
|
||||
For 10.X use clang. You would also need devel/boost-libs, security/openssl and devel/gmake ports.
|
||||
Type gmake, it invokes Makefile.bsd, make necessary changes there is required.
|
||||
|
||||
Branch 9.X has gcc v4.2, that is too old (not supports -std=c++11)
|
||||
|
||||
Required ports:
|
||||
|
||||
* `devel/cmake`
|
||||
* `devel/boost-libs`
|
||||
* `lang/gcc47`(or later version)
|
||||
|
||||
To use newer compiler you should set these variables(replace "47" with your actual gcc version):
|
||||
|
||||
export CC=/usr/local/bin/gcc47
|
||||
export CXX=/usr/local/bin/g++47
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue