Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

enc2xs not found! at Makefile.PL

by levW (Beadle)
on Nov 20, 2019 at 12:45 UTC ( [id://11108936]=perlquestion: print w/replies, xml ) Need Help??

levW has asked for the wisdom of the Perl Monks concerning the following question:

I have a Strawbery 5.30 PERL.

Trying to CPAN install a module Encode::IBM - get an error :

D:\DOcuments\myscripts>cpan install Encode::IBM CPAN: CPAN::SQLite loaded ok (v0.217) Database was generated on Wed, 20 Nov 2019 09:26:53 GMT Running install for module 'Encode::IBM' CPAN: Digest::SHA loaded ok (v6.02) CPAN: Compress::Zlib loaded ok (v2.086) Checksum for D:\STRAWB~1\cpan\sources\authors\id\A\AU\AUDREYT\Encode-I +BM-0.11.tar.gz ok CPAN: Archive::Tar loaded ok (v2.32) CPAN: YAML::XS loaded ok (v0.78) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: Parse::CPAN::Meta loaded ok (v2.150010) CPAN: CPAN::Meta loaded ok (v2.150010) Configuring A/AU/AUDREYT/Encode-IBM-0.11.tar.gz with Makefile.PL enc2xs not found! at Makefile.PL line 28. Warning: No success on command[D:\Strawberry\perl\bin\perl.exe Makefil +e.PL] AUDREYT/Encode-IBM-0.11.tar.gz D:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK Stopping: 'install' failed for 'Encode::IBM'.

Will appreciate any advice...thanks

Replies are listed 'Best First'.
Re: enc2xs not found! at Makefile.PL
by syphilis (Archbishop) on Nov 20, 2019 at 13:25 UTC
    enc2xs not found! at Makefile.PL line 28.

    It's apparently a bug in the Makefile.PL. I get the same error as you.
    Line 28 is:
    $enc2xs or die "enc2xs not found!";
    $enc2xs needs to be set to the full path of Strawberry's perl/bin/enc2xs.bat.
    On my Windows machine that path is C:\_64strawberry-vanilla-perl-5.30.0\perl\bin\enc2xs.bat. In the Makefile.PL, I therefore change that single line 28 to the 2 lines:
    $enc2xs = 'C:\_64\strawberry-vanilla-5.30.0\perl\bin\enc2xs.bat'; $enc2xs or die "enc2xs not found!";
    Then, in the top level Encode-IBM-0.11 source directory, run the following 3 commands:
    perl Makefile.PL gmake test gmake install
    For me, that produces:

    and the job is successfully completed !!

    Cheers,
    Rob

      thanks a lot... I was playing in that direction without success so far...

      tried your way , got a new error now:

      D:\STRAWB~1\cpan\build\Encode-IBM-0.11-11>D:\Strawberry\perl\bin\perl +Makefile.PL enc2xs is D:\Strawberry\perl\bin\enc2xs.bat encode.h is at D:\Strawberry\perl\lib\Encode Checking if your kit is complete... Looks good ... Detected uninstalled Perl. Trying to continue. Have \strawberry\perl\lib Want \strawb~1\perl\lib Failed to opendir 'D:\STRAWB~1\perl\lib\CORE' to find header files: No + such file or directory at D:/Strawberry/perl/lib/ExtUtils/MM_Any.pm +line 3049.
        Failed to opendir 'D:\STRAWB~1\perl\lib\CORE' to find header files: No such file or directory at D:/Strawberry/perl/lib/ExtUtils/MM_Any.pm line 3049.

        What version of Perl is this (please provide output of perl -V) ?
        What version of Windows ? Also, what is the output of running set ?

        It's a pretty weird error that you're getting - looks like some sort of ExtUtils::MakeMaker issue to me.
        The actual error is coming from strawberry/perl/lib/ExtUtils/MM_Unix.pm ... I can't recall seeing that error ever before.
        What version of EU::MM are you running:
        perl -MExtUtils::MakeMaker -le "print $ExtUtils::MakeMaker::VERSION;"

        In strawberry/perl/lib/ExtUtils/MM_Unix.pm, try changing the line:
        if (not -f ($perl_h = $self->catfile($self->{PERL_INC},"perl.h")) to if(0)
        and see if that works.

        Without being able to reproduce the error it's rather hard for me to work out how to fix it.

        Cheers,
        Rob
        When I saw:
        Failed to opendir 'D:\STRAWB~1\perl\lib\CORE' to find header files: No + such file or directory at D:/Strawberry/perl/lib/ExtUtils/MM_Any.pm +line 3049.
        I should have asked you if the directory D:\STRAWB~1\perl\lib\CORE (also known as D:\strawberry\perl\lib\CORE) exists.

        I assumed it existed because it ought to exist, but maybe it has been removed.
        Does that directory exist ?
        If it does exist, then why does the opendir() call fail ?

        Line 3049 of MM_Any.pm is:
        opendir my $dh, $header_dir or die "Failed to opendir '$header_dir' to + find header files: $!";
        Yet on my Strawberry Perl 5.30.0, it all works fine:
        C:\>perl -le "opendir my $dh, 'C:\strawberry\perl\lib\CORE' or die $!; +" C:\>perl -le "opendir my $dh, 'C:\strawb~1\perl\lib\CORE' or die $!;" C:\>perl -le "opendir my $dh, 'C:\STRAWB~1\perl\lib\CORE' or die $!;" C:\>
        Cheers,
        Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11108936]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-29 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found