Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install ZeroMQ and its cpan perl module ine windows (activeperl)

I want to install and use ZeroMQ through my perl script. I tried to install ZeroMQ from CPAN but the installation fails at the last step saying:

ZeroMQ-0.21/eg/threaded_server.pl
---- Unsatisfied dependencies detected during ----
----         DMAKI/ZeroMQ-0.21.tar.gz         ----
    Devel::CheckLib [build_requires]
    ExtUtils::MakeMaker [build_requires]
Running make test
  Make had some problems, won't test
  Delayed until after prerequisites
Running make install
  Make had some problems, won't install
  Delayed until after prerequisites
..........
.............

blib\script\use-devel-checklib
        pl2bat.bat blib\script\use-devel-checklib
  MATTN/Devel-CheckLib-0.98.tar.gz
  C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe -- OK
Running make test

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        C:\Perl5.14\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00-load.t ................... ok
t/bad-single-word-compiler.t .. ok
t/cmdline-LIBS-INC.t .......... skipped: Couldn't build a library to test against
t/custom-function.t ........... skipped: Couldn't build a library to test against
t/dash-l-libs.t ............... skipped: Couldn't build a library to test against
t/exit_with_message.t ......... ok
t/found.t .....................
t/found.t ..................... 1/6 #   Failed test 'lib => 'msvcrt''
   at t/found.t line 53.
          got: 'Can't link/include C library 'msvcrt', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test '... and check_lib is true'
   at t/found.t line 54.

   Failed test 'lib => 'kernel32''
   at t/found.t line 53.
          got: 'Can't link/include C library 'kernel32', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test '... and check_lib is true'
   at t/found.t line 54.

   Failed test 'lib => ['msvcrt', 'kernel32']'
   at t/found.t line 53.
          got: 'Can't link/include C library 'msvcrt', 'kernel32', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test '... and check_lib is true'
   at t/found.t line 54.
 Looks like you failed 6 tests of 6.
t/found.t ..................... Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/6 subtests
t/headers.t ................... 1/5
   Failed test 'incpath => '.',         header => 't/inc/headerfile.h''
t/headers.t ................... 3/5 #   at t/headers.t line 47.
          got: 'Can't link/include C library 't/inc/headerfile.h', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test 'incpath => [qw(t/inc)], header => 'headerfile.h''
   at t/headers.t line 47.
          got: 'Can't link/include C library 'headerfile.h', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test 'INC => '-I. -It/inc',   header => 'headerfile.h''
   at t/headers.t line 47.
          got: 'Can't link/include C library 'headerfile.h', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:
 Looks like you failed 3 tests of 5.
t/headers.t ................... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/5 subtests
t/multi-word-compiler.t ....... ok
t/not_found.t ................. 3/12
   Failed test 'missing 'foo' detected'
   at t/not_found.t line 39.
                   'Can't link/include C library 'msvcrt', 'foo', aborting.
 '
     doesn't match '/^Can't link/include C library 'foo'/ms'
 Looks like you failed 1 test of 12.
t/not_found.t ................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/12 subtests

Test Summary Report
-------------------
t/found.t                   (Wstat: 1536 Tests: 6 Failed: 6)
  Failed tests:  1-6
  Non-zero exit status: 6
t/headers.t                 (Wstat: 768 Tests: 5 Failed: 3)
  Failed tests:  3-5
  Non-zero exit status: 3
