0

I am trying to build the hello world server and client examples for ZeroMQ for an ARM9 system.
I can build the examples, but when I try and run them zmq_connect() returns 0, but errno is set to 11, and if I call zmq_send(), set to non blocking, -1 is returned and errno is set to 11.

My toolchain is using ucLibc.

I have configured the zmq source tree with:

./configure --host=arm-linux CC=arm-unknown-linux-uclibcgnueabi-gcc CXX=arm-unknown-linux-uclibcgnueabi-g++

In the verbose from the configuration I see the following entries which concern me:

checking ifaddrs.h usability... no
checking ifaddrs.h presence... no
checking for ifaddrs.h... no
checking sys/eventfd.h usability... no
checking sys/eventfd.h presence... no
checking for sys/eventfd.h... no

If I configure for x86 the results for the above checks are "yes".

My question is how do I fix the above issues so that I can use the zero mq on my ARM9 platform?

Kind regards

Andrew Ellis

Jerry YY Rain
  • 4,134
  • 7
  • 35
  • 52
Andrew Ellis
  • 129
  • 2
  • 11
  • This is a basic cross `configure` issue. You need to point `CC` to use Linux headers by default. Ie. with `-isystem /` or something like that. Your ARM linux headers will not be in the standard locations when you cross configure and build. See the tag [tag:cross-compiling] and maybe a [search there with configure](http://stackoverflow.com/search?q=[cross-compiling]+configure). – artless noise Jun 23 '14 at 18:00
  • Thank you for your answer. I amended my configure command to: `./configure --host=arm-linux --includedir=/home/user/streamer/mozart_kernel-1.30/include CC=arm-linux-gcc CXX=arm-linux-g++` But when I run `./configure` I now get the following warnings: `configure: WARNING: ifaddrs.h: present but cannot be compiled configure: WARNING: sys/eventfd.h: present but cannot be compiled` There are more messages relating to the above, but I don't have enough room for this comment. One of my colleagues who has returned from vacation has suggested that how the toochain has not been built correctly. – Andrew Ellis Jun 24 '14 at 13:30
  • See: [ARM compiler with autoconf](http://stackoverflow.com/questions/16188228/arm-compiler-with-autoconf). This gives advice on how to read the configure logs to see exactly what is wrong. `configure` tried to compile a test file with `#include "ifaddrs.h"`, but the compile fails. You can look at the logs to find out exactly why. – artless noise Jun 24 '14 at 14:35

0 Answers0