Skip Menu |

This queue is for tickets about the ZMQ-LibZMQ4 CPAN distribution.

Report information
The Basics
Id: 122932
Status: new
Priority: 0/
Queue: ZMQ-LibZMQ4

People
Owner: Nobody in particular
Requestors: hjp [...] hjp.at
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Could not find a typemap for C type 'P5ZMQ4_Context *' with ZMQ 4.2.1
Date: Thu, 31 Aug 2017 14:13:14 +0200
To: bug-ZMQ-LibZMQ4 [...] rt.cpan.org
From: "Peter J. Holzer" <hjp [...] hjp.at>
I am trying to build ZMQ-LibZMQ4 0.01 on Debian 9, which comes with Perl 5.24.1 and ZMQ 4.2.1: 'perl Makefile.PL' finishes successfully, but make fails with: cp lib/ZMQ/LibZMQ4.pm blib/lib/ZMQ/LibZMQ4.pm Running Mkbootstrap for ZMQ::LibZMQ4 () chmod 644 "LibZMQ4.bs" "/usr/bin/perl" "-Iinc" "/usr/share/perl/5.24/ExtUtils/xsubpp" -typemap "/usr/share/perl/5.24/ExtUtils/typemap" xs/perl_libzmq4.xs > xs/perl_libzmq4.xsc && mv xs/perl_libzmq4.xsc xs/perl_libzmq4.c Could not find a typemap for C type 'P5ZMQ4_Context *'. The following C types are mapped by the current typemap: 'AV *', 'Boolean', 'CV *', 'FILE *', 'FileHandle', 'HV *', 'I16', 'I32', 'I8', 'IV', 'InOutStream', 'InputStream', 'NV', 'OutputStream', 'PerlIO *', 'Result', 'STRLEN', 'SV *', 'SVREF', 'SysRet', 'SysRetLong', 'Time_t *', 'U16', 'U32', 'U8', 'UV', 'bool', 'bool_t', 'caddr_t', 'char', 'char *', 'char **', 'const char *', 'double', 'float', 'int', 'long', 'short', 'size_t', 'ssize_t', 'time_t', 'unsigned', 'unsigned char', 'unsigned char *', 'unsigned int', 'unsigned long', 'unsigned long *', 'unsigned short', 'void *', 'wchar_t', 'wchar_t *' in perl_libzmq4.xs, line 427 Could not find a typemap for C type 'P5ZMQ4_Context *'. The following C types are mapped by the current typemap: 'AV *', 'Boolean', 'CV *', 'FILE *', 'FileHandle', 'HV *', 'I16', 'I32', 'I8', 'IV', 'InOutStream', 'InputStream', 'NV', 'OutputStream', 'PerlIO *', 'Result', 'STRLEN', 'SV *', 'SVREF', 'SysRet', 'SysRetLong', 'Time_t *', 'U16', 'U32', 'U8', 'UV', 'bool', 'bool_t', 'caddr_t', 'char', 'char *', 'char **', 'const char *', 'double', 'float', 'int', 'long', 'short', 'size_t', 'ssize_t', 'time_t', 'unsigned', 'unsigned char', 'unsigned char *', 'unsigned int', 'unsigned long', 'unsigned long *', 'unsigned short', 'void *', 'wchar_t', 'wchar_t *' in perl_libzmq4.xs, line 460 Could not find a typemap for C type 'P5ZMQ4_Context *'. The following C types are mapped by the current typemap: 'AV *', 'Boolean', 'CV *', 'FILE *', 'FileHandle', 'HV *', 'I16', 'I32', 'I8', 'IV', 'InOutStream', 'InputStream', 'NV', 'OutputStream', 'PerlIO *', 'Result', 'STRLEN', 'SV *', 'SVREF', 'SysRet', 'SysRetLong', 'Time_t *', 'U16', 'U32', 'U8', 'UV', 'bool', 'bool_t', 'caddr_t', 'char', 'char *', 'char **', 'const char *', 'double', 'float', 'int', 'long', 'short', 'size_t', 'ssize_t', 'time_t', 'unsigned', 'unsigned char', 'unsigned char *', 'unsigned int', 'unsigned long', 'unsigned long *', 'unsigned short', 'void *', 'wchar_t', 'wchar_t *' in perl_libzmq4.xs, line 464 Makefile:371: recipe for target 'xs/perl_libzmq4.c' failed make: *** [xs/perl_libzmq4.c] Error 1 hp -- _ | Peter J. Holzer | we build much bigger, better disasters now |_|_) | | because we have much more sophisticated | | | hjp@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
Download signature.asc
application/pgp-signature 819b

Message body not shown because it is not plain text.

From: hjp [...] hjp.at
On Thu Aug 31 08:19:31 2017, hjp@hjp.at wrote: Show quoted text
> I am trying to build ZMQ-LibZMQ4 0.01 on Debian 9, which comes with > Perl > 5.24.1 and ZMQ 4.2.1: > > > 'perl Makefile.PL' finishes successfully, but make fails with: > > cp lib/ZMQ/LibZMQ4.pm blib/lib/ZMQ/LibZMQ4.pm > Running Mkbootstrap for ZMQ::LibZMQ4 () > chmod 644 "LibZMQ4.bs" > "/usr/bin/perl" "-Iinc" "/usr/share/perl/5.24/ExtUtils/xsubpp" > -typemap "/usr/share/perl/5.24/ExtUtils/typemap" xs/perl_libzmq4.xs > > xs/perl_libzmq4.xsc && mv xs/perl_libzmq4.xsc xs/perl_libzmq4.c > Could not find a typemap for C type 'P5ZMQ4_Context *'.
Found it. It has nothing to do with ZMQ but with the newer version of Perl. With Perl 5.24 (at least on Debian) "." is no longer in the default @INC, so the attempts to do() the scripts in the tools subdirectory fail - and because it's do() and not require(), they fail silently. Makefile.PL therefore seems to finish successfully, but it doesn't create the typemap (and several other files). I'm attaching a minimal patch.
Subject: zmq-libzmq4-bug-122932-with-dot.patch
diff -ur ZMQ-LibZMQ4-0.01/Makefile.PL ZMQ-LibZMQ4-0.01.1/Makefile.PL --- ZMQ-LibZMQ4-0.01/Makefile.PL 2014-09-19 18:02:12.000000000 +0200 +++ ZMQ-LibZMQ4-0.01.1/Makefile.PL 2017-09-11 17:26:49.621635138 +0200 @@ -4,7 +4,7 @@ # Otherwise, do the usual. BEGIN { if (-e '../.git') { - do 'tools/check_mi_mods.pl'; + do './tools/check_mi_mods.pl'; } else { unshift @INC, 'inc'; require inc::Module::Install; @@ -17,7 +17,7 @@ all_from 'lib/ZMQ/LibZMQ4.pm'; # Detect libzmq, and display it for sanity -do 'tools/detect_zmq.pl'; +do './tools/detect_zmq.pl'; print "Detected the following ZMQ settings:\n"; foreach my $env (qw(ZMQ_HOME ZMQ_H ZMQ_INCLUDES ZMQ_LIBS ZMQ_TRACE)) { printf " + %s = %s\n", $env, exists $ENV{$env} ? $ENV{$env} : "(null)"; @@ -192,7 +192,7 @@ homepage "https://github.com/lestrrat/p5-ZMQ"; bugtracker "https://github.com/lestrrat/p5-ZMQ/issues"; -do 'tools/genfiles.pl'; +do './tools/genfiles.pl'; WriteAll; if ($^O eq 'darwin' && -f "Makefile") {