Skip to content

adding perl bindings in embedded system #73

Description

@peteasa

I am using yocto to build libzmq3 and the perl bindings.

I get the following:
Probing libzmq via pkg-config ...

  • found libzmq 4.1.4
  • Detected ZMQ_INCLUDES from pkg-config...
  • Detected ZMQ_LIBS from pkg-config...
    Detected the following ZMQ settings:
  • ZMQ_HOME = (null)
  • ZMQ_H = (null)
  • ZMQ_INCLUDES =
  • ZMQ_LIBS = -lzmq
  • ZMQ_TRACE = (null)

Looks like ZMQ_INCLUDES is not found from the libzmq.pc package file.. but that file looks ok:
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: libzmq
Description: 0MQ c++ library
Version: 4.1.4
Libs: -L${libdir} -lzmq
Cflags: -I${includedir}

Anyway I fixed this in yocto by exporting the export ZMQ_INCLUDES location and that works but I still get a failure:
| Probing environment variables:
| Alien::ZMQ not found
| Probing libzmq via pkg-config ...
| + found libzmq 4.1.4
| + Detected ZMQ_LIBS from pkg-config...
| Detected the following ZMQ settings:
| + ZMQ_HOME = (null)
| + ZMQ_H = (null)
| + ZMQ_INCLUDES = /usr/include
| + ZMQ_LIBS = -lzmq
| + ZMQ_TRACE = (null)
| *** Module name IN: /usr/lib/perl/5.22.1/IO.pm
| *** p1: /usr/lib/ p3: perl/5.22.1/ p5: IO.pm
| *** Module name OUT: /usr/lib/perl-native/perl/5.22.1/IO.pm
| # arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/ -O2 -pipe -g -feliminate-unused-debug-types -DDEBIAN -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc assertlibM2QiFoty.c -I/usr/include -o assertlibtlHxWLPE
| # arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/ -O2 -pipe -g -feliminate-unused-debug-types -DDEBIAN -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc assertlibipzhaFu0.c -o assertlibhIw7zwaM -I/usr/include -lzmq
| assertlibhIw7zwaM: assertlibhIw7zwaM: cannot execute binary file
| wrong result: 'zmq'

Anyway I tried to build on the target and I get other errors towards the end of the make process:
CHECK: Does your zmq have zmq_ctx_new... YES
Checking if your kit is complete...
Looks good
Warning: prerequisite Task::Weaken 0 not found.
Warning: prerequisite Test::Fatal 0 not found.
Warning: prerequisite Test::Requires 0 not found.
Warning: prerequisite Test::TCP 1.08 not found.
Warning: prerequisite ZMQ::Constants 0 not found.
ExtUtils::MM_Unix::tool_xsubpp : Can't find xsubpp at /usr/lib/perl/5.22.1/ExtUtils/MM_Unix.pm line 3578.

Any assistance or pointers to others who have used yocto and libzmq3 would be much appreciated. Looks like this is a bigger job than I expected!

Peter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions