CompilingSource

From ago control wiki
(Difference between revisions)
Jump to: navigation, search
m (Debian Testing)
(Debian Wheezy)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Development]]
 
[[Category:Development]]
 +
== Raspbian Buster ==
 +
=== Dependencies ===
 +
apt-get install quilt devscripts libudev-dev  uuid-dev  git  g++ libtinyxml2-dev libjsoncpp-dev libyaml-cpp-dev libsqlite3-dev libi2c-dev  intltool libboost-dev \
 +
libboost-date-time-dev  libhdate-dev libcurl4-openssl-dev liblua5.2-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev \
 +
libboost-program-options-dev libaugeas-dev librrd-dev libprocps-dev libcppdb-dev \
 +
python3-distutils libcppunit-dev libopencv-dev python-pytest python-augeas \
 +
knxd-dev libopenzwave1.5-dev libmosquittopp-dev
 +
 
== Debian Wheezy ==
 
== Debian Wheezy ==
 
=== Dependencies ===
 
=== Dependencies ===
 
You can use the dev packages for knx and z-wave from our mirror or compile them from source (please be aware that the bcusdk source needs tweaking for some platforms like armhf)
 
You can use the dev packages for knx and z-wave from our mirror or compile them from source (please be aware that the bcusdk source needs tweaking for some platforms like armhf)
  apt-get install quilt devscripts libudev-dev libqpidclient2-dev uuid-dev libqpidcommon2-dev libqpidmessaging2-dev \  
+
  apt-get install quilt devscripts libudev-dev libqpidclient2-dev uuid-dev libqpidcommon2-dev libqpidmessaging2-dev \
 
  git libqpidtypes1-dev g++-4.6 libtinyxml2-dev libjsoncpp-dev libyaml-cpp-dev libsqlite3-dev \
 
  git libqpidtypes1-dev g++-4.6 libtinyxml2-dev libjsoncpp-dev libyaml-cpp-dev libsqlite3-dev \
 
  libopenzwave1.0-dev libi2c-dev libeibclient-dev intltool libboost-dev libboost-date-time-dev realpath libhdate-dev libcurl4-openssl-dev liblua5.2-dev \
 
  libopenzwave1.0-dev libi2c-dev libeibclient-dev intltool libboost-dev libboost-date-time-dev realpath libhdate-dev libcurl4-openssl-dev liblua5.2-dev \
 
  ola-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev libboost-program-options-dev libaugeas-dev librrd-dev \
 
  ola-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev libboost-program-options-dev libaugeas-dev librrd-dev \
  libprocps0-dev
+
  libprocps0-dev libcppdb-dev libola-dev
  
 
=== Get the source ===
 
=== Get the source ===
Line 14: Line 22:
 
=== Select the proper branch ===
 
=== Select the proper branch ===
 
Stable releases are tagged on master. Development happens on the "develop" branch. More details are here: [[Git]]
 
Stable releases are tagged on master. Development happens on the "develop" branch. More details are here: [[Git]]
 +
cd agocontrol
 
  git checkout develop
 
  git checkout develop
  
Line 33: Line 42:
 
To clean everything execute:
 
To clean everything execute:
 
  dpkg-buildpackage -tc
 
  dpkg-buildpackage -tc
 +
 
== Debian Jessie ==
 
== Debian Jessie ==
 
=== Dependencies ===
 
=== Dependencies ===
 
You can use the dev packages for knx and z-wave from our mirror or compile them from source (please be aware that the bcusdk source needs tweaking for some platforms like armhf)
 
You can use the dev packages for knx and z-wave from our mirror or compile them from source (please be aware that the bcusdk source needs tweaking for some platforms like armhf)
  apt-get install quilt devscripts libudev-dev libqpidclient2-dev uuid-dev libqpidcommon2-dev libqpidmessaging2-dev \  
+
  apt-get install quilt devscripts libudev-dev libqpidclient2-dev uuid-dev libqpidcommon2-dev libqpidmessaging2-dev \
  git libqpidtypes1-dev g++-4.6 libtinyxml2-dev libjsoncpp-dev libyaml-cpp-dev libsqlite3-dev \
