Code: Select all
git clone https://github.com/domoticz/domoticz.git dev-domoticz
cd dev-domoticz
#
# Update to latest
#
git pull
#
# -DUSE_OPENSSL_STATIC="NO" because of problem with Evohome API
#
cmake -DUSE_OPENSSL_STATIC="NO" -DCMAKE_BUILD_TYPE=Beta CMakeLists.txt
#
# Twice because of strange version number after first time
#
cmake -DUSE_OPENSSL_STATIC="NO" -DCMAKE_BUILD_TYPE=Beta CMakeLists.txt
#
# to minimize amount of memory for GPU
#
raspi-config
shutdown -r
#
# Free up memory as much as possible
#
fail2ban-client quit
#
# setup zram
#
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
echo 536870912 >/sys/devices/virtual/block/zram0/mem_limit
echo 1073741824 >/sys/devices/virtual/block/zram0/disksize
mkswap /dev/zram0
swapon -p 0 /dev/zram0
sysctl vm.swappiness=80
#
# attempt one
#
cd dev-domoticz
make
#
# attempt two because first one fails at the link step (use one CPU)
#
rm domoticz // sometimes file exist with size 0
make -j1
This works and give me a working executable with working Python plugins and working Evohome. Probably because of the static linked libraries the size of the executable is about twice the size of the precompiled version.
One thing that does not work, is to compile with the debug option and that's one of the reasons I am very much interested in better ways to compile with this limited amount of memory.
Hope other forum members with same setup can share how they compile.