Browse Source

reordered unix targeted documentation to be more user-friendly

Also fixed wrong build root.
pull/321/head
scrrrapy 9 years ago
parent
commit
3acc244692
  1. 114
      docs/build_notes_unix.md

114
docs/build_notes_unix.md

@ -1,46 +1,60 @@
Building on Unix systems Building on Unix systems
============================= =============================
Common build/install process from sources: First of all we need to make sure that all dependencies are satisfied.
* git clone https://github.com/PurpleI2P/i2pd.git This doc is trying to cover:
* mkdir -p 'i2pd/build/tmp' && cd 'i2pd/build/tmp' * [Debian/Ubuntu](#debianubuntu) (contains packaging instructions)
* cmake -DCMAKE_BUILD_TYPE=Release <more options> .. * [FreeBSD](#freebsd)
* make
* make install
Available cmake options: Make sure you have all required dependencies for your system successfully installed.
* CMAKE_BUILD_TYPE -- build profile (Debug/Release) If so then we are ready to go!
* WITH_AESNI -- AES-NI support (ON/OFF) Let's clone the repository and start building the i2pd:
* WITH_HARDENING -- enable hardening features (ON/OFF) (gcc only) ```bash
* WITH_BINARY -- build i2pd itself git clone https://github.com/PurpleI2P/i2pd.git
* WITH_LIBRARY -- build libi2pd cd i2pd/build
* WITH_STATIC -- build static versions of library and i2pd binary cmake -DCMAKE_BUILD_TYPE=Release # more options could be passed, see "CMake Options"
* WITH_UPNP -- build with UPnP support (requires libupnp) make
* WITH_PCH -- use pre-compiled header (experimental, speeds up build) ```
After successfull build i2pd could be installed with:
```bash
make install
```
Debian/Ubuntu Debian/Ubuntu
------------- -------------
For building from source on debian system you will need the following "-dev" packages: You will need a compiler and other tools that could be installed with `build-essential` package:
```bash
* libboost-chrono-dev sudo apt-get install build-essential
* libboost-date-time-dev ```
* libboost-filesystem-dev
* libboost-program-options-dev Also you will need a bunch of development libraries:
* libboost-regex-dev ```bash
* libboost-system-dev sudo apt-get install \
* libboost-thread-dev libboost-chrono-dev \
* libssl-dev (e.g. openssl) libboost-date-time-dev \
* zlib1g-dev (libssl-dev already depends on it) libboost-filesystem-dev \
* libminiupnpc-dev (optional, if WITH_UPNP=ON) libboost-program-options-dev \
libboost-regex-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: You may also build deb-package with the following:
```bash
apt-get install build-essential fakeroot devscripts sudo apt-get install fakeroot devscripts
cd i2pd cd i2pd
debuild --no-tgz-check # building from git repo debuild --no-tgz-check
```
FreeBSD FreeBSD
------- -------
@ -49,17 +63,35 @@ Branch 9.X has gcc v4.2, that knows nothing about required c++11 standart.
Required ports: Required ports:
* devel/cmake * `devel/cmake`
* devel/boost-libs * `devel/boost-libs`
* lang/gcc47 # or later version * `lang/gcc47`(or later version)
To use newer compiler you should set these variables:
export CC=/usr/local/bin/gcc47 To use newer compiler you should set these variables(replace "47" with your actual gcc version):
export CXX=/usr/local/bin/g++47 ```bash
export CC=/usr/local/bin/gcc47
Replace "47" with your actual gcc version export CXX=/usr/local/bin/g++47
```
Branch 10.X has more reliable clang version, that can finally build i2pd, Branch 10.X has more reliable clang version, that can finally build i2pd,
but i still recommend to use gcc, otherwise you will fight it's bugs by but I still recommend to use gcc, otherwise you will fight it's bugs by
your own. your own.
CMake Options
-------------
Available CMake options(each option has a for of `<key>=<value>`, for more information see `man 1 cmake`):
* `CMAKE_BUILD_TYPE` build profile (Debug/Release)
* `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_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
```

Loading…
Cancel
Save