+
  git libqpidtypes1-dev g++ libtinyxml2-dev libjsoncpp-dev libyaml-cpp0.3-dev libsqlite3-dev \
 
  libopenzwave1.0-dev libi2c-dev libeibclient-dev intltool libboost-dev libboost-date-time-dev realpath libhdate-dev libcurl4-openssl-dev liblua5.2-dev \
 
  libopenzwave1.0-dev libi2c-dev libeibclient-dev intltool libboost-dev libboost-date-time-dev realpath libhdate-dev libcurl4-openssl-dev liblua5.2-dev \
 
  libola-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev libboost-program-options-dev libaugeas-dev librrd-dev \
 
  libola-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev libboost-program-options-dev libaugeas-dev librrd-dev \
  libprocps-dev
+
  libprocps-dev libcppdb-dev
  
 
== Debian Testing ==
 
== Debian Testing ==
Line 103: Line 113:
 
  rm *.deb *.changes
 
  rm *.deb *.changes
 
  mv agocontrol/debian/control agocontrol/debian/control.bak
 
  mv agocontrol/debian/control agocontrol/debian/control.bak
  cp control agocontrol/debian/control
+
  cp control agoco herentrol/debian/control
 
  mv agocontrol/devices/CMakeLists.txt agocontrol/devices/CMakeLists.txt.bak
 
  mv agocontrol/devices/CMakeLists.txt agocontrol/devices/CMakeLists.txt.bak
 
  cp CMakeLists.txt agocontrol/devices/CMakeLists.txt
 
  cp CMakeLists.txt agocontrol/devices/CMakeLists.txt
Line 117: Line 127:
 
Install it and copy your debian/control and devices/CMakeLists.txt files just before agocontrol root directory (where packages are built).
 
Install it and copy your debian/control and devices/CMakeLists.txt files just before agocontrol root directory (where packages are built).
 
Then execute this script.
 
Then execute this script.
 +
 +
== Debian Jessie as Docker container ==
 +
You can create a build environment using a Docker container, as described [[Development_environment | here]]

Latest revision as of 12:21, 3 November 2019

Contents

[edit] Raspbian Buster

[edit] Dependencies

apt-get install quilt devscripts libudev-dev  uuid-dev  git  g++ libtinyxml2-dev libjsoncpp-dev libyaml-cpp-dev libsqlite3-dev libi2c-dev  intltool libboost-dev \
libboost-date-time-dev  libhdate-dev libcurl4-openssl-dev liblua5.2-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev \
libboost-program-options-dev libaugeas-dev librrd-dev libprocps-dev libcppdb-dev \
python3-distutils libcppunit-dev libopencv-dev python-pytest python-augeas \
knxd-dev libopenzwave1.5-dev libmosquittopp-dev

[edit] Debian Wheezy

[edit] Dependencies

You can use the dev packages for knx and z-wave from our mirror or compile them from source (please be aware that the bcusdk source needs tweaking for some platforms like armhf)

apt-get install quilt devscripts libudev-dev libqpidclient2-dev uuid-dev libqpidcommon2-dev libqpidmessaging2-dev \
git libqpidtypes1-dev g++-4.6 libtinyxml2-dev libjsoncpp-dev libyaml-cpp-dev libsqlite3-dev \
libopenzwave1.0-dev libi2c-dev libeibclient-dev intltool libboost-dev libboost-date-time-dev realpath libhdate-dev libcurl4-openssl-dev liblua5.2-dev \
ola-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev libboost-program-options-dev libaugeas-dev librrd-dev \
libprocps0-dev libcppdb-dev libola-dev

[edit] Get the source

git clone http://git.agocontrol.com/agocontrol/agocontrol.git

[edit] Select the proper branch

Stable releases are tagged on master. Development happens on the "develop" branch. More details are here: Git

cd agocontrol
git checkout develop

[edit] Manual Compilation

For an out of tree build, do this:

mkdir build
cd build
cmake ..
make

If you want to specify build options, run cmake with the "-i" parameter.

If you want to compile with debug info (-g option) run "cmake -DCMAKE_BUILD_TYPE=Debug .." instead of "cmake .."

[edit] Building debian packages

Change into the git dir and run:

dpkg-buildpackage -b -uc -us

