Leosac
0.8.0
Open Source Access Control
|
Describe how to build Leosac from source.
This guide is intended to be used on Debian Bullseye with amd64 architecture or Raspbian Stretch with armv6/armv7/arm64 architecture. While not quite as slow as building Leosac into a deb package, this method can still takes hours to complete when building natively on a Raspberry Pi.
You will need a working Linux environment and the following packages:
Such dependencies need to be installed:
Note: Make sure g++ --version
shows at least 4.8. You can use the update-alternative
command on Debian to set the default version of gcc/g++
.
Clone the repo and peform a legacy make install from-source:
libzmq
and zmqpp
are bundled with the project (using git submodules).
CMake takes care of the build process, here's a minimal procedure to compile Leosac:
If you have difficulties building libzmq, install it from debian repository instead.
* `LEOSAC_GPROF`: CMake will add [GNU Gprof](https://en.wikipedia.org/wiki/Gprof) compilation/linking flags. This flag is for debugging purpose only and should be coupled with `-DCMAKE_BUILD_TYPE=Debug` * `LEOSAC_BUILD_MODULES`: Unset this flag if you don't want CMake to build Leosac modules.
Leosac is now installed on your system, but there are couple of additional tasks you should perform.
Edit the leosac service file, changing /usr/bin/leosac
to /usr/local/bin/leosac
, then copy it into place:
vi/gedit ../pkg/debian/leosac.service
sudo cp ../pkg/debian/leosac.service /etc/systemd/system
Finally, before you can start Leosac, you need to create a kernel.xml file. See the installation guide.
distcc is a powerful tool that allows cross-compilation in a distributed manner. It is strongly recommended to setup distcc when developing leosac if you're building directly on raspberry-like hardware because standard ARM boards are very slow in the compilation stage.
A proper setup with a standard x86/x64 machine can easily speed up the process by a factor of ten.