Missing modules during cross-compile

Posted by vaeryft on 2014-06-23 12:38
Forums: PDK discussion | OS: Windows 7

Hi all,

I'm having trouble cross-compiling my Perl script from Windows 7 (64bit) to Windows 32, Linux 32/64 due to missing modules. It works great on a native compile.

I noticed that Perl modules exist in "C:\Perl64\lib" and "site\lib", but not under the AppData locations. My guess is that the libs under AppData are some sort of cache.. but maybe this is where I am going wrong.

Below are the types of errors I get when I attempt to cross-compile; this case for Linux 64:

Mail\Field.pm:
error: Can't locate Mail\Field.pm
refby: ...\1603\linux-x86-64\site\lib\MIME\Entity.pm line 230
refby: ...\1603\linux-x86-64\site\lib\MIME\Head.pm line 121
refby: ...\1603\linux-x86-64\site\lib\MIME\Field\ParamVal.pm line 68
Mail\Header.pm:
error: Can't locate Mail\Header.pm
refby: ...\1603\linux-x86-64\site\lib\MIME\Head.pm line 120,144
Mail\Internet.pm:
error: Can't locate Mail\Internet.pm
refby: ...\1603\linux-x86-64\site\lib\Email\Abstract\MailInternet.pm line 17,23
refby: ...\1603\linux-x86-64\site\lib\MIME\Entity.pm line 229

When I attempt to manually add a module by right clicking "Added Modules" and inputting the proper module, such as "Mail::Field" it will work fine, until I change the target platform, then it says:

PerlApp is not able to locate Mail\Field.pm using the current module search patch.

However my search path includes "C:\Perl64\lib" and "site\lib" and Main\Field.pm is right there.

Can anyone please help point me in the right direction?

Thank you,

Alex

vaeryft | Mon, 2014-06-23 12:54

I'm also seeing this at the top of the output box:

readline() on unopened filehandle DATA at /Win32/API/Type.pm line 43.
Win32::API::parse_prototype: WARNING unknown output parameter type 'int' at /Win32/API.pm line 310.

vaeryft | Mon, 2014-06-23 15:14

I fixed this by coping the C:\Perl64\site\lib\Mail\ directory into my APPDATA build dir.

I imagine this wouldn't work in all scenarios, so I'd be very interested in any theories as to the root cause, and how to fix it.

Thanks,

Alex

rahulgojame | Mon, 2016-11-21 23:06

Copied AppData into the local working directory.
Look like some sort of cache, its not updating.