c++embedded-linuxcapnproto

Failed to build capnproto on ARM, test failed


I am trying to build capnproto library for linux arm machine using arm-linux-gnueabihf-clang++ and it builds correctly but because tests is a part of a build it fails to finish build because i am building it on x64 machine for arm platform and capn binary cannot be started on x64 machine because it is compiled for arm. I was searching for similar problem and found that when you use make command you should not write make -j6 check but simply make , but this didn't help and using --with-external-capnp flag also didn't help. So the question is how to prevent running tests during the build.


Solution

  • When cross-compiling, you need to first build and install Cap'n Proto on the host machine, so that the commands capnp and capnpc-c++ are available on the command line.

    Once you've done that, you can cross-compile. Pass --with-external-capnp to ./configure when configuring cross-compiling, to tell it to use the installed copy of the tools rather than the self-built copy. Also make sure you make clean or build in a different directory so that the build doesn't accidentally try to use the host-built objects.

    If this "doesn't help", you'll need to provide more detail on what you're doing and what went wrong.