perlstrawberry-perl

Strawberry Perl installation of Encode::JIS2K fails


I have installed the newest version of Strawberry Perl and installed several modules without any errors. However, the module Encode::JIS2K is stubbornly failing to install:

C:\PDFCrop\biblatex-biber-2.15>cpan Encode::JIS2K
CPAN: CPAN::SQLite loaded ok (v0.219)
Database was generated on Tue, 15 Sep 2020 09:41:42 GMT
Running install for module 'Encode::JIS2K'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.096)
Checksum for C:\Strawberry\cpan\sources\authors\id\D\DA\DANKOGAI\Encode-JIS2K-0.03.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.38)
CPAN: YAML::XS loaded ok (v0.82)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20200717)
Configuring D/DA/DANKOGAI/Encode-JIS2K-0.03.tar.gz with Makefile.PL
enc2xs not found! at Makefile.PL line 35.
Warning: No success on command[C:\Strawberry\perl\bin\perl.exe Makefile.PL]
  DANKOGAI/Encode-JIS2K-0.03.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Encode::JIS2K'.

I believe that enc2xs not found! at Makefile.PL line 35. is the problematic entry, but I am at a loss why there is something missing since all actions before returned "OK" and it worked for every other module so far.

Working on Windows 10, x64 with Strawberry Perl v. 5.32.0.1


Solution

  • When you find a problem like that, it's always worth checking to see if it's a known problem. You can do that by visiting the module's page on CPAN. You can then click on the "Issues" link in the left-hand menu.

    You'll see there's an issue entitled enc2xs may not be found on MSWIN32 which is about the problem you've found.

    Unfortunately, that problem has been there, unfixed, for five years. However, the problem description includes a suggested fix for the problem. You can edit your Makefile.PL and replace lines 34-35 with this:

    $enc2xs = $enc2xs_fpath
       if (-x $enc2xs_fpath || -x "$enc2xs_fpath.bat");