PerlMagick problems on Win XP.

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
walterhiggins

PerlMagick problems on Win XP.

Post by walterhiggins »

Hi,

I've installed ActiveState Perl 5.10.1 (see details below) and ImageMagick-6.5.8-5-Q16-windows-dll.exe (I also have the same problem with 6.5.7-3-Q16). I'm running WinXp sp2 (32 bit).

When I run the following command

perl -MImage::Magick -e "print 'ok' "

I get the following error...

Can't load 'C:/Perl/site/lib/auto/Image/Magick/Magick.dll' for module Image::Magick: load_file:This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem at C:/Perl/lib/DynaLoader.pm line 201.

Has anyone else seen this problem ? Any help greatly appreciated.

Walter Higgins.


Perl Information:
==============
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:

Platform:
osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='12.00.8804', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86'
libpth=\lib
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86'


Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE
Locally applied patches:
ActivePerl Build 1006 [291086]
32728 64-bit fix for Time::Local
Built under MSWin32
Compiled at Aug 24 2009 13:48:26
@INC:
C:/Perl/site/lib
C:/Perl/lib
.

Walter Higgins.

User avatar
Randolf
Posts: 19
Joined: 2007-10-08T20:58:27-07:00
Location: Beautiful British Columbia, Canada

Re: PerlMagick problems on Win XP.

Post by Randolf »

I had this problem, and resolved it by rebooting Windows.

I also created a thread yesterday entitled "Note about installing ImageMagick w/ mod_perl2 in Apache 2.2" (viewtopic.php?f=7&t=15208) that describes the symptoms (and solution) in detail.
Randolf Richardson - randolf@richardson.tw
Greater Vancouver Area, Beautiful British Columbia, Canada

"Petition to make all spam illegal in Canada:"
http://www.lumbercartel.ca/law/canada/s-220/

walterhiggins

Re: PerlMagick problems on Win XP.

Post by walterhiggins »

Unfortunately, rebooting the machine did not fix the problem. The problem also occurs with ImageMagick-6.5.8-6-Q16-windows-dll.exe

walterhiggins

Re: PerlMagick problems on Win XP.

Post by walterhiggins »

I've reverted to using ImageMagick-6.4.1 - this works. I couldn't get later versions to work with ActiveState perl. Is this a known issue?

User avatar
Randolf
Posts: 19
Joined: 2007-10-08T20:58:27-07:00
Location: Beautiful British Columbia, Canada

Re: PerlMagick problems on Win XP.

Post by Randolf »

What about uninstalling all versions of ImageMagick, and then re-installing the newest version? After they're all uninstalled, you might want to manually check the C:/Perl/site/lib/Image/Magick/ directory for left-over files before re-installing the newest version.

I currently do have ActiveState Perl v5.10.1 and ImageMagick installed from ImageMagick-6.5.8-6-Q16-windows-dll.exe running on my computer, both with the code you pointed out, and also in conjunction with mod_perl2 and libapreq2 in Apache v2.2 on Windows Vista, so I can confirm that it is possible to get it working. I hope can get the newest versions of everything going.

One other thing you could check is that all installed modules are up-to-date using ActiveState's "ppm" tool. Sometimes an outdated module can cause subtle problems for other modules.
Randolf Richardson - randolf@richardson.tw
Greater Vancouver Area, Beautiful British Columbia, Canada

"Petition to make all spam illegal in Canada:"
http://www.lumbercartel.ca/law/canada/s-220/

patrickh

Re: PerlMagick problems on Win XP.

Post by patrickh »

I am having a problem with 6.5.7 under ActiveState Perl 5.10; it is happening both on my WinXP workstation and a Win2003 virtual server.

I was previously using 6.4.8 and it worked fine, after upgrading my ImageMagick module it returns this on both machines:
Can't load 'C:/Perl/site/lib/auto/Image/Magick/Magick.dll' for module Image::Magick: load_file:Recursion too deep; the stack overflowed at C:/Perl/lib/DynaLoader.pm line 201. at C:\scripts\daily_deal\tomorrows_daily_deal.pl line 3
Compilation failed in require at C:\scripts\daily_deal\tomorrows_daily_deal.pl line 3.
BEGIN failed--compilation aborted at C:\scripts\daily_deal\tomorrows_daily_deal.pl line 3.

I am in the process of looking for a old package I can revert back to, just wanted to make my issue known on here.

User avatar
Randolf
Posts: 19
Joined: 2007-10-08T20:58:27-07:00
Location: Beautiful British Columbia, Canada

Re: PerlMagick problems on Win XP.

Post by Randolf »

I think you may need Perl v5.10.1 -- that was a requirement for me for the newest Image::Magick Perl modules.

You should probably create a full backup of your system before upgrading things though (software like http://www.drivesnapshot.de/ can create a full image of your entire hard drive without shutting anything down, which is what I use before performing major software upgrades just in case something breaks which requires a full re-install).
Randolf Richardson - randolf@richardson.tw
Greater Vancouver Area, Beautiful British Columbia, Canada

"Petition to make all spam illegal in Canada:"
http://www.lumbercartel.ca/law/canada/s-220/

patrickh

Re: PerlMagick problems on Win XP.

Post by patrickh »

Thanks Randolf, you got me in the right direction. Just upgrading to 5.10.1.1006 was not all, I had to also install the windows dynamic dll version of ImageMagick on that machine (previously I had just been trying to install it from repository in PPM). These were the steps I took:

1. Removed ImageMagick/PerlMagick modules from PPM
2. Upgraded Perl to 5.10.1.1006
3. Installed ImageMagick 6.5.8 for windows and installed PerlMagick 6.5.8 through that installer
4. Rebooted machine

This fixed the issue on both XP and Windows Server 2003. The reboot may have been unnecessary but I did it just in case. Hope this helps,

Patrick

User avatar
Randolf
Posts: 19
Joined: 2007-10-08T20:58:27-07:00
Location: Beautiful British Columbia, Canada

Re: PerlMagick problems on Win XP.

Post by Randolf »

That's excellent! I'm glad that it's working for you now.

Also, thank you for sharing the solution -- your information will hopefully be helpful to anyone else who experiences the same problem.
Randolf Richardson - randolf@richardson.tw
Greater Vancouver Area, Beautiful British Columbia, Canada

"Petition to make all spam illegal in Canada:"
http://www.lumbercartel.ca/law/canada/s-220/

walterhiggins

Re: PerlMagick problems on Win XP.

Post by walterhiggins »

The problem turned out to be that I had installed on a freshly repaved windows XP box which hadn't yet been updated (using windows automatic updates). Once I had updated my machine, installing ImageMagick w/ PerlMagick worked fine.
Thanks for help and suggestions.

User avatar
Randolf
Posts: 19
Joined: 2007-10-08T20:58:27-07:00
Location: Beautiful British Columbia, Canada

Re: PerlMagick problems on Win XP.

Post by Randolf »

That's also very useful information.

For those who depend on automatic Windows updates, you need to be aware that there are many updates that simply won't get installed in XP, Vista, and 7, unless you take the extra time to install them all manually.

The good news about Windows XP updates is that to get them all (including Service Pack 3) on a system that has Service Pack 2 will only require you to download approximately 500 MBs of data. For Windows Vista it's a lot more, but I don't recall how much. For Windows 7, which I just updated a week ago from being a new installation, the total download size was approximately 2,950 MBs (that's 2.9 GBs) and the installation (after a 1-hour download on my high-speed internet connection) required an additional 5-6 hours to complete.

Post Reply