1

I tried to install Algorithm::AhoCorasick::XS on a Windows PC, but it reports the following error: (On macOS, the installation of this module was successful.)

I have tried the advices mentioned in this post, but to no avail.

cpanm (App::cpanminus) 1.7044 on perl 5.032000 built for MSWin32-x64-multi-thread
Work directory is C:\Users\chris/.cpanm/work/1610116257.2408
You have make C:\Strawberry\c\bin\gmake.exe
You have LWP 6.46
You have C:\WINDOWS\system32\tar.exe, C:\msys64\usr\bin\gzip.exe and C:\msys64\usr\bin\bzip2.exe
Searching Algorithm::AhoCorasick::XS () on cpanmetadb ...
--> Working on Algorithm::AhoCorasick::XS
Fetching http://www.cpan.org/authors/id/R/RJ/RJH/Algorithm-AhoCorasick-XS-0.04.tar.gz
-> OK
Unpacking Algorithm-AhoCorasick-XS-0.04.tar.gz
Entering Algorithm-AhoCorasick-XS-0.04
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.46)
Configuring Algorithm-AhoCorasick-XS-0.04
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Algorithm::AhoCorasick::XS
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have List::MoreUtils 0 ... Yes (0.428)
Checking if you have Data::Dump 0 ... Yes (1.23)
Checking if you have Test::More 0.96 ... Yes (1.302175)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.46)
Building and testing Algorithm-AhoCorasick-XS-0.04
cp lib/Algorithm/AhoCorasick/XS.pm blib\lib\Algorithm\AhoCorasick\XS.pm
Running Mkbootstrap for XS ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "XS.bs"
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- XS.bs blib\arch\auto\Algorithm\AhoCorasick\XS\XS.bs 644
g++ -c   -Wall -std=c++11 -s -O2   -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\"  "-IC:\STRAWB~1\perl\lib\CORE"   Matcher.cpp
"C:\Strawberry\perl\bin\perl.exe" "C:\Strawberry\perl\lib\ExtUtils/xsubpp"  -C++ -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap -typemap C:\Users\chris\.cpanm\work\1610116257.2408\Algorithm-AhoCorasick-XS-0.04\perlobject.map -typemap C:\Users\chris\.cpanm\work\1610116257.2408\Algorithm-AhoCorasick-XS-0.04\typemap -typemap C:\Users\chris\.cpanm\work\1610116257.2408\Algorithm-AhoCorasick-XS-0.04\typemap  ac.xs > ac.xsc
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- ac.xsc ac.c
g++ -c   -Wall -std=c++11 -s -O2   -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\"  "-IC:\STRAWB~1\perl\lib\CORE"   ac.c
In file included from ac.xs:11:
ppport.h:4594: warning: "WIDEST_UTYPE" redefined
 define WIDEST_UTYPE U64TYPE
 In file included from C:\STRAWB~1\perl\lib\CORE/perl.h:2753,
 from ac.xs:5: C:\STRAWB~1\perl\lib\CORE/handy.h:1251: note: this is the location of the previous definition
 define WIDEST_UTYPE U64
 "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"Algorithm::AhoCorasick::XS\", 'DLBASE' => 'XS', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"
g++ XS.def -o blib\arch\auto\Algorithm\AhoCorasick\XS\XS.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" Matcher.o ac.o   "C:\STRAWB~1\perl\lib\CORE\libperl532.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch\auto\Algorithm\AhoCorasick\XS\XS.xs.dll
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- XS.bs blib\arch\auto\Algorithm\AhoCorasick\XS\XS.bs 644
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
ac.c: loadable library and perl binaries are mismatched (got handshake key 0000000012400080, needed 0000000012900080)
t/basic.t ....... 
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run 
ac.c: loadable library and perl binaries are mismatched (got handshake key 0000000012400080, needed 0000000012900080)
t/details.t ..... 
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run 
ac.c: loadable library and perl binaries are mismatched (got handshake key 0000000012400080, needed 0000000012900080)
t/edge_cases.t .. 
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run 
ac.c: loadable library and perl binaries are mismatched (got handshake key 0000000012400080, needed 0000000012900080)
t/utf8.t ........ 
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run 
ac.c: loadable library and perl binaries are mismatched (got handshake key 0000000012400080, needed 0000000012900080)
t/variation.t ... 
Dubious, test returned 1 (wstat 256, 0x100)
No subtests run 
Test Summary Report
-------------------t/basic.t     (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t/details.t   (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t/edge_cases.t (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t/utf8.t      (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
t/variation.t (Wstat: 256 Tests: 0 Failed: 0)
  Non-zero exit status: 1
  Parse errors: No plan found in TAP output
Files=5, Tests=0,  2 wallclock secs ( 0.03 usr +  0.14 sys =  0.17 CPU)
Result: FAIL
Failed 5/5 test programs. 0/0 subtests failed.
gmake: *** [Makefile:1042: test_dynamic] Error 1
-> FAIL Installing Algorithm::AhoCorasick::XS failed. See C:\Users\chris\.cpanm\work\1610116257.2408\build.log for details. Retry with --force to force install it.


  [1]: https://stackoverflow.com/questions/45000585/listutil-c-loadable-library-and-perl-binaries-are-mismatched-got-handshake-key
jonah_w
  • 972
  • 5
  • 11
  • Yes the it installs fine on Ubuntu 20.04 too. If I try on Windows 10, CMD, I get the same error as you. If I try Windows 10, MSYS2, I get a failure when running `make`, so it does not even get to the `make test`. I am looking into it.. – Håkon Hægland Jan 08 '21 at 22:27
  • 1
    It compiles now on MSYS2, see [this](https://stackoverflow.com/a/65638000/2173773) answer. – Håkon Hægland Jan 09 '21 at 00:08
  • How can I specify to use MSYS2? I'm not sure it's compiling against MSYS2 on my machine. – jonah_w Jan 09 '21 at 09:24
  • 1
    You can download MSYS2 from [here](https://www.msys2.org) – Håkon Hægland Jan 09 '21 at 15:56
  • Thank you. I have managed to installed the module on MSYS2 perl. Some other failed-to-install modules are installed though this site: https://packages.msys2.org/group/perl-modules using `pacman`. – jonah_w Jan 09 '21 at 19:44

0 Answers0