Install legacy utilities (e.g.identify)
Install development headers for C and C++
The first of those 2 options might not be needed (dunno), but the second is required.
I did not select the option that would install PerlMagick for Strawberry Perl. (Not brave enough ;-)
I was a little hesitant to accept the already selected option of "Add application directory to your system path".
I don't think I did that last time. Instead I would just add the appropriate directory (which would now be "C:\d\ImageMagick-7.1.2-Q16-HDRI") to the PATH, when needed. (I won't have to do that now.)
That's it for ImageMagick - all set to go once the perl module Image-Magick-7.1.2 has been built and installed.
Download the Image::Magick source and unpack it into some location, and then cd into the top level folder (ie the one that contains the Makefile.PL).
For me, having unpacked that source into the D:\w\image-magick folder, I then had to cd into D:\w\image-magick\Image-Magick-7.1.2.
Next thing is to make a small correction to the Makefile.PL.
In that file, locate the line "#'CC' => 'gcc -std=gnu99 -std=gnu99'," and change it to"'CC' => 'g++',"
At this point you can simply run "cpan ." and that should build, test and install Image-Magick-7.1.2 for you.
Or you can perform the same task in stages, as follows:
Firstly run "perl Makefile.PL":
D:\w\image-magick\Image-Magick-7.1.2>perl Makefile.PL
Gonna create 'libMagickCore.a' from 'C:\d\ImageMagick-7.1.2-Q16-HDRI\C
+ORE_RL_MagickCore_.dll'
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for
Generating a gmake-style Makefile
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
Then run "gmake":
D:\w\image-magick\Image-Magick-7.1.2>gmake
cp Magick.pm blib\lib\Image\Magick.pm
AutoSplitting blib\lib\Image\Magick.pm (blib\lib\auto\Image\Magick)
Running Mkbootstrap for Magick ()
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" -
+MExtUtils::Command -e chmod -- 644 "Magick.bs"
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" -
+MExtUtils::Command::MM -e cp_nonempty -- Magick.bs blib\arch\auto\Ima
+ge\Magick\Magick.bs 644
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" "
+C:\perl-5.42.0-1510-ucrt-pos\lib\ExtUtils/xsubpp" -typemap C:\perl-5
+.42.0-1510-ucrt-pos\lib\ExtUtils\typemap -typemap D:\w\image-magick\I
+mage-Magick-7.1.2\typemap Magick.xs > Magick.xsc
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" -
+MExtUtils::Command -e mv -- Magick.xsc Magick.c
g++ -c -I"C:\d\ImageMagick-7.1.2-Q16-HDRI\include" -DWIN32 -DWIN64 -f
+diagnostics-color=never -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL
+_IMPLICIT_SYS -DUSE_PERLIO -D__USE_MINGW_ANSI_STDIO -fwrapv -fno-stri
+ct-aliasing -mms-bitfields -O2 -DVERSION=\"7.1.1\" -DXS_VERSION=\"7
+.1.1\" "-IC:\perl-5.42.0-1510-ucrt-pos\lib\MSWin32-x64-multi-thread\
+CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" -
+MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"Image::Magick\", 'DLBASE' => 'Magick', '
+DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' =>
+[]);"
g++ Magick.def -o blib\arch\auto\Image\Magick\Magick.dll -shared -s -L
+"C:\perl-5.42.0-1510-ucrt-pos\lib\MSWin32-x64-multi-thread\CORE" -L"C
+:\winpos-ucrt-1510\mingw64\lib" -L"C:\winpos-ucrt-1510\mingw64\x86_64
+-w64-mingw32\lib" -L"C:\winpos-ucrt-1510\mingw64\lib\gcc\x86_64-w64-m
+ingw32\15.1.0" -L"D:/w/image-magick/Image-Magick-7.1.2" -L"C:\d\Image
+Magick-7.1.2-Q16-HDRI\lib" Magick.o "C:\perl-5.42.0-1510-ucrt-pos\
+lib\MSWin32-x64-multi-thread\CORE\libperl542.a" "libMagickCore.a" "C:
+\winpos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libmoldname.a" "C:\w
+inpos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libkernel32.a" "C:\win
+pos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libuser32.a" "C:\winpos-
+ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libgdi32.a" "C:\winpos-ucrt-
+1510\mingw64\x86_64-w64-mingw32\lib\libwinspool.a" "C:\winpos-ucrt-15
+10\mingw64\x86_64-w64-mingw32\lib\libcomdlg32.a" "C:\winpos-ucrt-1510
+\mingw64\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\winpos-ucrt-1510\m
+ingw64\x86_64-w64-mingw32\lib\libshell32.a" "C:\winpos-ucrt-1510\ming
+w64\x86_64-w64-mingw32\lib\libole32.a" "C:\winpos-ucrt-1510\mingw64\x
+86_64-w64-mingw32\lib\liboleaut32.a" "C:\winpos-ucrt-1510\mingw64\x86
+_64-w64-mingw32\lib\libnetapi32.a" "C:\winpos-ucrt-1510\mingw64\x86_6
+4-w64-mingw32\lib\libuuid.a" "C:\winpos-ucrt-1510\mingw64\x86_64-w64-
+mingw32\lib\libws2_32.a" "C:\winpos-ucrt-1510\mingw64\x86_64-w64-ming
+w32\lib\libmpr.a" "C:\winpos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib
+\libwinmm.a" "C:\winpos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libv
+ersion.a" "C:\winpos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libodbc
+32.a" "C:\winpos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libodbccp32
+.a" "C:\winpos-ucrt-1510\mingw64\x86_64-w64-mingw32\lib\libcomctl32.a
+" -Wl,--enable-auto-image-base
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" -
+MExtUtils::Command -e chmod -- 755 blib\arch\auto\Image\Magick\Magick
+.dll
Then run "gmake test":
D:\w\image-magick\Image-Magick-7.1.2>gmake test
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" -
+MExtUtils::Command::MM -e cp_nonempty -- Magick.bs blib\arch\auto\Ima
+ge\Magick\Magick.bs 644
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" "
+-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness
+::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/blob.t .......... ok
t/composite.t ..... ok
t/filter.t ........ ok
t/getattribute.t .. ok
t/montage.t ....... ok
t/ping.t .......... ok
t/read.t .......... ok
t/setattribute.t .. ok
t/write.t ......... ok
All tests successful.
Files=9, Tests=273, 2 wallclock secs ( 0.11 usr + 0.00 sys = 0.11 C
+PU)
Result: PASS
Finally, run "gmake install":
D:\w\image-magick\Image-Magick-7.1.2>gmake install
"C:\perl-5.42.0-1510-ucrt-pos\bin\MSWin32-x64-multi-thread\perl.exe" -
+MExtUtils::Command::MM -e cp_nonempty -- Magick.bs blib\arch\auto\Ima
+ge\Magick\Magick.bs 644
Files found in blib\arch: installing files in blib\lib into architectu
+re dependent library tree
Installing C:\perl-5.42.0-1510-ucrt-pos\site\lib\MSWin32-x64-multi-thr
+ead\auto\Image\Magick\Magick.dll
Appending installation info to C:\perl-5.42.0-1510-ucrt-pos\lib\MSWin3
+2-x64-multi-thread/perllocal.pod
If something goes wrong and you want to redo the build, just run "gmake realclean" and then repeat the procedure, starting with the "perl Makefile.PL" step.
As you can see - my perl is not actually Strawberry Perl. But I get essentially the same results building with my portable edition of Strawberry Perl-5.40.0.1.
The only difference I detected is that the Strawberry Perl build emitted the following warning during the "gmake" step:
cc1plus.exe: warning: command-line option '-std=c99' is valid for C/Ob
+jC but not for C++
I don't like perl being built with the "-std=c99" flag included in $Config{ccflags}, so I build my own perls such that they don't do that.
Anyway, the warning is apparently benign.
Cheers, Rob |