t/not_found.t               (Wstat: 256 Tests: 12 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
Files=10, Tests=27,  9 wallclock secs ( 0.09 usr +  0.06 sys =  0.16 CPU)
Result: FAIL
Failed 3/10 test programs. 10/27 subtests failed.
NMAKE : fatal error U1077: 'C:\Perl5.14\bin\perl.exe' : return code '0x1'
Stop.
  MATTN/Devel-CheckLib-0.98.tar.gz
  C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MATTN/Devel-CheckLib-0.98.tar.gz
Running make install
  make test had returned bad status, won't install without force
Running install for module 'ExtUtils::MakeMaker'
Running make for M/MS/MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz
Checksum for C:\Perl5.14\cpan\sources\authors\id\M\MS\MSCHWERN\ExtUtils-MakeMaker-6.62.tar.gz ok
........
........
t/Liblist_Kid.t ........... 1/? Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for -llibtest
Note (probably harmless): No library found for -lunreal_test
Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for dir_test
Warning: '-Ldir' changed to '-LC:/Perl5.14/cpan/build/ExtUtils-MakeMaker-6.62-IJCHpC/t/liblist/win32/dir'
Warning: '-Ldi r' changed to '-LC:/Perl5.14/cpan/build/ExtUtils-MakeMaker-6.62-IJCHpC/t/liblist/win32/di r'
Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for unreal_test
t/Liblist_Kid.t ........... ok
...........
...........
t/MM_Win32.t .............. 1/61
   Failed test 'pasthru()'
   at t/MM_Win32.t line 273.
          got: 'PASTHRU = -nologo'
     expected: 'PASTHRU = '
 Looks like you failed 1 test of 61.
t/MM_Win32.t .............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/61 subtests
        (less 6 skipped subtests: 54 okay)
................
................

t/xs.t .................... skipped: ExtUtils::CBuilder not installed or couldn't find a compiler

Test Summary Report
t/MM_Win32.t            (Wstat: 256 Tests: 61 Failed: 1)
  Failed test:  49
  Non-zero exit status: 1
Files=59, Tests=976, 139 wallclock secs ( 0.47 usr +  0.17 sys =  0.64 CPU)
Result: FAIL
Failed 1/59 test programs. 1/976 subtests failed.
NMAKE : fatal error U1077: 'C:\Perl5.14\bin\perl.exe' : return code '0xff'
Stop.
  MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz
  C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz
Running make install
  make test had returned bad status, won't install without force
Running make for D/DM/DMAKI/ZeroMQ-0.21.tar.gz
Warning: Prerequisite 'Devel::CheckLib => 0.4' for 'DMAKI/ZeroMQ-0.21.tar.gz' failed when processing 'MATTN/Devel-CheckLib-0.98.tar.gz' with 'make_test =
chances to succeed are limited.
Warning: Prerequisite 'ExtUtils::MakeMaker => 6.62' for 'DMAKI/ZeroMQ-0.21.tar.gz' failed when processing 'MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz' with
inuing, but chances to succeed are limited.

  CPAN.pm: Going to build D/DM/DMAKI/ZeroMQ-0.21.tar.gz

Probing environment variables:
 + Detected ZMQ_INCLUDES from ZMQ_HOME...
 + Detected ZMQ_LIBS from ZMQ_HOME...
Probing libzmq via pkg-config ...
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
 - No libzmq found...
Probing zeromq2 via pkg-config ...
Package zeromq2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `zeromq2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'zeromq2' found
 - No zeromq2 found...
Detected the following ZMQ settings:
 + ZMQ_HOME = C:\Users\kallol\Desktop\perl_test\zeromq-2.2.0
 + ZMQ_H = C:\Users\kallol\Desktop\perl_test\zeromq-2.2.0\include
 + ZMQ_INCLUDES = C:\Users\kallol\Desktop\perl_test\zeromq-2.2.0\include
 + ZMQ_LIBS = -LC:\Users\kallol\Desktop\perl_test\zeromq-2.2.0\lib
 + ZMQ_TRACE = (null)
Can't link/include C library 'zmq.h', 'zmq', aborting.
Warning: No success on command[C:\Perl5.14\bin\perl.exe Makefile.PL INSTALLDIRS=site]
  DMAKI/ZeroMQ-0.21.tar.gz
  C:\Perl5.14\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Failed during this command:
 MATTN/Devel-CheckLib-0.98.tar.gz             : make_test NO
 MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz      : make_test NO
 DMAKI/ZeroMQ-0.21.tar.gz                     : writemakefile NO 'C:\Perl5.14\bin\perl.exe Makefile.PL INSTALLDIRS=site' returned status 512

The installer seems to be using nmake from Visual C 2010.

like image 204
Kallol Avatar asked Nov 14 '22 04:11

Kallol


1 Answers

Your system fails to install two dependencies, the whole toolchain is buggered up. How I would fix it:

  1. Uninstall MSVC and nmake.
  2. Upgrade to the supported version of ActivePerl (5.14).
  3. Install the package MinGW with ppm. This gives you the appropriate compiler.
  4. Install ExtUtils::MakeMaker and Devel::CheckLib.
  5. Install ZeroMQ as you did before.
like image 160
daxim Avatar answered Dec 18 '22 11:12

daxim