Page 1 of 1

Compiling Perl Modules (i.e Image::Magick)

PostPosted: 07. October 2011 10:43
by snoopy20
What was Perl compiled with? I'm trying to install Perl::Magick and it's a no go as asking for cl.exe. I found that and installed but have various other problems.

Cheers, Andrew

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 07. October 2011 10:51
by JonB
That would be very hard to answer without knowing the XAMPP version you are referring to???

Good Luck
8)


ycf

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 07. October 2011 12:23
by snoopy20
Using the latest, 1.77 on Windows 7 64.

Andy

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 07. October 2011 18:46
by JonB
After a bit of research (I'm still going to check further) I 'think' the Perl EXECUTABLE included with XAMPP 1.7.7 for Windows was compiled with Visual C++ Version 6.

Image


However, I don't 'think' you should need to compile the Perl module for this version. Have you tried cpan.bat? (I'm at work, and can't test now)

this is not very elucidating, BTW -
but have various other problems.
:shock:



Good Luck

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 07. October 2011 20:12
by snoopy20
I have tried many, many things.

With cpan, it tries to run cl.exe to build perL::magick, this I found in a microsoft c++ visual studio express, but then there are a whole load of dependencies which were the "other problems". After sorting many of those I gave up, in the believe that the express version is now #9 or #10. I was then told I have to use the same version (#6 you say).

What is needed is for a dev to go cpan install image::magick and to tell us immortals what we need to compile perl modules.

// now desperate btw, I've had to come back to Windows from Linux which was hard enough on my soul. :cry:

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 08. October 2011 11:48
by snoopy20
Now install Visual Studio 6...

Any one else got some hope to give?

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 08. October 2011 12:29
by snoopy20
After solving all dependencies I've got...


cp Magick.pm blib\lib\Image\Magick.pm
AutoSplitting blib\lib\Image\Magick.pm (blib\lib\auto\Image\Magick)
C:\xampp\perl\bin\perl.exe C:\xampp\perl\lib\ExtUtils\xsubpp -typemap \
xampp\perl\lib\ExtUtils\typemap -typemap typemap Magick.xs > Magick.xsc && C:\x
ampp\perl\bin\perl.exe -MExtUtils::Command -e "mv" -- Magick.xsc Magick.c
cl -c -I../ -I.. -I"/usr/include/ImageMagick" -fopenmp -g -O2 -Wall -p
thread -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAV
E_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MS
VCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"6.72\" -DXS_VERSION=\"6.72\"
"-I\xampp\perl\lib\CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Command line error D2021 : invalid numeric argument '/Wall'
NMAKE : fatal error U1077: 'cl' : return code '0x2'

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 09. October 2011 00:24
by JonB
Hi snoopy20

I had tried a different route - on a machine at work. the pure CPAN route.

I think it failed because I don't know enough about building with nmake and what's in all the build files and where they should be. The right build files are there...

my First go-round failed because the build file that resulted was encoded with YAML.

Fixed that, and the problem was 'nmake' again - HOWEVER - I got a clue in the process. The CPAN script tried to install and run 'nmake15' (I think) from mdsn. - and I had to go look for where the build files were (\perl\bin\.cpan) there's a folder for each build with the build files inside.

BY the way - you know that info page I posted earlier tells you all the options to set, right????

I'll try again on that machine at work when I take a break sometime Monday.

Good Luck
8)

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 09. October 2011 13:52
by snoopy20
What do you mean by this?

>> BY the way - you know that info page I posted earlier tells you all the options to set, right????

I'm a novice when it comes to cpan and perl building. ;)

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 10. October 2011 20:24
by snoopy20
^^^ :(

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 10. October 2011 21:05
by JonB
I had an 'Exploding CEO's head crisis' at work today - no chance to do much -

The compiler options used are listed here in the image -

"Additional C Compiler Flags"

IF you are no longer getting 'nmake' errors, then I think you might have luck with 'either'

A - adding the path to cl.exe to your path

>path %path%;c:\Program Files\path_to_cl.exe <== obviously change this to match where cl.exe is - you may need to quote-enclose the path if it contains spaces. type 'path' at the command prompt to see if your command was successful. If you reboot - you will need to do it again OR modify your path.

B - copy cl.exe to c:\xampp\perl\bin.

Did you install YAML???

I think this is as far as I can detangle this - :shock:

8)

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 12. October 2011 18:34
by snoopy20
Did all this first time around.

I've give up and installed ActivePerl. It now works.

Also worth mentioning that ActivePerl's perl.exe is _a lot_ faster to complete.

Re: Compiling Perl Modules (i.e Image::Magick)

PostPosted: 12. October 2011 19:09
by JonB
Glad its working. I can't see any reason it matters what Perl executable you use...

Good Luck
8)