You are not logged in.
Not sure where to post this question, but it seems to be x-compile @ arch or cmake related?
I'm trying to cross compile domoticz for rpi and installed the arm-linux-gnueabihf (from aur) for that.
I made a toolchain file for cmake according to the cmake instructions which seems to largely work.
However, I get errors that seem to be related to include files from the toolchain pulling in system includes, apparently leading to type mismatches:
[ 4%] Building C object lua/src/CMakeFiles/lua.dir/lmathlib.c.o
In file included from /usr/include/wchar.h:30:0,
from /usr/arm-linux-gnueabihf/include/c++/7.2.0/cwchar:44,
from /usr/arm-linux-gnueabihf/include/c++/7.2.0/bits/postypes.h:40,
from /usr/arm-linux-gnueabihf/include/c++/7.2.0/bits/char_traits.h:40,
from /usr/arm-linux-gnueabihf/include/c++/7.2.0/string:40,
from /media/NoBackup/Software/Linux/rpi/domoticz/main/stdafx.h:17:
/usr/include/bits/floatn.h:61:70: error: unknown machine mode '__TC__'
typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__)));
^
/usr/include/bits/floatn.h:73:9: error: '__float128' does not name a type; did you mean '__cfloat128'?
typedef __float128 _Float128;
^~~~~~~~~~
__cfloat128I get many errors of the same kind after this. I checked, and I do have the file
/usr/arm-linux-gnueabihf/include/wchar.hand the
/usr/arm-linux-gnueabihf/include/bits/*files so there should be no reason to get the wrong include from the system dir?
To try tweaking this I even added the following to CMakeLists.txt:
include_directories(BEFORE /usr/arm-linux-gnueabihf/include)but it doesn't help.
Any ideas? TIA!
Offline
I'm trying to cross compile domoticz for rpi and installed the arm-linux-gnueabihf (from aur) for that.
The problem is the toolchain you're using in my view. Use the official Arch ARM toolchain in distccd-alarm ... compiles without error for me:
% makepkg -s
==> Making package: domoticz 3.8153-2 (Sun Apr 15 16:40:03 UTC 2018)
==> Checking runtime dependencies...
==> Installing missing dependencies...
...
==> Creating package "domoticz"...
-> Generating .PKGINFO file...
-> Generating .BUILDINFO file...
-> Adding install file...
-> Generating .MTREE file...
-> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: domoticz 3.8153-2 (Sun Apr 15 16:54:37 UTC 2018)Offline
Thanks for the info, but I'm trying to avoid using distcc in this case since it will require me to install th build-time dependencies on the target (rpi zero w) which I want to keep lean. I also wanted to take the opportunity to do real cross compilation to be able to build different architectures on the same host.
Can I use the toolchain you mentioned stand alone or only using distcc?
Offline