fatal problem with compiling PerlMagick on Windows

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
perl_newbie
Posts: 1
Joined: 2011-07-22T07:37:52-07:00
Authentication code: 8675308

fatal problem with compiling PerlMagick on Windows

Post by perl_newbie »

I am unable to compile PerlMagick on Windows XP against Camelbox "tahi" 2009.167.2132Z. Possibly I have been overlooking something (or everything).

Here is what I am doing:

step #1
I read the tasks (cited below) listed at http://www.imagemagick.org/script/perl-magick.php

step #2
task:
- ImageMagick must already be installed on your system
what I do:
- I install ImageMagick-6.7.1-0-Q16-windows-dll.exe with these options enabled: Add application directory to your system path, Install development headers and libaries for C and C++
- Start menu > Run > convert.exe (yes, the ImageMagick executables can be really found by using PATH!)

step #3
task:
- also, the ImageMagick source distribution for Windows 2000 is required
what I do:
- I download http://image_magick.veidrodis.com:8003/image_magick/windows/ImageMagick-windows.zip and extract its content to to c:\ImageMagick\

step #4
task:
- you must also have the nmake from the Visual C++ or J++ development environment
what I do:
- I get nmake.exe v10.00.30319.01 from Microsoft Visual Studio 10.0

step #5
task:
- copy \bin\X11.dll to a directory in your dynamic load path such as c:\perl\site\5.00502.
what I do:
- I copy c:\ImageMagick\VisualMagick\bin\X11.dll to c:\camelbox\site\ and to c:\camelbox\site\lib\
- I have had no smarter idea (b.t.w. what is a "dynamic load path"?)

step #6
task:
- copy \bin\IMagick.dll to a directory in your dynamic load path such as c:\perl\site\5.00502.
what I do:
- I am unable to find IMagick.dll (or any .dll with a similar name) in c:\ImageMagick\ or c:\Program Files\ImageMagick-6.7.1-Q16\
- nevertheless I copy c:\Program Files\ImageMagick-6.7.1-Q16\CORE_RL_*.dll files to c:\camelbox\site\ and to c:\camelbox\site\lib\ since http://studio.imagemagick.org/pipermail ... 06665.html states that
The equivalent to a "IMagick.dll" file is probably "CORE_RL_MAGICK_.DLL". If you are going to copy DLLs, then you should certainly copy all of the "CORE*" DLLs.
step #7
task:
- type "cd PerlMagick" and "perl Makefile.nt"
what I do:
- I type "cd \ImageMagick\PerlMagick" and "perl Makefile.nt"
- I get this message (yes, Makefile has been generated!):

Code: Select all

Checking if your kit is complete...
Looks good
Warning: '-L../VisualMagick/lib' changed to '-LC:/ImageMagick/PerlMagick/../VisualMagick/lib'
Warning: '-L../VisualMagick/bin' changed to '-LC:/ImageMagick/PerlMagick/../VisualMagick/bin'
Note (probably harmless): No library found for -lCORE_RL_magick_.lib
Note (probably harmless): No library found for -lCORE_RL_magick_.lib
Note (probably harmless): No library found for -lCORE_RL_magick_.lib
Note (probably harmless): No library found for -lCORE_RL_magick_.lib
Note (probably harmless): No library found for -lCORE_DB_magick_.lib
Note (probably harmless): No library found for -lCORE_DB_magick_.lib
Note (probably harmless): No library found for -lCORE_DB_magick_.lib
Note (probably harmless): No library found for -lCORE_DB_magick_.lib
Note (probably harmless): No library found for -lmsvcrt
Note (probably harmless): No library found for -lmoldname
Note (probably harmless): No library found for -lkernel32
Note (probably harmless): No library found for -luser32
Note (probably harmless): No library found for -lgdi32
Note (probably harmless): No library found for -lwinspool
Note (probably harmless): No library found for -lcomdlg32
Note (probably harmless): No library found for -ladvapi32
Note (probably harmless): No library found for -lshell32
Note (probably harmless): No library found for -lole32
Note (probably harmless): No library found for -loleaut32
Note (probably harmless): No library found for -lnetapi32
Note (probably harmless): No library found for -luuid
Note (probably harmless): No library found for -lws2_32
Note (probably harmless): No library found for -lmpr
Note (probably harmless): No library found for -lwinmm
Note (probably harmless): No library found for -lversion
Note (probably harmless): No library found for -lodbc32
Note (probably harmless): No library found for -lodbccp32
Writing Makefile for Image::Magick
step #8
task:
- type "nmake"
what I do:
- I type "nmake"
- I get this error message:

Code: Select all

Missing right curly or square bracket at -e line 1, at end of line
Execution of -e aborted due to compilation errors.
NMAKE : fatal error U1077: 'C:\camelbox\bin\perl.exe' : return code '0xff'
Stop.
- in order to see what commands are to be executed, I type "nmake /N"

Code: Select all

