Cross-compiling Domoticz? Topic is solved
Moderator: leecollings
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Cross-compiling Domoticz?
Has anybody been working on cross-compiling Domoticz for Raspberry on Linux on Intel hardware?
The reason why I'm asking is that there are free cloud build services, and we've been working with gizmocuz to have Domoticz built automatically from the Github repository. This now works for win32 and linux x86_64 builds, but it would be nice to have Raspberry supported as well (as well as other Arm-based devices). Meanwhile, I'll try to look what scaleway.com could do for us.
The reason why I'm asking is that there are free cloud build services, and we've been working with gizmocuz to have Domoticz built automatically from the Github repository. This now works for win32 and linux x86_64 builds, but it would be nice to have Raspberry supported as well (as well as other Arm-based devices). Meanwhile, I'll try to look what scaleway.com could do for us.
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Cross-compiling Domoticz?
Did you try to do this using Docker.
Here http://kitware.com/blog/home/post/887 is a good start.
Here http://kitware.com/blog/home/post/887 is a good start.
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
Thanks, this is a really good pointer. travis-ci.org natively supports Docker images, so all this needs now is some time, coffee and Dr. Pepper. The goal is to make a new 'bleeding edge' build available for all supported platforms within some 30 minutes from a push to Github, and also to automatically build all pull requests.
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
OK, I now have Ubuntu 12.04 LTS running on VirtualBox (the same Ubuntu version as in Travis-CI), and I have Docker and Docker image thewtex/cross-compiler-linux-armv6 installed... So some progress, the next thing is to figure out what to feed to cmake to make it work. The ability to snapshot the virtual machine is really handy in this kind of work
Oops - no problem, just restore to the last known good snapshot and boot again.

-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
Some progress... Travis-CI now builds for Linux AMD64 and OSX, and on my own development branch I also have a third target, ARMv6 using Docker with thewtex/cross-compiler-linux-armv6. It does not compile anything yet, but yesterday I almost got the OpenZWave part built (it compiles, but fails on the link phase due to missing libudev.so.1). Still trying to figure out the proper way to install libudev-dev and libboost-all-dev for the armhf architecture for cross-compilation.
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
OK, first step done. I still didn't figure out how to install the needed 'dev' library dependencies (libudev-dev, libboost-all-dev, libusb-dev etc) into the cross-compile environment. But building on a Raspberry QEMU Docker container works (I'm using the philipz/rpi-raspbian Docker image). The only downside is that it takes close to 4 hours on my old laptop (Intel Core 2 DUO T7500 @ 2.20 GHz). Even if the Travis-CI machines would be 10 times faster (which I doubt is not the case), it would still be too slow. But at least there's now a starting point.
-
- Posts: 7
- Joined: Saturday 04 July 2015 20:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
I've been trying tu use distcc to cross-compile domoticz for armv6h in a x64 environment, but I've had no luck so far.
It fails to compile remotely. Both systems runs arch linux up to date, and gcc versions are the same, it's odd.
Anyway, this approach is probably much easier to set up. No virtualization needed.
By the way, I don't think RPi takes 4 hours to compile domoticz. How come a Core 2 Duo takes that time? Did you compile with just one thread?
It fails to compile remotely. Both systems runs arch linux up to date, and gcc versions are the same, it's odd.
Anyway, this approach is probably much easier to set up. No virtualization needed.
By the way, I don't think RPi takes 4 hours to compile domoticz. How come a Core 2 Duo takes that time? Did you compile with just one thread?
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
This was full virtualization. So an emulated Raspberry Pi on QEMU, building on emulated C++ compiler. No wonder it's slow.ViperScull wrote:By the way, I don't think RPi takes 4 hours to compile domoticz. How come a Core 2 Duo takes that time? Did you compile with just one thread?
Now I have the 'buildroot' environment cooking. Maybe that could finally do it...
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
I actually managed to create a Docker container with 'buildroot', so that Domoticz could be cross-compiled on Ubuntu (on Intel hardware) for Raspberry Pi. I think the same would be possible for Synology as well.
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
Are you cross-compiling, are compiling remotely on the target machine? I guess the latter...
- nayr
- Posts: 354
- Joined: Tuesday 11 November 2014 18:42
- Target OS: Linux
- Domoticz version: github
- Location: Denver, CO - USA
- Contact:
Re: Cross-compiling Domoticz?
takes me about 30mins to directly compile from scratch on my CuBox.. might just get your self an arm build box, my buddy maintains the package repo for Arch Linux Arm and he just does remote builds on a farm of native build boxes with NFS mounts.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
-
- Posts: 66
- Joined: Monday 20 July 2015 14:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
Nicegordonb3 wrote:No. I'm cross-compiling.

