Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 26571
Status: open
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: djibrilo [...] yahoo.fr
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PAR 0973] Create an exe including image::magick, Dll problem
Date: Mon, 23 Apr 2007 12:22:36 +0200 (CEST)
To: bug-PAR [...] rt.cpan.org
From: djibril ousmanou <djibrilo [...] yahoo.fr>
Hi, I am using PAR module [PAR-0.973 ] and I have a problem when I try to build an exe of a perl script wich use Image::Magick Module. perl -v : This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 33 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 819 [267479] provided by ActiveState http://www.ActiveState.com Built Aug 29 2006 12:42:41 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 http://www.perl.org/, the Perl Home Page. OS : I have the problem on Win2000, Windows Vista windows 2000 , uname -a : CYGWIN_NT-5.0 CEZEMBRE 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin That's the script convert.pl : #!/usr/bin/perl -w use strict; use Carp; use Image::Magick; use Cwd; my $rep = getcwd(); my @fic_pdf = lister_fichiers($rep); foreach my $file_pdf (@fic_pdf) { my $image = new Image::Magick; if ($file_pdf =~/(.+)\.pdf$/i){ my $name_jpg = $1.".jpg"; $image->Read($file_pdf); my ($largeur,$hauteur) = $image->Get(qw(width height)); #Recupere les dimensions de l'image $image->Annotate(x => $largeur, y => $hauteur, pointsize => 10, fill => 'black', text => 'IMAXIO, division Diagnogene' ); $image->Write($name_jpg); } } perl convert.pl is working but when I make an exe when this command : pp -o convert.exe convert.pl The exe in create but When I click on the exe, I have this error message : dynamic link library CORE_RL_magick_.dll is not find in .....(environment variable). If I execute this command, pp -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_magick_.dll -l C:\Perl\site\lib\auto\Image\Magick\X11.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_zlib_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_bzlib_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_lcms_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_tiff_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_jpeg_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_ttf_.dll -o toto.exe convert_pdf.pl I don't have error message but the exe doesn't make anything. Best Regards Djibril --------------------------------- Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
Subject: RE : [rt.cpan.org #26571] AutoReply: [PAR 0973] Create an exe including image::magick, Dll problem
Date: Mon, 23 Apr 2007 12:42:16 +0200 (CEST)
To: bug-PAR [...] rt.cpan.org
From: djibril ousmanou <djibrilo [...] yahoo.fr>
I just want to say that I had not problem on Debian linux. Just on windows2000 and vista. Bugs in PAR via RT <bug-PAR@rt.cpan.org> a écrit : Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "[PAR 0973] Create an exe including image::magick, Dll problem", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [rt.cpan.org #26571]. Your ticket is accessible on the web at: http://rt.cpan.org/Ticket/Display.html?id=26571 Please include the string: [rt.cpan.org #26571] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, bug-PAR@rt.cpan.org ------------------------------------------------------------------------- Hi, I am using PAR module [PAR-0.973 ] and I have a problem when I try to build an exe of a perl script wich use Image::Magick Module. perl -v : This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 33 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 819 [267479] provided by ActiveState http://www.ActiveState.com Built Aug 29 2006 12:42:41 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 http://www.perl.org/, the Perl Home Page. OS : I have the problem on Win2000, Windows Vista windows 2000 , uname -a : CYGWIN_NT-5.0 CEZEMBRE 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin That's the script convert.pl : #!/usr/bin/perl -w use strict; use Carp; use Image::Magick; use Cwd; my $rep = getcwd(); my @fic_pdf = lister_fichiers($rep); foreach my $file_pdf (@fic_pdf) { my $image = new Image::Magick; if ($file_pdf =~/(.+)\.pdf$/i){ my $name_jpg = $1.".jpg"; $image->Read($file_pdf); my ($largeur,$hauteur) = $image->Get(qw(width height)); #Recupere les dimensions de l'image $image->Annotate(x => $largeur, y => $hauteur, pointsize => 10, fill => 'black', text => 'IMAXIO, division Diagnogene' ); $image->Write($name_jpg); } } perl convert.pl is working but when I make an exe when this command : pp -o convert.exe convert.pl The exe in create but When I click on the exe, I have this error message : dynamic link library CORE_RL_magick_.dll is not find in .....(environment variable). If I execute this command, pp -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_magick_.dll -l C:\Perl\site\lib\auto\Image\Magick\X11.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_zlib_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_bzlib_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_lcms_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_tiff_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_jpeg_.dll -l C:\Perl\site\lib\auto\Image\Magick\CORE_RL_ttf_.dll -o toto.exe convert_pdf.pl I don't have error message but the exe doesn't make anything. Best Regards Djibril --------------------------------- Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses. --------------------------------- Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
Hi, I don't have a copy of Windows on any of my computers any more, so I can't actually track down what's happening. However, I remember that you are certainly not the first person to have problems with packaging ImageMagick using PAR. Many problems encountered are related to how ImageMagick loads its DLLs from other DLLs. PAR can't track down the DLL dependencies and you have to give them by hand using -l. But I guess you got that far yourself since you tried using -l with the ImageMagick DLLs. Now, another problem might be what happens upon extraction from the archive. The file name or directory structure or location of the DLLs might be somehow not what ImageMagick expects. There has been quite some discussion on the PAR at perl dot org mailing list some time ago. I remember that specifically Glenn Linderman had been doing some significant research, but I can't recall whether he finally made it work or not. Perhaps you can search the archive of the mailing list for help. If you find out what's going wrong, please send a quick summary to this place or add it to the PAR FAQ at http://par.perl.org so others can benefit. Good luck! Best regards, Steffen
From: PJF [...] cpan.org
Image::Magick is notoriously difficult to package up with pp. That's because the code that scans dependencies can't pick up all the .dlls required. I've also seen reports that the default Image::Magick install depends upon registry keys under Windows, and there's no easy way to pack these into a .par file. Luckily, there's a solution to both. If you're using ActiveState Perl, you'll want to grab the Image-Magick distribution from http://www.bribes.org/perl/ppmdir.html . This doesn't depend upon registry values, and puts all the .dll files into c:/perl/... where they're easier to find. Secondly, you'll need to tell pp to include those extra .dll files using the -l switch when you package your program. In my experience all the CORE_RL_ files, as well as the X11.dll files are required for Image::Magick to work. You may also need to include some of the IM_MOD_RL_ .dlls, depending upon which image formats you're using. If you want an example build-script, see http://search.cpan.org/src/PJF/App-SweeperBot-0.02/MakeExe.pl which is what I use to build my minesweeper playing robot ( http://sweeperbot.org/) , which uses Image::Magick as part of its image-recognition routines. Since this seems to come up regularly, it would be lovely if pp/scandeps had a way of realising that Image::Magick depends upon the extra files, but unfortunately I won't have the opportunity to write a patch in the foreseeable future. ;( Cheerio, Paul
Another Way to resolv this problem is to download PAR::Packer and compile it using gcc for example (In Windows). you have to download the latest version of Image::magick in the website and during the installation, install the Perl Image Magick too. NB : You have to use the latest version of ActivePerl that PerlMagick use in the web site. Website : http://www.imagemagick.org/script/binary-releases.php#windows Use ImageMagick-6.6.0-10-Q16-windows-dll.exe for example. After that, the packaging with PAR::Packer will be OK.