C:\camelbox\bin\perl.exe -MExtUtils::Install -e "pm_to_blib({{@ARGV}, 'blib\lib\auto', '')" --  Magick.pm blib\lib\Image\Magick.pm
C:\camelbox\bin\perl.exe -MExtUtils::Command -e touch pm_to_blib
C:\camelbox\bin\perl.exe C:\camelbox\lib\ExtUtils\\xsubpp  -typemap C:\camelbox\lib\ExtUtils\typemap  Magick.xs > Magick.xsc && C:\camelbox\bin\perl.exe -MExtUtils::Command -e mv Magick.xsc Magick.c
gcc -c  -I.. -I..\xlib\include  -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2    -DVERSION=\"6.7.1\"  -DXS_VERSION=\"6.7.1\"  "-IC:\camelbox\lib\CORE"  -D_VISUALC_ -D_WINDOWS Magick.c
C:\camelbox\bin\perl.exe -l -e "print qq{{@ARGV}" -- "Running Mkbootstrap for Image::Magick ()"
C:\camelbox\bin\perl.exe  "-MExtUtils::Mkbootstrap"  -e "Mkbootstrap('Magick','');"
C:\camelbox\bin\perl.exe -MExtUtils::Command -e touch Magick.bs
C:\camelbox\bin\perl.exe -MExtUtils::Command -e chmod 644 Magick.bs
C:\camelbox\bin\perl.exe -MExtUtils::Mksymlists  -e "Mksymlists('NAME'=>\"Image::Magick\", 'DLBASE' => 'Magick', 'DL_FUNCS' => {  }, 'FUNCLIST' => [], 'IMPORTS' => {  }, 'DL_VARS' => []);"
dlltool --def Magick.def --output-exp dll.exp
g++ -o blib\arch\auto\Image\Magick\Magick.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\camelbox\lib\CORE" -L"C:\camelbox\lib" Magick.o -Wl,--image-base,0x2e0a0000  C:\camelbox\lib\CORE\libperl510.a C:\camelbox\lib\libmsvcrt.a C:\camelbox\lib\libmoldname.a C:\camelbox\lib\libkernel32.a C:\camelbox\lib\libuser32.a C:\camelbox\lib\libgdi32.a C:\camelbox\lib\libwinspool.a C:\camelbox\lib\libcomdlg32.a C:\camelbox\lib\libadvapi32.a C:\camelbox\lib\libshell32.a C:\camelbox\lib\libole32.a C:\camelbox\lib\liboleaut32.a C:\camelbox\lib\libnetapi32.a C:\camelbox\lib\libuuid.a C:\camelbox\lib\libws2_32.a C:\camelbox\lib\libmpr.a C:\camelbox\lib\libwinmm.a C:\camelbox\lib\libversion.a C:\camelbox\lib\libodbc32.a C:\camelbox\lib\libodbccp32.a dll.exp
dlltool --def Magick.def --base-file dll.base --output-exp dll.exp
g++ -o blib\arch\auto\Image\Magick\Magick.dll -mdll -s -L"C:\camelbox\lib\CORE" -L"C:\camelbox\lib" Magick.o -Wl,--image-base,0x2e0a0000  C:\camelbox\lib\CORE\libperl510.a C:\camelbox\lib\libmsvcrt.a C:\camelbox\lib\libmoldname.a C:\camelbox\lib\libkernel32.a C:\camelbox\lib\libuser32.a C:\camelbox\lib\libgdi32.a C:\camelbox\lib\libwinspool.a C:\camelbox\lib\libcomdlg32.a C:\camelbox\lib\libadvapi32.a C:\camelbox\lib\libshell32.a C:\camelbox\lib\libole32.a C:\camelbox\lib\liboleaut32.a C:\camelbox\lib\libnetapi32.a C:\camelbox\lib\libuuid.a C:\camelbox\lib\libws2_32.a C:\camelbox\lib\libmpr.a C:\camelbox\lib\libwinmm.a C:\camelbox\lib\libversion.a C:\camelbox\lib\libodbc32.a C:\camelbox\lib\libodbccp32.a dll.exp
C:\camelbox\bin\perl.exe -MExtUtils::Command -e chmod 755 blib\arch\auto\Image\Magick\Magick.dll
C:\camelbox\bin\perl.exe -MExtUtils::Command -e rm_rf blib\arch\auto\Image\Magick\Magick.bs
C:\camelbox\bin\perl.exe -MExtUtils::Command -e cp Magick.bs blib\arch\auto\Image\Magick\Magick.bs
C:\camelbox\bin\perl.exe -MExtUtils::Command -e chmod 644 blib\arch\auto\Image\Magick\Magick.bs
- I have noticed that two commands contain a seemless unnecessary '{'
- so I corrected these commands

Code: Select all

... pm_to_blib({{@ARGV} ...
... qq({{@ARGV} ...
to this:

Code: Select all

... pm_to_blib({@ARGV} ...
... qq({@ARGV} ...
I issue one after one the corrected commands and everything seems to be O.K. until I issue the command

Code: Select all

g++ -o blib\arch\auto\Image\Magick\Magick.dll ...
where I get 1000+ error message like this:

Code: Select all

Magick.o:Magick.c:(.text+0x38c78): undefined reference to `MagickCoreGenesis'
and then the final error message:

Code: Select all

collect2: ld returned 1 exit status
And this is the point where I gave up.

Thank you for your attention!
Post Reply