Here are the steps I followed to build Domoticz for Raspbian stretch using a Debian workstation
Trying to compile on the Raspberry Pi fails due to insufficient RAM. The workstation has more RAM and cores for a much faster compile. sudo apt install sbuild ubuntu-dev-tools qemu-user-static binfmt-support aufs-dkms If the aufs-dkms module fails to build with dkms, obtain it from Git. For example, if running a backports kernel 4.17: mkdir -p ~/ws/aufs && cd ~/ws/aufs git clone https://salsa.debian.org/janluca-guest/aufs-debian git checkout debian/4.17+20180827-1 dpkg-buildpackage -rfakeroot -i.git -j24 -b --no-sign sudo dpkg -i ../aufs-dkms_4.17+20180827-1_amd64.deb Now the tools are ready: mk-sbuild --arch=armhf --debootstrap-no-check-gpg --debootstrap-mirror=http://archive.raspbian.org/raspbian stretch su - $USER mk-sbuild --arch=armhf --debootstrap-no-check-gpg --debootstrap-mirror=http://archive.raspbian.org/raspbian stretch mkdir -p ~/ws/domoticz cd ~/ws/domoticz wget https://archive.raspbian.org/raspbian.public.key wget https://github.com/domoticz/domoticz/archive/4.9700.tar.gz ln -s 4.9700.tar.gz domoticz_4.9700.orig.tar.gz git clone https://gitlab.com/dpocock/domoticz-debian-raspbian/ cd domoticz-debian-raspbian git checkout debian/backports/stretch sbuild -A -d stretch-armhf --host=armhf --build=armhf --extra-repository-key=`readlink -f ../raspbian.public.key` --no-apt-update --no-apt-distupgrade -j24 . To install the package on the Pi: scp ../domoticz_4.9700-1_armhf.deb raspberrypi:/root ssh pi@raspberrypi sudo dpkg -i /root/domoticz_4.9700-1_armhf.deb To install the Zigate plugin on the Pi: sudo rm /usr/sbin/plugins sudo ln -s /usr/lib/domoticz/plugins /usr/sbin/plugins (Bug workaround, or use the patch mentioned above) cd /usr/lib/domoticz/plugins git clone https://github.com/sasu-drooz/Domoticz-Zigate cd Domoticz-Zigate git checkout stable Regards, Daniel -- Debian Developer https://danielpocock.com