Install PerlMagick from Source Code

This section provides a tutorial example on installing PerlMagick module from source code on macOS. Installation failed with the LCD step.



ImageMagick is an objected-oriented Perl interface to ImageMagick. You can use the module to read, manipulate, or write an image or image sequence from within a Perl script.

Here is what I did to try to install ImageMagick on macOS from its source code.

1. Download PerlMagick source code from https://imagemagick.org/download/ImageMagick.tar.gz.

2. Unzip and untar the download file "ImageMagick.tar.gz" All source code files will be unpacked to ImageMagick-7.0.9-9 folder.

3. Run the build PerlMagick with the "make" tool.

herong$ cd ImageMagick-7.0.9-9
herong$ ./configure -with-perl

checking build system type... x86_64-apple-darwin16.7.0
checking host system type... x86_64-apple-darwin16.7.0
checking target system type... x86_64-apple-darwin16.7.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/sh \
  /Users/herong/Downloads/ImageMagick-7.0.9-9/config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '502' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
...

herong$ make
CC       utilities/magick.o
CC       MagickCore/libMagickCore_7_Q16HDRI_la-accelerate.lo
CC       MagickCore/libMagickCore_7_Q16HDRI_la-animate.lo
...
CCLD     MagickCore/libMagickCore-7.Q16HDRI.la
clang: warning: argument unused during compilation: '-pthread' \
   [-Wunused-command-line-argument]
Undefined symbols for architecture x86_64:
  "_aligned_alloc", referenced from:
      _AcquireAlignedMemory in libMagickCore_7_Q16HDRI_la-memory.o
      _AcquireVirtualMemory in libMagickCore_7_Q16HDRI_la-memory.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 
make[1]: *** [MagickCore/libMagickCore-7.Q16HDRI.la] Error 1
make: *** [all] Error 2

Too bad. The build process failed.



 

Table of Contents

 About This Book

 Perl on Linux Systems

 ActivePerl on Windows Systems

 Data Types: Values and Variables

 Expressions, Operations and Simple Statements

 User Defined Subroutines

 Perl Built-in Debugger

 Name Spaces and Perl Module Files

 Symbolic (or Soft) References

 Hard References - Addresses of Memory Objects

 Objects (or References) and Classes (or Packages)

 Typeglob and Importing Identifiers from Other Packages

 String Built-in Functions and Performance

 File Handles and Data Input/Output

 Open Files in Binary Mode

 Open Directories and Read File Names

 File System Functions and Operations

Image and Picture Processing

 Imager - Create and Save Image

 Imager - Draw Graphical Elements

 Imager - Convert Image File Format

 Imager::File::PNG - PNG File Format

 Install LIBPNG from Source Code

 Install Imager::File::PNG Manually

Install PerlMagick from Source Code

 Using DBM Database Files

 Using MySQL Database Server

 Socket Communication Over the Internet

 XML::Simple Module - XML Parser and Generator

 XML Communication Model

 SOAP::Lite - SOAP Server-Client Communication Module

 Perl Programs as IIS Server CGI Scripts

 CGI (Common Gateway Interface)

 XML-RPC - Remote Procedure Call with XML and HTTP

 RPC::XML - Perl Implementation of XML-RPC

 Integrating Perl with Apache Web Server

 CGI.pm Module for Building Web Pages

 LWP::UserAgent and Web Site Testing

 Converting Perl Script to Executable Binary

 Managing Perl Engine and Modules on macOS

 References

 Full Version in PDF/EPUB