blob: 4a51d0888796dd4156c18e572203048fa18fdc07 [file] [log] [blame]
cristyebe41ab2010-01-14 02:58:18 +00001Download & Unpack
2
3 ImageMagick builds on a variety of Unix and Unix-like operating systems
4 including Linux, Solaris, FreeBSD, Mac OS X, and others. A compiler is
5 required and fortunately almost all modern Unix systems have one. Download
6 ImageMagick.tar.gz from ftp.imagemagick.org or its mirrors and verify the
7 distribution against its message digest.
8
9 Unpack the distribution it with this command:
10
11 $magick> tar xvfz ImageMagick.tar.gz
12
13 Now that you have the ImageMagick Unix/Linux source distribution unpacked,
14 let's configure it.
15
16Configure
17
18 The configure script looks at your environment and decides what it can cobble
19 together to get ImageMagick compiled and installed on your system. This
20 includes finding a compiler, where your compiler header files are located
21 (e.g. stdlib.h), and if any delegate libraries are available for ImageMagick
22 to use (e.g. JPEG, PNG, TIFF, etc.). If you are willing to accept configure's
23 default options, and build from within the source directory, you can simply
24 type:
25
Cristy3607cc22016-12-11 17:42:56 -050026 $magick> cd ImageMagick-7.0.4
cristyebe41ab2010-01-14 02:58:18 +000027 $magick> ./configure
28
29 Watch the configure script output to verify that it finds everything that
30 you think it should. Pay particular attention to the last lines of the script
31 output. For example, here is a recent report from our system:
32
33 ImageMagick is configured as follows. Please verify that this configuration
34 matches your expectations.
35
36 Host system type: x86_64-unknown-linux-gnu
37 Build system type: x86_64-unknown-linux-gnu
38
39 Option Value
40 ----------------------------------------------------------------------------
41 Shared libraries --enable-shared=yes yes
42 Static libraries --enable-static=yes yes
43 Module support --with-modules=yes yes
44 GNU ld --with-gnu-ld=yes yes
45 Quantum depth --with-quantum-depth=16 16
46 High Dynamic Range Imagery
47 --enable-hdri=no no
48
49 Delegate Configuration:
50 BZLIB --with-bzlib=yes yes
51 Autotrace --with-autotrace=yes yes
52 DJVU --with-djvu=yes no
53 DPS --with-dps=yes no
54 FlashPIX --with-fpx=yes no
55 FontConfig --with-fontconfig=yes yes
56 FreeType --with-freetype=yes yes
57 GhostPCL None pcl6 (unknown)
58 GhostXPS None gxps (unknown)
59 Ghostscript None gs (8.63)
60 result_ghostscript_font_dir='none'
61 Ghostscript fonts --with-gs-font-dir=default
62 Ghostscript lib --with-gslib=yes no (failed tests)
63 Graphviz --with-gvc=yes yes
64 JBIG --with-jbig= no
65 JPEG v1 --with-jpeg=yes yes
66 JPEG-2000 --with-jp2=yes yes
cristy6e5802e2011-05-24 22:44:07 +000067 LCMS v1 --with-lcms=yes yes
68 LCMS v2 --with-lcms2=yes yes
cristyebe41ab2010-01-14 02:58:18 +000069 LQR --with-lqr=yes no
70 Magick++ --with-magick-plus-plus=yes yes
71 OpenEXR --with-openexr=yes yes
72 PERL --with-perl=yes /usr/bin/perl
73 PNG --with-png=yes yes
74 RSVG --with-rsvg=yes yes
75 TIFF --with-tiff=yes yes
76 result_windows_font_dir='none'
77 Windows fonts --with-windows-font-dir=
78 WMF --with-wmf=yes yes
79 X11 --with-x= yes
80 XML --with-xml=yes yes
81 ZLIB --with-zlib=yes yes
82
83 X11 Configuration:
84 X_CFLAGS =
85 X_PRE_LIBS = -lSM -lICE
86 X_LIBS =
87 X_EXTRA_LIBS =
88
89 Options used to compile and link:
90 PREFIX = /usr/local
91 EXEC-PREFIX = /usr/local
92 VERSION = 6.4.8
93 CC = gcc -std=gnu99
94 CFLAGS = -fopenmp -g -O2 -Wall -W -pthread
95 MAGICK_CFLAGS = -fopenmp -g -O2 -Wall -W -pthread
96 CPPFLAGS = -I/usr/local/include/ImageMagick
97 PCFLAGS = -fopenmp
98 DEFS = -DHAVE_CONFIG_H
99 LDFLAGS = -lfreetype
100 MAGICK_LDFLAGS = -L/usr/local/lib -lfreetype
101 LIBS = -lMagickCore -llcms -ltiff -lfreetype -ljpeg
102 -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz
103 -lm -lgomp -lpthread -lltdl
104 CXX = g++
105 CXXFLAGS = -g -O2 -Wall -W -pthread
106
107 You can influence choice of compiler, compilation flags, or libraries of the
108 configure script by setting initial values for variables in the configure
109 command line. These include, among others:
110
111 CC
112 Name of C compiler (e.g. cc -Xa) to use.
cristy3ed852e2009-09-05 21:47:34 +0000113
cristyebe41ab2010-01-14 02:58:18 +0000114 CXX
115 Name of C++ compiler to use (e.g. CC).
cristy3ed852e2009-09-05 21:47:34 +0000116
cristyebe41ab2010-01-14 02:58:18 +0000117 CFLAGS
118 Compiler flags (e.g. -g -O2) to compile C code.
cristy3ed852e2009-09-05 21:47:34 +0000119
cristyebe41ab2010-01-14 02:58:18 +0000120 CXXFLAGS
121 Compiler flags (e.g. -g -O2) to compile C++ code.
cristy3ed852e2009-09-05 21:47:34 +0000122
cristyebe41ab2010-01-14 02:58:18 +0000123 CPPFLAGS
124 Include paths (.e.g. -I/usr/local) to look for header files.
cristy3ed852e2009-09-05 21:47:34 +0000125
cristyebe41ab2010-01-14 02:58:18 +0000126 LDFLAGS
127 Library paths (.e.g. -L/usr/local) to look for libraries systems that
128 support the notion of a library run-path may require an additional
129 argument in order to find shared libraries at run time. For example,
130 the Solaris linker requires an argument of the form -R/path. Some
131 Linux systems will work with -rpath /usr/local/lib, while some other
132 Linux systems who's gcc does not pass -rpath to the linker, require
133 an argument of the form -Wl,-rpath,/usr/local/lib.
cristy3ed852e2009-09-05 21:47:34 +0000134
cristyebe41ab2010-01-14 02:58:18 +0000135 LIBS
136 Extra libraries (.e.g. -l/usr/local/lib) required to link.
137
138 Here is an example of setting configure variables from the command line:
139
140 $magick> ./configure CC=c99 CFLAGS=-O2 LIBS=-lposix
141
142 Any variable (e.g. CPPFLAGS or LDFLAGS) which requires a directory path must
143 specify an absolute path rather than a relative path.
144
145 Configure can usually find the X include and library files automagically,
146 but if it doesn't, you can use the --x-includes=path and --x-libraries=path
147 options to specify their locations.
148
149 The configure script provides a number of ImageMagick specific
150 options. When disabling an option --disable-something is equivalent to
151 specifying --enable-something=no and --without-something is equivalent to
152 --with-something=no. The configure options are as follows (execute configure
153 --help to see all options).
154
155 ImageMagick options represent either features to be enabled, disabled,
156 or packages to be included in the build. When a feature is enabled (via
157 --enable-something), it enables code already present in ImageMagick. When a
158 package is enabled (via --with-something), the configure script will search
159 for it, and if is properly installed and ready to use (headers and built
160 libraries are found by compiler) it will be included in the build. The
161 configure script is delivered with all features disabled and all packages
162 enabled. In general, the only reason to disable a package is if a package
163 exists but it is unsuitable for the build (perhaps an old version or not
164 compiled with the right compilation flags).
165
166 Here are the optional features you can configure:
167
168 --enable-shared
169 build the shared libraries and support for loading coder and process
170 modules. Shared libraries are preferred because they allow programs
171 to share common code, making the individual programs much smaller. In
172 addition shared libraries are required in order for PerlMagick to be
173 dynamically loaded by an installed PERL (otherwise an additional PERL
174 (PerlMagick) must be installed.
175
176 ImageMagick built with delegates (see MAGICK PLUG-INS below) can pose
177 additional challenges. If ImageMagick is built using static libraries (the
178 default without --enable-shared) then delegate libraries may be built as
179 either static libraries or shared libraries. However, if ImageMagick is
180 built using shared libraries, then all delegate libraries must also be
181 built as shared libraries. Static libraries usually have the extension
182 .a, while shared libraries typically have extensions like .so, .sa, or
183 .dll. Code in shared libraries normally must compiled using a special
184 compiler option to produce Position Independent Code (PIC). The only
185 time this not necessary is if the platform compiles code as PIC by
186 default.
187
188 PIC compilation flags differ from vendor to vendor (gcc's is
189 -fPIC). However, you must compile all shared library source with the
190 same flag (for gcc use -fPIC rather than -fpic). While static libraries
191 are normally created using an archive tool like ar, shared libraries
192 are built using special linker or compiler options (e.g. -shared for gcc).
193
194 If --enable-shared is not specified, a new PERL interpreter (PerlMagick)
195 is built which is statically linked against the PerlMagick extension. This
196 new interpreter is installed into the same directory as the ImageMagick
197 utilities. If --enable-shared is specified, the PerlMagick extension is
198 built as a dynamically loadable object which is loaded into your current
199 PERL interpreter at run-time. Use of dynamically-loaded extensions is
200 preferable over statically linked extensions so use --enable-shared if
201 possible (note that all libraries used with ImageMagick must be shared
202 libraries!).
203
204 --disable-static
205 static archive libraries (with extension .a) are not built. If you
206 are building shared libraries, there is little value to building static
207 libraries. Reasons to build static libraries include: 1) they can be
208 easier to debug; 2) clients do not have external dependencies (i.e.
209 libMagick.so); 3) building PIC versions of the delegate libraries may
210 take additional expertise and effort; 4) you are unable to build shared
211 libraries.
212
213 --disable-installed
214 disable building an installed ImageMagick (default enabled).
215
216 By default the ImageMagick build is configured to formally install
217 into a directory tree. This the most secure and reliable way to install
218 ImageMagick. Use this option to configure ImageMagick so that it doesn't
219 use hard-coded paths and locates support files by computing an offset path
220 from the executable (or from the location specified by the MAGICK_HOME
221 environment variable. The uninstalled configuration is ideal for binary
222 distributions which are expected to extract and run in any location.
223
224 --enable-ccmalloc
225 enable 'ccmalloc' memory debug support (default disabled).
226
227 --enable-prof
228 enable 'prof' profiling support (default disabled).
229
230 --enable-gprof
231 enable 'gprof' profiling support (default disabled).
232
233 --enable-gcov
234
235 enable 'gcov' profiling support (default disabled).
236 --disable-openmp
237 disable OpenMP (default enabled).
238
239 Certain ImageMagick algorithms, for example convolution, can achieve
240 a significant speed-up with the assistance of the OpenMP API when
241 running on modern dual and quad-core processors.
242
243 --disable-largefile
244 disable support for large (64 bit) file offsets.
245
246 By default, ImageMagick is compiled with support for large files (>
247 2GB on a 32-bit CPU) if the operating system supports large files. Some
248 applications which use the ImageMagick library may also require support
249 for large files. By disabling support for large files via
250 --disable-largefile, dependent applications do not require special
251 compilation options for large files in order to use the library.
252
253 Here are the optional packages you can configure:
cristy71d8c202012-03-20 17:05:01 +0000254
255 --enable-legacy-support
256 install legacy command-line utilities (default disabled).
cristyebe41ab2010-01-14 02:58:18 +0000257
258 --with-quantum-depth
259 number of bits in a pixel quantum (default 16).
260
261 Use this option to specify the number of bits to use per pixel quantum
262 (the size of the red, green, blue, and alpha pixel components). For
263 example, --with-quantum-depth=8 builds ImageMagick using 8-bit quantums.
264 Most computer display adapters use 8-bit quantums. Currently supported
265 arguments are 8, 16, or 32. We recommend the default of 16 because
266 some image formats support 16 bits-per-pixel. However, this option is
267 important in determining the overall run-time performance of ImageMagick.
268
269 The number of bits in a quantum determines how many values it may
270 contain. Each quantum level supports 256 times as many values as the
271 previous level. The following table shows the range available for various
272 quantum sizes.
273
274 Quantum Depth Valid Range (Decimal) Valid Range (Hex)
275 8 0-255 00-FF
276 16 0-65535 0000-FFFF
277 32 0-4294967295 00000000-FFFFFFFF
278
279 Larger pixel quantums can cause ImageMagick to run more slowly and to
280 require more memory. For example, using sixteen-bit pixel quantums can
281 cause ImageMagick to run 15% to 50% slower (and take twice as much memory)
282 than when it is built to support eight-bit pixel quantums.
283
284 The amount of virtual memory consumed by an image can be computed by
285 the equation (5 * Quantum Depth * Rows * Columns) / 8. This an important
286 consideration when resources are limited, particularly since processing
287 an image may require several images to be in memory at one time. The
288 following table shows memory consumption values for a 1024x768 image:
289
290 Quantum Depth Virtual Memory
291 8 3MB
292 16 8MB
293 32 15MB
294
295 --enable-hdri
296 accurately represent the wide range of intensity levels (experimental).
297
298 --enable-osx-universal-binary
299 build a universal binary on OS X.
300
301 --without-modules
302 disable support for dynamically loadable modules.
303
304 Image coders and process modules are built as loadable modules which are
305 installed under the directory [prefix]/lib/ImageMagick-X.X.X/modules-QN
306 (where 'N' equals 8, 16, or 32 depending on the quantum depth) in the
307 subdirectories coders and filters respectively. The modules build option
308 is only available in conjunction with --enable-shared. If --enable-shared
309 is not also specified, support for building modules is disabled. Note that
310 if --enable-shared and --disable-modules are specified, the module loader
311 is active (allowing extending an installed ImageMagick by simply copying
312 a module into place) but ImageMagick itself is not built using modules.
313
314 --with-cache
315 set pixel cache threshold (defaults to available memory).
316
317 Specify a different image pixel cache threshold with this option. This
318 sets the maximum amount of heap memory that ImageMagick is allowed to
319 consume before switching to using memory-mapped temporary files to store
320 raw pixel data.
321
322 --without-threads
323 disable threads support.
324
325 By default, the ImageMagick library is compiled with multi-thread
326 support. If this undesirable, specify --without-threads.
327
328 --with-frozenpaths
329 enable frozen delegate paths.
330
331 Normally, external program names are substituted into the delegates.xml
332 configuration file without full paths. Specify this option to enable
333 saving full paths to programs using locations determined by configure.
334 This useful for environments where programs are stored under multiple
335 paths, and users may use different PATH settings than the person who
336 builds ImageMagick.
337
338 --without-magick-plus-plus
339 disable build/install of Magick++.
340
341 Disable building Magick++, the C++ application programming interface
342 to ImageMagick. A suitable C++ compiler is required in order to build
343 Magick++. Specify the CXX configure variable to select the C++ compiler
344 to use (default g++), and CXXFLAGS to select the desired compiler
345 optimization and debug flags (default -g -O2). Antique C++ compilers
346 will normally be rejected by configure tests so specifying this option
347 should only be necessary if Magick++ fails to compile.
cristy8eb4a672012-09-08 23:45:06 +0000348
349 --with-package-release-name
350 encode this name into the shared library name (see libtools -release
351 option).
cristyebe41ab2010-01-14 02:58:18 +0000352
353 --without-perl
354 disable build/install of PerlMagick, or
355
356 By default, PerlMagick is conveniently compiled and installed as part
357 of ImageMagick's normal configure, make, sudo make install process. When
358 --without-perl is specified, you must first install ImageMagick, change to
359 the PerlMagick subdirectory, build, and finally install PerlMagick. Note,
360 PerlMagick is configured even if --without-perl is specified. If the
361 argument --with-perl=/path/to/perl is supplied, /../path/to/perl is be
362 taken as the PERL interpreter to use. This important in case the perl
363 executable in your PATH is not PERL5, or is not the PERL you want to use.
364
365 --with-perl=PERL
366 use specified Perl binary to configure PerlMagick.
367
368 --with-perl-options=OPTIONS
369 options to pass on command-line when generating PerlMagick's Makefile
370 from Makefile.PL.
371
372 The PerlMagick module is normally installed using the Perl interpreter's
373 installation PREFIX, rather than ImageMagick's. If ImageMagick's
374 installation prefix is not the same as PERL's PREFIX, then you
375 may find that PerlMagick's sudo make install step tries to install
376 into a directory tree that you don't have write permissions to. This
377 common when PERL is delivered with the operating system or on Internet
378 Service Provider (ISP) web servers. If you want PerlMagick to install
379 elsewhere, then provide a PREFIX option to PERL's configuration step
380 via "--with-perl-options=PREFIX=/some/place". Other options accepted by
381 MakeMaker are 'LIB', 'LIBPERL_A', 'LINKTYPE', and 'OPTIMIZE'. See the
382 ExtUtils::MakeMaker(3) manual page for more information on configuring
383 PERL extensions.
384
385 --without-bzlib
386 disable BZLIB support.
387
388 --without-dps
389 disable Display Postscript support.
390
391 --with-fpx
392 enable FlashPIX support.
393
394 --without-freetype
395 disable TrueType support.
396
397 --with-gslib
398 enable Ghostscript library support.
399
400 --without-jbig
401 disable JBIG support.
402
403 --without-jpeg
404 disable JPEG support.
405
406 --without-jp2
407 disable JPEG v2 support.
408
409 --without-lcms
cristy6e5802e2011-05-24 22:44:07 +0000410 disable lcms (v1.1X) support
411
412 --without-lcms2
413 disable lcms (v2.X) support
cristyebe41ab2010-01-14 02:58:18 +0000414
cristyfbb0ef02010-12-19 02:32:11 +0000415 --without-lzma
416 disable LZMA support.
417
cristyebe41ab2010-01-14 02:58:18 +0000418 --without-png
419 disable PNG support.
420
421 --without-tiff
422 disable TIFF support.
423
424 --without-wmf
425 disable WMF support.
426
427 --with-fontpath
428 prepend to default font search path.
429
430 --with-gs-font-dir
431 directory containing Ghostscript fonts.
432
433 Specify the directory containing the Ghostscript Postscript Type 1 font
434 files (e.g. n022003l.pfb) so that they can be rendered using the FreeType
435 library. If the font files are installed using the default Ghostscript
436 installation paths (${prefix}/share/ghostscript/fonts), they should
437 be discovered automagically by configure and specifying this option is
438 not necessary. Specify this option if the Ghostscript fonts fail to be
439 located automagically, or the location needs to be overridden.
440
441 --with-windows-font-dir
442 directory containing MS-Windows fonts.
443
444 Specify the directory containing MS-Windows-compatible fonts. This not
445 necessary when ImageMagick is running under MS-Windows.
446
447 --without-xml
448 disable XML support.
449
450 --without-zlib
451 disable ZLIB support.
452
453 --without-x
454 don't use the X Window System.
455
456 By default, ImageMagick uses the X11 delegate libraries if they are
457 available. When --without-x is specified, use of X11 is disabled. The
458 display, animate, and import sub-commands are not included. The remaining
459 sub-commands have reduced functionality such as no access to X11 fonts
460 (consider using Postscript or TrueType fonts instead).
461
462 --with-share-path=DIR
463 Alternate path to share directory (default share/ImageMagick).
464
465 --with-libstdc=DIR
466 use libstdc++ in DIR (for GNU C++).
467
cristy3ed852e2009-09-05 21:47:34 +0000468 While configure is designed to ease installation of ImageMagick, it often
469 discovers problems that would otherwise be encountered later when compiling
470 ImageMagick. The configure script tests for headers and libraries by
471 executing the compiler (CC) with the specified compilation flags (CFLAGS),
472 pre-processor flags (CPPFLAGS), and linker flags (LDFLAGS). Any errors are
cristyebe41ab2010-01-14 02:58:18 +0000473 logged to the file config.log. If configure fails to discover a header or
474 library please review this log file to determine why, however, please be
475 aware that *errors in the config.log are normal* because configure works by
476 trying something and seeing if it fails. An error in config.log is only a
477 problem if the test should have passed on your system.
478
cristy3ed852e2009-09-05 21:47:34 +0000479 Common causes of configure failures are: 1) a delegate header is not in the
480 header include path (CPPFLAGS -I option); 2) a delegate library is not in
cristyebe41ab2010-01-14 02:58:18 +0000481 the linker search/run path (LDFLAGS -L/-R option); 3) a delegate library is
482 missing a function (old version?); or 4) compilation environment is faulty.
483
cristy3ed852e2009-09-05 21:47:34 +0000484 If all reasonable corrective actions have been tried and the problem appears
485 be due to a flaw in the configure script, please send a bug report to the
cristyebe41ab2010-01-14 02:58:18 +0000486 ImageMagick Defect Support Forum. All bug reports should contain the operating
487 system type (as reported by uname -a) and the compiler/compiler-version. A
488 copy of the configure script output and/or the relevant portion of config.log
489 file may be valuable in order to find the problem. If you post portions
490 of config.log, please also send a script of the configure output and a
cristy3ed852e2009-09-05 21:47:34 +0000491 description of what you expected to see (and why) so the failure you are
492 observing can be identified and resolved.
cristyebe41ab2010-01-14 02:58:18 +0000493
494 ImageMagick is now configured and ready to build
495
496Build
497
498 Once ImageMagick is configured, these standard build targets are available
499 from the generated make files:
500
501 make
502 build ImageMagick.
503
504 sudo make install
505 install ImageMagick.
506
cristy3ed852e2009-09-05 21:47:34 +0000507 make check
cristyebe41ab2010-01-14 02:58:18 +0000508 Run tests using the installed ImageMagick (sudo make install must be
509 done first). Ghostscript is a prerequisite, otherwise the EPS, PS,
510 and PDF tests will fail.
511
512 make clean
513 Remove everything in the build directory created by make.
514
515 make distclean
516 remove everything in the build directory created by configure and
517 make. This useful if you want to start over from scratch.
518
519 make uninstall
520 Remove all files from the system which are (or would be) installed by sudo
521 make install using the current configuration. Note that this target is
522 imperfect for PerlMagick since Perl no longer supports an uninstall
523 target.
524
dirkcab899e2015-07-31 06:38:02 +0000525 In most cases you will simply want to compile ImageMagick with this command:
cristyebe41ab2010-01-14 02:58:18 +0000526
527 $magick> make
528
529 Once built, you can optionally install ImageMagick on your system as
530 discussed below.
531
532Install
533
534 Now that ImageMagick is configured and built, type:
535
536 $magick> make install
537
538 to install it.
539
540 By default, ImageMagick is installs binaries in /../usr/local/bin, libraries
541 in /../usr/local/lib, header files in /../usr/local/include and documentation
542 in /../usr/local/share. You can specify an alternative installation prefix
543 other than /../usr/local by giving configure the option --prefix=PATH. This
544 valuable in case you don't have privileges to install under the default
545 paths or if you want to install in the system directories instead.
546
547 To confirm your installation of the ImageMagick distribution was successful,
548 ensure that the installation directory is in your executable search path
549 and type:
550
551 $magick> display
552
553 The ImageMagick logo is displayed on your X11 display.
554
555 To verify the ImageMagick build configuration, type:
556
557 $magick> identify -list configure
558
559 To list which image formats are supported , type:
560
561 $magick> identify -list format
562
563 For a more comprehensive test, you run the ImageMagick test suite by typing:
564
565 $magick> make check
566
567 Ghostscript is a prerequisite, otherwise the EPS, PS, and PDF tests will
568 fail. Note that due to differences between the developer's environment and
569 your own it is possible that a few tests may fail even though the results are
570 ok. Differences between the developer's environment environment and your own
571 may include the compiler, the CPU type, and the library versions used. The
572 ImageMagick developers use the current release of all dependent libraries.
cristy3ed852e2009-09-05 21:47:34 +0000573
cristyebe41ab2010-01-14 02:58:18 +0000574Linux-specific Build instructions
575
576 Download ImageMagick.src.rpm from ftp.imagemagick.org or its mirrors and
577 verify the distribution against its message digest.
578
579 Build ImageMagick with this command:
580
581 $magick> rpmbuild --rebuild ImageMagick.src.rpm
582
583 After the build you, locate the RPMS folder and install the ImageMagick
584 binary RPM distribution:
585
cristydf1e3822012-03-20 00:48:54 +0000586 $magick> rpm -ivh ImageMagick-7.0.0-?.*.rpm
cristyebe41ab2010-01-14 02:58:18 +0000587
588MinGW-specific Build instructions
589
590 Although you can download and install delegate libraries yourself, many
591 are already available in the GnuWin32 distribution. Download and install
592 whichever delegate libraries you require such as JPEG, PNG, TIFF, etc. Make
593 sure you specify the development headers when you install a package. Next
594 type,
595
cristydf1e3822012-03-20 00:48:54 +0000596 $magick> tar jxvf ImageMagick-7.0.0-?.tar.bz2
597 $magick> cd ImageMagick-7.0.0
cristyebe41ab2010-01-14 02:58:18 +0000598 $magick> export CPPFLAGS="-Ic:/Progra~1/GnuWin32/include"
599 $magick> export LDFLAGS="-Lc:/Progra~1/GnuWin32/lib"
600 $magick> ./configure --without-perl
601 $magick> make $magick> sudo make install
602
603Dealing with Unexpected Problems
604
605 Chances are the download, configure, build, and install of ImageMagick went
606 flawlessly as it is intended, however, certain systems and environments may
607 cause one or more steps to fail. We discuss a few problems we've run across
608 and how to take corrective action to ensure you have a working release
609 of ImageMagick
610
611 Build Problems
612
613 If the build complains about missing dependencies (e.g. .deps/source.PLO),
614 add --disable-dependency-tracking to your configure command line.
615
616 Some systems may fail to link at build time due to unresolved symbols. Try
617 adding the LDFLAGS to the configure command line:
618
619 $magick> configure LDFLAGS='-L/usr/local/lib -R/usr/local/lib'
620
621 Dynamic Linker Run-time Bindings
622
623 On some systems, ImageMagick may not find its shared library, libMagick.so. Try
624 running the ldconfig with the library path:
625
626 $magick> /sbin/ldconfig /usr/local/lib
627
628 Solaris and Linux systems have the ldd command which is useful to track which
629 libraries ImageMagick depends on:
630
631 $magick> ldd `which convert`
632
633 Delegate Libraries
634
635 On occasion you may receive these warnings:
636
637 no decode delegate for this image format
638 no encode delegate for this image format
639
640 This exception indicates that an external delegate library or its headers
641 were not available when ImageMagick was built. To add support for the image
642 format, download and install the requisite delegate library and its header
643 files and reconfigure, rebuild, and reinstall ImageMagick. As an example,
644 lets add support for the JPEG image format. First we install the JPEG RPMS:
645
646 $magick> yum install libjpeg libjpeg-devel
647
648 Now reconfigure, rebuild, and reinstall ImageMagick. To verify JPEG is now
649 properly supported within ImageMagick, use this command:
650
651 $magick> identify -list format
652
653 You should see a mode of rw- associated with the JPEG tag. This mode means
654 the image can be read or written and can only support one image per image
655 file.
656
657PerlMagick
658
659 If PerlMagick fails to link with a message similar to libperl.a is not found,
660 rerun configure with the --enable-shared or --enable-shared --with-modules
661 options.