in reply to Re^5: Imager::File::TIFF Dependencies
in thread Imager::File::TIFF Dependencies

The issue appears to be an interaction between PAR::Packer packing dlls using their CRC32 checksums, but XSLoader does not (cannot) know that the names have changed in the packed directories and so calls the original name. This results in the error reported at line 11 of Imager::File::TIFF.

No.

If that was the issue PAR::Packer would not work for anything.

If you want to find out what the issue is use depends.exe

  depends.exe /c /f:1 /pb /ot:temp.txt  packed.exe arg1 arg2

Replies are listed 'Best First'.
Re^7: Imager::File::TIFF Dependencies
by swl (Prior) on May 24, 2017 at 03:05 UTC

    Bah! I should have known to use Dependency Walker, having put it to this exact use in the past.

    Running it on the pp generated exe file does not work, though, as it is a self extracting zip archive which then starts a perl process which depends.exe does not see. However, running it directly on the original xs.dll file works.

    depends.exe C:\berrybrew\5.24.1_64_PDL\perl\vendor\lib\auto\Imager\File\TIFF\TIFF.xs.dll

    This returns the usual windows components, as well as PERL524.DLL, and LIBTIFF-5.DLL. The latter is the important part, and in turn depends on LIBJPEG-9__.DLL, LIBLZMA-5__.DLL and ZLIB1__.DLL. The libtiff dll and its dependencies need to be packed with the executable, or in the user's path, for the packed exe to work.

    A working packer command should therefore be something like this (updating the paths as appropriate):

    pp -x --link c:\berrybrew\5.24.1_64_PDL\c\bin\libtiff-5__.dll --link c:\berrybrew\5.24.1_64_pdl\c\bin\LIBJPEG-9__.DLL --link c:\berrybrew\5.24.1_64_pdl\c\bin\LIBLZMA-5__.DLL --link c:\berrybrew\5.24.1_64_pdl\c\bin\ZLIB1__.DLL -o outputname.exe scriptname.pl

    It works for me on my system.

    Shawn

      Many thanks. I was not familiar with depends.exe. I will get to know it now.