- nayr
- Posts: 354
- Joined: Tuesday 11 November 2014 18:42
- Target OS: Linux
- Domoticz version: github
- Location: Denver, CO - USA
- Contact:
Re: Cross-compiling Domoticz?
yes I am.. and to prove it I cloned a whole new path and built it just for you:
I usually start watching a TV show when I kick off a full build.. at about 40mins for an hour episode w/out commercials it works pretty well.. I do alot of code hacking on Domoticz and there are a few files (mainworker.cpp for example) that will trigger a full rebuild if with the slightest alteration... if it took 2.5h I would not even bother wasting my time.
CuBox is an IMX6 Quad Core w/2GB ram and an eSata drive.. the bus speeds top out at about 500Mbps so IO access is pretty snappy.
Code: Select all
Linking CXX executable domoticz
[100%] Built target domoticz
real 35m23.989s
CuBox is an IMX6 Quad Core w/2GB ram and an eSata drive.. the bus speeds top out at about 500Mbps so IO access is pretty snappy.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
- nayr
- Posts: 354
- Joined: Tuesday 11 November 2014 18:42
- Target OS: Linux
- Domoticz version: github
- Location: Denver, CO - USA
- Contact:
Re: Cross-compiling Domoticz?
this isint passively cooled? news to me.. wonder where they put a fan



Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
- nayr
- Posts: 354
- Joined: Tuesday 11 November 2014 18:42
- Target OS: Linux
- Domoticz version: github
- Location: Denver, CO - USA
- Contact:
Re: Cross-compiling Domoticz?
I dont get why your running Gentoo on such an underpowered machine without a proper build box, my performance is not staggering.. I hear the Raspberry PI#2 gets similar build times.. perhaps you should look running on something a bit newer than armv5? even my $35 beaglebones are armv7
I am here because I tried the cross compile thing for a while and found it a huge hassle loaded with issues, as I got more devices I was seeking help from my friend @ArchLinux on cross-compiling thats when he showed me a bunch of cheap arm platforms that would shred the build times I was seeing on the FPU crippled armv5 and lowly armv7's.. it was good advice I am just trying to share.. I still have some armv5 pogoplugs in operation and I am glad I never have to build on em.
I am here because I tried the cross compile thing for a while and found it a huge hassle loaded with issues, as I got more devices I was seeking help from my friend @ArchLinux on cross-compiling thats when he showed me a bunch of cheap arm platforms that would shred the build times I was seeing on the FPU crippled armv5 and lowly armv7's.. it was good advice I am just trying to share.. I still have some armv5 pogoplugs in operation and I am glad I never have to build on em.
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
-
- Posts: 22
- Joined: Tuesday 07 February 2017 21:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Cross-compiling Domoticz?
I compiled Buildroot with Domoticz and although the system works the domoticz version is 4.5876 and not 4.9700.
System configuration:
- Target Architecture ARM (Raspberry Pi3)
- Build Option raspberrypi3_defconfig
- OpenZwave and all the other dependencies
The files downloaded to the buildroot/dl/domoticz is domoticz-4.9700.tar.gz
The system will not update from the Setup-Check for Updates.
Any suggestion why I am getting a wrong revision of Domoticz?
Thanks,
AlleyCat
System configuration:
- Target Architecture ARM (Raspberry Pi3)
- Build Option raspberrypi3_defconfig
- OpenZwave and all the other dependencies
The files downloaded to the buildroot/dl/domoticz is domoticz-4.9700.tar.gz
The system will not update from the Setup-Check for Updates.
Any suggestion why I am getting a wrong revision of Domoticz?
Thanks,
AlleyCat
-
- Posts: 111
- Joined: Saturday 31 March 2018 22:24
- Target OS: Linux
- Domoticz version: Custom
- Location: Delft, NL
- Contact:
Re: Cross-compiling Domoticz?
The problem is that the tarball you downloaded does not contain the git repository and the versioning procedure in cmake falls back to the information in appversion.default. Which is set to display sub version 5876.
Who is online
Users browsing this forum: Google [Bot] and 1 guest