rschupp / PAR-Packer

(perl) Generate stand-alone executables, perl scripts and PAR files https://metacpan.org/pod/PAR::Packer
Other
48 stars 13 forks source link

Can't load 'C:\...........\4f0b224f.xs.dll' for module XML::Parser::Expat: #55

Closed urusov closed 2 years ago

urusov commented 2 years ago

Hi

  1. -- situation -- 1.1 I generate some exe file from perl script pp @ps.txt ps.txt is: -T PERLTMP -I C:\Aptio5\Projects\CPC520_CPC507\SRC\AmdCbsPkg\Tools -M XML::Simple:: -M XML::SAX:: -M CommonGen:: -a C:\SBperl\perl\bin\perl532.dll -o CBSgenerate.exe CBSgenerate.pl 1.2 Then i run it (CBSgenerate.exe) i see error: Can't load 'C:\Users\urusov\AppData\Local\Temp\par-757275736f76\cache-PERLTMP\4f0b224f.xs.dll' for module XML::Parser::Expat: load_file:═х эрщфхэ єърчрээ√щ ьюфєы№ at /DynaLoader.pm line 193.
  2. -- workaround -- If i add to path: PATH=C:\SBperl\c\bin;%PATH% there C:\SBperl is Strawberry Perl root dir application run success
  3. -- versions -- Strawberry Perl 5.32.1.1-64bit PAR Packager, version 1.052 (PAR version 1.017) OS Windows 10 x64 20H2

Application not executed on PC without perl. This is my incorrect actions or PAK::Parser bug ???

rschupp commented 2 years ago

Can't load 'C:\Users\urusov\AppData\Local\Temp\par-757275736f76\cache-PERLTMP\4f0b224f.xs.dll' for module XML::Parser::Expat: load_file:═х эрщфхэ єърчрээ√щ ьюфєы№ at /DynaLoader.pm line 193.

XML::Parser::Expat uses the native expat DLL, but your exe doesn't contain it - PAR::Packer never packs native DLLs automagically. The expat DLL is included in your Strawberry installation (look for *expat*.dll in PATH) and add it to your pp command with --link ... (probably using the basename of the DLL should do).

ps.txt is: ... -M XML::Simple:: -M XML::SAX::

Why do you need these? They should be automatically detected and packed.

... -a C:\SBperl\perl\bin\perl532.dll

That's nonsense, perl*.dll is always packed (and this copy will never be used).

urusov commented 2 years ago

Hi I add Expat.xs.dll No result, nothing changed See my attached Packer.zip: PackExe.bat - for generate application EXE file (CBSgenerate.exe) run.bat - test application (please run without perl in PATH) runLog.txt - result of application test Packer.zip https://cloud.mail.ru/public/gG3K/qQstvHhWn There might be something wrong? Please help me! Yours sincerely, Andrey

rschupp commented 2 years ago

I add Expat.xs.dll

That's the wrong one - it's the "glue" DLL, i.e. the XS part of Expat.pm (and it's most certainly not located on your PATH). The correct one is probably called libexpat.dll (maybe with an added version number), it should be in Strawberry's bin directory.

urusov commented 2 years ago

I found libexpat-1__.dll. evething all right Thanks.