[edit] Cleaning built stuff

To clean everything execute:

dpkg-buildpackage -tc

[edit] Debian Jessie

[edit] Dependencies

You can use the dev packages for knx and z-wave from our mirror or compile them from source (please be aware that the bcusdk source needs tweaking for some platforms like armhf)

apt-get install quilt devscripts libudev-dev libqpidclient2-dev uuid-dev libqpidcommon2-dev libqpidmessaging2-dev \
git libqpidtypes1-dev g++ libtinyxml2-dev libjsoncpp-dev libyaml-cpp0.3-dev libsqlite3-dev \
libopenzwave1.0-dev libi2c-dev libeibclient-dev intltool libboost-dev libboost-date-time-dev realpath libhdate-dev libcurl4-openssl-dev liblua5.2-dev \
libola-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev libboost-program-options-dev libaugeas-dev librrd-dev \
libprocps-dev libcppdb-dev

[edit] Debian Testing

This tutorial seems to works only under AMD64.

PLEASE NOTE - This information was written before the release of jessie. It is currently untested.

[edit] Dependencies

Because libqpid is not available in testing debian repository (at least at the end of 2014), you have to add unstable packages adding this line to /etc/apt/sources.list:

deb http://ftp.fr.debian.org/debian/ unstable main non-free contrib

Then to allow installing only unstable packages manually, you need to create /etc/apt/preferences file and add these lines inside:

Package: *
Pin: release a=testing
Pin-Priority: 900

Package: *
Pin: release o=Debian
Pin-Priority: -10

Install manually qpid packages under aptitude:

libqpidclient2-dev libqpidcommon2-dev libqpidmessaging2-dev libqpidtypes1-dev libqpidclient2 libqpidcommon2 libqpidmessaging2 libqpidtypes1

And install other packages:

apt-get install quilt devscripts libudev-dev uuid-dev git g++-4.6 libtinyxml2-dev libjsoncpp-dev libyaml-cpp-dev libsqlite3-dev \
libopenzwave1.0-dev libi2c-dev libeibclient-dev intltool libboost-dev libboost-date-time-dev realpath libhdate-dev libcurl4-openssl-dev liblua5.2-dev \
ola-dev cmake libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-thread-dev libboost-program-options-dev libaugeas-dev librrd-dev

[edit] Get the source

git clone http://git.agocontrol.com/agocontrol/agocontrol.git

[edit] Select the proper branch

Stable releases are tagged on master. Development happens on the "develop" branch. More details are here: Git

git checkout develop

[edit] Manual Compilation

Before compiling, you need to update some files: In debian/control

  • Replace all 1.49 by 1.55 (currently installed libboost version)
  • Replace libyaml-cpp-dev by libyaml-cpp0.3-dev (currently installed libyaml version)
  • Replace libprocps0-dev by libprocps3-dev

Alternatively you can remove unnecessary packages to avoid their compilations:

  • debian/control
  • devices/CMakeLists.txt

For an out of tree build, do this:

mkdir build
cd build
cmake ..
make

If you want to specify build options, run cmake with the "-i" parameter.

[edit] Building debian packages

Change into the git dir and run:

dpkg-buildpackage -b -uc -us

[edit] Cleaning built stuff

To clean everything execute:

dpkg-buildpackage -tc

[edit] Helper script

This script can be helpful to automatize compilation and packages build process

rm *.deb *.changes
mv agocontrol/debian/control agocontrol/debian/control.bak
cp control agoco herentrol/debian/control
mv agocontrol/devices/CMakeLists.txt agocontrol/devices/CMakeLists.txt.bak
cp CMakeLists.txt agocontrol/devices/CMakeLists.txt
cd agocontrol/build
cmake ..
make
cd ..
dpkg-buildpackage -b -uc -us
dpkg-buildpackage -tc
cd ..
mv agocontrol/debian/control.bak agocontrol/debian/control
mv agocontrol/devices/CMakeLists.txt.bak agocontrol/devices/CMakeLists.txt

Install it and copy your debian/control and devices/CMakeLists.txt files just before agocontrol root directory (where packages are built). Then execute this script.

[edit] Debian Jessie as Docker container

You can create a build environment using a Docker container, as described here

Personal tools