Can't Locate ExcUtils/ when ParlApp executable has use Archive::Extract

Posted by thloeber on 2014-05-01 08:01
Forums: PDK discussion | OS: Windows

I've created a Perl script which has a use Archive::Extract statement which runs fine with no runtime compile errors. Creating an executable for Windows 64 bit with PDK 9.3 and ActivePerl 5.18 throws these errors but does create the exe for testing.
error: Can't locate .\Makefile.PL
refby: C:\Perl64\site\lib\ExtUtils\ line 234
error: Can't locate Win32\
refby: C:\Perl64\lib\Locale\

When running the executable I get this runtime compilation error
Can't locate ExtUtils/ in @INC (you may need to install the ExtUtils
:MM_Win32 module) (@INC contains: C:/) at (eval 146) line 2, line 176.
BEGIN failed--compilation aborted at line 17, line 176.

ExcUtils/MM_Win32 is in the default module search path

If I remove the use Archive::Extract statement i do not get the compilation error.

This can be simply reproduce with this code snippet

use strict ;
use warnings ;
use Archive::Extract ;
exit 0 ;

Any ideas how to fix this?

billo | Sat, 2017-06-10 08:27

I get similar behavior with a different module... the output of perl -v is listed below
here is my code

use File::Fetch;

my $full_url_name="";
my $ff = File::Fetch->new(uri => $full_url_name);
my $file = $ff->fetch();

exit 0;

here is the result when I run it using the installed activestate perl interperter... I get unexpected errors, but it actually does get the file from the website listed

'lwp' said it fetched 'c:/Users/boleary/Documents/GitHub/CE_TOOLS/PERL_DEV_TEST/', but it was not created at line 28.
'httptiny' said it fetched 'c:/Users/boleary/Documents/GitHub/CE_TOOLS/PERL_DEV_TEST/', but it was not created at line 28.
Use of uninitialized value in pattern match (m//) at C:/Perl/lib/ExtUtils/ line 40.
Use of uninitialized value in pattern match (m//) at C:/Perl/lib/ExtUtils/ line 41.
Use of uninitialized value in pattern match (m//) at C:/Perl/lib/ExtUtils/ line 42.

when I create the executable with perlapp and run it,
here is what get

Can't locate ExtUtils/ in @INC (you may need to install the ExtUtils::MM_Win32 module) (@INC contains:) at (eval 106) line 2.

Here is the command I use with perlApp and the output from perlapp... I had never noticed the 5 errors before since the script that runs perlApp was hiding the results from me and ostensibly the executable was always working until I tested the specific feature that used File::Fetch.


perlapp --lib ..\COMMON  --icon ../COMMON/images/CE_ICON_300x300.ico  --bind cadEnhanceSplash1.BMP[file=../COMMON/images/cadEnhanceSplash1.BMP,mode=666] --bind cadEnhanceSplash1.gif[file=../COMMON/ima
ges/cadEnhanceSplash1.gif,mode=666] --bind cadEnhanceSplash1.ico[file=../COMMON/images/cadEnhanceSplash1.ico,mode=666] --bind cadEnhanceSplashSmall.bmp[file=../COMMON/images/cadEnhanceSplashSmall.bmp,
mode=666] --bind cadEnhanceSplashSmall.gif[file=../COMMON/images/cadEnhanceSplashSmall.gif,mode=666] --bind CE_ICON.bmp[file=../COMMON/images/CE_ICON.bmp,mode=666] --bind CE_ICON.gif[file=../COMMON/im
ages/CE_ICON.gif,mode=666] --bind CE_ICON_300x300.bmp[file=../COMMON/images/CE_ICON_300x300.bmp,mode=666] --bind CE_ICON_300x300.gif[file=../COMMON/images/CE_ICON_300x300.gif,mode=666] --bind CE_ICON_
300x300.ico[file=../COMMON/images/CE_ICON_300x300.ico,mode=666] --bind CE_ICON_OLD_SCHOOL.bmp[file=../COMMON/images/CE_ICON_OLD_SCHOOL.bmp,mode=666] --bind CE_ICON_OLD_SCHOOL.gif[file=../COMMON/images
/CE_ICON_OLD_SCHOOL.gif,mode=666] --bind CE_LOGO_W_BAR_2048X1152.jpg[file=../COMMON/images/CE_LOGO_W_BAR_2048X1152.jpg,mode=666] --bind icon_bitmap.bmp[file=../COMMON/images/icon_bitmap.bmp,mode=666]
--bind icon_bitmap.gif[file=../COMMON/images/icon_bitmap.gif,mode=666] --bind TI_BOM_GEN_dbg.txt[file=../COMMON/images/TI_BOM_GEN_dbg.txt,mode=666] --norunlib --info "Comments=Built by and for CadEnha
nce LLC;CompanyName=CadEnhance LLC;FileDescription=executable:perl_dev_test Application;FileVersion=1.0.0; ;LegalCopyright=2016;OriginalFilename=perl_dev_
test;ProductName=perl_dev_test;ProductVersion=1.0.0" --exe perl_dev_test.exe


PerlApp 9.5.1 build 300018
Copyright (C) 1998-2016 ActiveState Software Inc. All rights reserved.
Commercial license for bill oleary <>

        error: Can't locate .\Makefile.PL
        refby: C:\Perl\lib\ExtUtils\ line 253
        error: Can't locate Encode\
        refby: C:\Perl\lib\ExtUtils\MakeMaker\ line 117
        error: Can't locate I18N\
        refby: C:\Perl\lib\ExtUtils\MakeMaker\ line 88
        error: Can't locate Log\Contextual\
        refby: C:\Perl\lib\Module\ line 29
        error: Can't locate Win32\
        refby: C:\Perl\lib\Locale\

Summary: 5 errors and 0 warnings

Created 'perl_dev_test.exe'

I am not sure if you There is an actual solution listed in the
If there is a solution there I can't seem to figure it out..
Is it setting the ACTIVEPERL_CONFIG_DISABLE environment variable in a begin block in my top level perl code?

PERL -V info:

C:\Users\boleary\Documents\GitHub\CE_TOOLS\PERL_DEV_TEST\executable_versions\1.0.0>perl -v

This is perl 5, version 22, subversion 2 (v5.22.2) built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Binary build 2202 [300560] provided by ActiveState
Built Jul 13 2016 15:47:10

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at, the Perl Home Page.

ActiveState Staff
Mon, 2017-06-12 08:35

That's your basic solution.

You're using modules that have evolved under the assumption that the internet, CPAN, and a compiler will always be available. When you wrap some or all of those will be unavailable, and the internal hacks needed to allow PerlApp to keep dealing with these designs are no longer being maintained.
Locking out the config might help you.

Rolling back any and all module updates downloaded from PPM might also help, particularly if one of those updated modules is Ext::MakeMaker

billo | Tue, 2017-06-13 14:23

Thanks Graham!

I found a different module WWW.Mechanize to do the same job...
I quickly tried playing with the configs but that didn't work.