Errors trying to install perl Image::Magick module on macOS, ventura, 13.2 (Intel machine) - perl

I have imagemagick installed with brew as well as opencl-headers. Trying to install perl's Image::Magick module running on Perl 5.36, I get the following errors running cpanm Image::Magick:
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.64)
Checking if you have parent 0 ... Yes (0.238)
Building and testing Image-Magick-v7.0.11 ... cp Magick.pm blib/lib/Image/Magick.pm
AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick)
Running Mkbootstrap for Magick ()
chmod 644 "Magick.bs"
"/Users/steve/perl5/perlbrew/perls/perl-5.36.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Magick.bs blib/arch/auto/Image/Magick/Magick.bs 644
"/Users/steve/perl5/perlbrew/perls/perl-5.36.0/bin/perl" "/Users/steve/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0/ExtUtils/xsubpp" -typemap '/Users/steve/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0/ExtUtils/typemap' -typemap '/Users/steve/.cpanm/work/1675177488.60361/Image-Magick-7.0.11/typemap' Magick.xs > Magick.xsc
mv Magick.xsc Magick.c
cc -c -I/usr/local/include/ImageMagick-7 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/ImageMagick-7" -fno-common -DPERL_DARWIN -mmacosx-version-min=12.5 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -I/usr/include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -Wno-error=implicit-function-declaration -O3 -DVERSION=\"7.0.11\" -DXS_VERSION=\"7.0.11\" "-I/Users/steve/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0/darwin-2level/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
rm -f blib/arch/auto/Image/Magick/Magick.bundle
LD_RUN_PATH="/usr/local/lib:/usr/lib" cc -Wl,-rpath,"/usr/local/lib:/usr/lib" -L/usr/local/lib -lMagickCore-7.Q16HDRI -mmacosx-version-min=12.5 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong Magick.o -o blib/arch/auto/Image/Magick/Magick.bundle \
-L/usr/local/lib -lMagickCore-7.Q16HDRI -lm -L/Users/steve/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.0/darwin-2level/CORE \
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: dylib (/usr/local/lib/libMagickCore-7.Q16HDRI.dylib) was built for newer macOS version (13.0) than being linked (12.5)
chmod 755 blib/arch/auto/Image/Magick/Magick.bundle
Manifying 1 pod document
"/Users/steve/perl5/perlbrew/perls/perl-5.36.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Magick.bs blib/arch/auto/Image/Magick/Magick.bs 644
PERL_DL_NONLAZY=1 "/Users/steve/perl5/perlbrew/perls/perl-5.36.0/bin/perl" "-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 ......... Failed 1/32 subtests
Test Summary Report
-------------------
t/write.t (Wstat: 0 Tests: 32 Failed: 1)
Failed test: 24
Files=9, Tests=273, 2 wallclock secs ( 0.06 usr 0.02 sys + 4.10 cusr 0.56 csys = 4.74 CPU)
Result: FAIL
Failed 1/9 test programs. 1/273 subtests failed.
make: *** [test_dynamic] Error 255
FAIL
Also seem to be having issues

Based on the name of the test that was failing:
t/write.t ......... Failed 1/32 subtests
It seems like the problem was likely some kind of permission issue. So I did "cpanm --force Image::Magick". After installing, my Perl script which uses ImageMagick works fine.

Without wishing in the slightest to disparage the work of any of the good folk who port and maintain packages for us, I note the following:
there are just 37 questions tagged perlmagick on StackOverflow, versus 9,000+ on ImageMagick - so your chances of support/assistance are distinctly lower with Perl
Apple has stated its intention to discontinue Perl, PHP and other interpreters in the next macOS version and it is getting more difficult with each macOS release to use ImageMagick with PHP and Perl.
Given the above, I would personally think twice about investing a large amount of effort into PerlMagick on macOS - especially when you consider that it is very simple to use docker and if you go that way, you can run your docker image on any macOS or Linux machine without worrying about the vagaries of the distribution. So, here is a very simple way to run PerlMagick in docker:
docker run -it alpine # 2 seconds later
apk update && apk add perl imagemagick-perlmagick # 8 seconds later
# All ready to run PerlMagick - let's test a simple example
perl -MImage::Magick -le 'print Image::Magick->QuantumDepth'
16
Of course, you can put the two apk package management commands into a Dockerfile so they are built-in and don't need running each time.
You can also dynamically bind-mount any macOS directory full of images to process into the docker image so that it can read/write them.

Related

Perl Libraries configuration, conflicts

I'm having troubles with Perl in my server machine I'm not an admin, but I assume I have created my environment, it was working just fine until I installed Conda.
I install Perl using brew so it can help me to configure his libraries.
brew info perl
perl: stable 5.32.0, HEAD
Highly capable, feature-rich programming language
https://www.perl.org/
/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0
If I called cpan Don't work return error below:
ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xcd00080, needed 0xed00080)
unless I unset PERL5LIB env or export it to Perl in the brew
env | grep PERL
PERL5LIB=/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0:
PERL_MB_OPT=--install_base "/lustre/mnad/perl5"
PERL_LOCAL_LIB_ROOT=:/lustre/mnad/perl5
PERL_MM_OPT=INSTALL_BASE=/lustre/mnad/perl5
when I make I run for any Perl script an error occurs:
Can't locate local/lib.pm in #INC (you may need to install the local::lib module) (#INC contains: /lustre....
Can't locate Text/Soundex.pm in #INC (you may need to install the Text::Soundex module) ....
then I tried to
cpan[1]> install local::lib
Reading '/lustre/mnad/.cpan/Metadata'
Database was generated on Tue, 14 Jul 2020 02:17:04 GMT
Running install for module 'local::lib'
Checksum for /lustre/mnad/.cpan/sources/authors/id/H/HA/HAARG/local-lib-2.000024.tar.gz ok
Scanning cache /lustre/mnad/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring H/HA/HAARG/local-lib-2.000024.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for local::lib
Writing MYMETA.yml and MYMETA.json
HAARG/local-lib-2.000024.tar.gz
/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl Makefile.PL -- OK
Running make for H/HA/HAARG/local-lib-2.000024.tar.gz
cp lib/local/lib.pm blib/lib/local/lib.pm
cp lib/POD2/PT_BR/local/lib.pod blib/lib/POD2/PT_BR/local/lib.pod
cp lib/lib/core/only.pm blib/lib/lib/core/only.pm
cp lib/POD2/DE/local/lib.pod blib/lib/POD2/DE/local/lib.pod
Manifying 4 pod documents
HAARG/local-lib-2.000024.tar.gz
/usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/yes', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect
Running make test for HAARG/local-lib-2.000024.tar.gz
PERL_DL_NONLAZY=1 "/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/bad_variables.t ...... ok
t/carp-mismatch.t ...... ok
t/classmethod.t ........ ok
t/de-dup.t ............. ok
t/lib-core-only.t ...... ok
t/pipeline.t ........... ok
t/shell.t .............. ok
t/stackable.t .......... ok
t/subroutine-in-inc.t .. ok
t/taint-mode.t ......... ok
All tests successful.
Files=10, Tests=220, 7 wallclock secs ( 0.08 usr 0.03 sys + 2.68 cusr 2.53 csys = 5.32 CPU)
Result: PASS
Terminal does not support GetHistory.
Lockfile removed.
HAARG/local-lib-2.000024.tar.gz
/usr/bin/make test -- OK
Running make install for HAARG/local-lib-2.000024.tar.gz
Manifying 4 pod documents
Appending installation info to /lustre/mnad/perl5/lib/perl5/x86_64-linux-thread-multi/perllocal.pod
HAARG/local-lib-2.000024.tar.gz
/usr/bin/make install -- OK
and
cpan[2]> install Text::Soundex
Running install for module 'Text::Soundex'
Checksum for /lustre/mnad/.cpan/sources/authors/id/R/RJ/RJBS/Text-Soundex-3.05.tar.gz ok
Configuring R/RJ/RJBS/Text-Soundex-3.05.tar.gz with Makefile.PL
The XS code will be compiled.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Text::Soundex
Writing MYMETA.yml and MYMETA.json
RJBS/Text-Soundex-3.05.tar.gz
/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl Makefile.PL -- OK
Running make for R/RJ/RJBS/Text-Soundex-3.05.tar.gz
cp Soundex.pm blib/lib/Text/Soundex.pm
Running Mkbootstrap for Soundex ()
chmod 644 "Soundex.bs"
"/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Soundex.bs blib/arch/auto/Text/Soundex/Soundex.bs 644
"/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl" "/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0/ExtUtils/xsubpp" -typemap '/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0/ExtUtils/typemap' Soundex.xs > Soundex.xsc
mv Soundex.xsc Soundex.c
cc -c -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/lustre/mnad/.linuxbrew/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"3.05\" -DXS_VERSION=\"3.05\" -fPIC "-I/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0/x86_64-linux-thread-multi/CORE" Soundex.c
rm -f blib/arch/auto/Text/Soundex/Soundex.so
cc -shared -O2 -L/usr/local/lib -fstack-protector-strong Soundex.o -o blib/arch/auto/Text/Soundex/Soundex.so \
\
chmod 755 blib/arch/auto/Text/Soundex/Soundex.so
Manifying 1 pod document
RJBS/Text-Soundex-3.05.tar.gz
/usr/bin/make -- OK
The current configuration of allow_installing_outdated_dists is 'ask/yes', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect
Running make test for RJBS/Text-Soundex-3.05.tar.gz
"/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Soundex.bs blib/arch/auto/Text/Soundex/Soundex.bs 644
PERL_DL_NONLAZY=1 "/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/basic.t .. ok
All tests successful.
Files=1, Tests=18, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.01 cusr 0.02 csys = 0.07 CPU)
Result: PASS
RJBS/Text-Soundex-3.05.tar.gz
/usr/bin/make test -- OK
Running make install for RJBS/Text-Soundex-3.05.tar.gz
"/lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Soundex.bs blib/arch/auto/Text/Soundex/Soundex.bs 644
Manifying 1 pod document
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Appending installation info to /lustre/mnad/perl5/lib/perl5/x86_64-`linux-thread`-multi/perllocal.pod
RJBS/Text-Soundex-3.05.tar.gz
/usr/bin/make install -- OK
Both are installed but when I rerun the Perl tool similar error occurs:
Can't locate local/lib.pm in #INC (you may need to install the local::lib module) (#INC contains: /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0/x86_64-linux-thread-multi /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0 /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/x86_64-linux-thread-multi /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0 /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0/x86_64-linux-thread-multi /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0 /lustre/mnad/.linuxbrew/lib/perl5/site_perl/5.32.0/x86_64-linux-thread-multi /lustre/mnad/.linuxbrew/lib/perl5/site_perl/5.32.0).
BEGIN failed--compilation aborted.
Can't locate Text/Soundex.pm in #INC (you may need to install the Text::Soundex module) (#INC contains: /lustre/mnad/Tools/RM /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0/x86_64-linux-thread-multi /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0 /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/x86_64-linux-thread-multi /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0 /lustre/mnad/.linuxbrew/lib/perl5/site_perl/5.32.0/x86_64-linux-thread-multi /lustre/mnad/.linuxbrew/lib/perl5/site_perl/5.32.0) at /lustre/mnad/Tools/RM/Taxonomy.pm line 80.
BEGIN failed--compilation aborted at /lustre/mnad/Tools/RM/Taxonomy.pm line 80.
Compilation failed in require at ./RepeatMasker line 332.
BEGIN failed--compilation aborted at ./RepeatMasker line 332.
/usr/bin/perl: symbol lookup error: /lustre/mnad/.linuxbrew/Cellar/perl/5.32.0/lib/perl5/5.32.0/x86_64-linux-thread-multi/auto/Socket/Socket.so: undefined symbol: Perl_xs_handshake
Someone help my struggle, please.
which Perl
perl is /lustre/mnad/.linuxbrew/bin/perl
perl is /lustre/mnad/.linuxbrew/bin/perl
perl is /usr/bin/perl
perl --version
This is perl 5, version 32, subversion 0 (v5.32.0) built for x86_64-linux-thread-multi
cpan -v
ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xcd00080, needed 0xed00080)
which cpan
cpan is /lustre/mnad/.linuxbrew/bin/cpan
cpan is /lustre/mnad/.linuxbrew/bin/cpan
cpan is /lustre/mnad/perl5/bin/cpan
cpan is /usr/bin/cpan
This line able to solve it and Cpan start to work, But I still I don't have clear picture.
cd /lustre/mnad && mv perl5 perl5.old

ld unknown option -platform_version while installing perl package

I am trying to install perl package DBD::Pg in my macOS Mojave Version 10.14.6. But I get error for unknown option -platform_version and does not allow make command to continue. How would I be able to solve this? Thank you!
The following is the error I observe
ld: unknown option: -platform_version
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [blib/arch/auto/DBD/Pg/Pg.bundle] Error 1
ld version
ld -v
#(#)PROGRAM:ld PROJECT:ld64-450.3
BUILD 18:16:53 Apr 5 2019
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 10.0.1, (clang-1001.0.46.4) (static support for 22, runtime is 22)
TAPI support using: Apple TAPI version 10.0.1 (tapi-1001.0.4.1)
clang version
clang -v
clang version 10.0.0
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Users/macuser/miniconda3/bin
I updated my Xcode and got clang version 11.0.3 Then I had problems in 'make install' command. I could solve that using the suggestions from the thread https://github.com/bucardo/dbdpg/issues/69 #briandfoy posted. Thank you very much!
I tried this on macOS 10.15.5, perlbrew perl 5.30.1.
First I installed PostgreSQL version 12.3 from
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
Downloaded the perl module DBD::Pg tarball https://cpan.metacpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-3.13.0.tar.gz
Installed the package:
$ POSTGRES_HOME=/Library/PostgreSQL/12 perl Makefile.PL
Configuring DBD::Pg 3.13.0
PostgreSQL version: 120003 (default port: 5432)
POSTGRES_HOME: /Library/PostgreSQL/12
POSTGRES_INCLUDE: /Library/PostgreSQL/12/include
POSTGRES_LIB: /Library/PostgreSQL/12/lib
OS: darwin
Checking if your kit is complete...
Looks good
Using DBI 1.643 (for perl 5.030001 on darwin-2level) installed in /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI/
Generating a Unix-style Makefile
Writing Makefile for DBD::Pg
Writing MYMETA.yml and MYMETA.json
$ make
cp Pg.pm blib/lib/DBD/Pg.pm
cp lib/Bundle/DBD/Pg.pm blib/lib/Bundle/DBD/Pg.pm
Running Mkbootstrap for Pg ()
chmod 644 "Pg.bs"
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/" /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI/Driver.xst > Pg.xsi
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" "/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/ExtUtils/xsubpp" -typemap '/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/ExtUtils/typemap' Pg.xs > Pg.xsc
mv Pg.xsc Pg.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" Pg.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" dbdimp.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" quote.c
cc -c -I/Library/PostgreSQL/12/include -I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBI -fno-common -DPERL_DARWIN -mmacosx-version-min=10.15 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -DPGLIBVERSION=120003 -DPGDEFPORT=5432 -O3 -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"3.13.0\" -DXS_VERSION=\"3.13.0\" "-I/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/CORE" types.c
rm -f blib/arch/auto/DBD/Pg/Pg.bundle
LD_RUN_PATH="/Library/PostgreSQL/12/lib" cc -mmacosx-version-min=10.15 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong Pg.o dbdimp.o quote.o types.o -o blib/arch/auto/DBD/Pg/Pg.bundle \
-L/Library/PostgreSQL/12/lib -lpq -lm \
chmod 755 blib/arch/auto/DBD/Pg/Pg.bundle
Manifying 2 pod documents
$ make test
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_signature.t ....... skipped: Set the environment variable TEST_SIGNATURE to enable this test
t/00basic.t ............ ok
t/01connect.t .......... Please wait, creating new database (version 12.3) for testing
t/01connect.t .......... 1/15 #
# DBI Version 1.643
# DBD::Pg Version 3.13.0
# Perl Version 5.30.1
# OS darwin
# PostgreSQL (compiled) 120003
# PostgreSQL (target) 120300
# PostgreSQL (reported) PostgreSQL 12.3 on x86_64-apple-darwin, compiled by Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn), 64-bit
# Default port 5432
# DBI_DSN dbi:Pg:db="postgres";port=5440;host=<pwd>/dbdpg_test_database/data/socket
# DBI_USER hakonhaegland
# Test schema dbd_pg_testschema
# LANG C
# Adjusted: initdb
t/01connect.t .......... ok
t/01constants.t ........ ok
t/02attribs.t .......... ok
t/03dbmethod.t ......... ok
t/03smethod.t .......... ok
t/04misc.t ............. ok
t/06bytea.t ............ ok
t/07copy.t ............. ok
t/08async.t ............ ok
t/09arrays.t ........... ok
t/10_pg_error_field.t .. ok
t/12placeholders.t ..... ok
t/20savepoints.t ....... ok
t/30unicode.t .......... ok
t/99cleanup.t .......... ok
All tests successful.
Files=17, Tests=2908, 31 wallclock secs ( 0.55 usr 0.11 sys + 5.99 cusr 2.38 csys = 9.03 CPU)
Result: PASS
$ make install
"/Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pg.bs blib/arch/auto/DBD/Pg/Pg.bs 644
Manifying 2 pod documents
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/auto/DBD/Pg/Pg.bundle
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/Bundle/DBD/Pg.pm
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/site_perl/5.30.1/darwin-2level/DBD/Pg.pm
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/man/man3/Bundle::DBD::Pg.3
Installing /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/man/man3/DBD::Pg.3
Appending installation info to /Users/hakonhaegland/perl5/perlbrew/perls/perl-5.30.1/lib/5.30.1/darwin-2level/perllocal.pod
My compiler version is:
$ cc --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Can't install perl package Games::Irrlicht - fatal error

I'm trying to install the CPAN module Games::Irrlicht to deal with graphics. Some file isn't getting downloaded properly or something, resulting in a fatal error.
What's wrong?
My terminal output:
cpan[1]> install Games::Irrlicht
Reading '/home/me/.cpan/Metadata'
Database was generated on Sat, 05 Mar 2016 02:17:02 GMT
Running install for module 'Games::Irrlicht'
Checksum for /home/me/.cpan/sources/authors/id/T/TE/TELS/games/Games-Irrlicht-0.04.tar.gz ok
Scanning cache /home/me/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring T/TE/TELS/games/Games-Irrlicht-0.04.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Config::Simple 4.55 not found.
Warning (mostly harmless): No library found for -lIrrlicht
Generating a Unix-style Makefile
Writing Makefile for Games::Irrlicht
Writing MYMETA.yml and MYMETA.json
TELS/games/Games-Irrlicht-0.04.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for T/TE/TELS/games/Games-Irrlicht-0.04.tar.gz
---- Unsatisfied dependencies detected during ----
---- TELS/games/Games-Irrlicht-0.04.tar.gz ----
Config::Simple [requires]
Running install for module 'Config::Simple'
Checksum for /home/me/.cpan/sources/authors/id/S/SH/SHERZODR/Config-Simple-4.58.tar.gz ok
Configuring S/SH/SHERZODR/Config-Simple-4.58.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Config::Simple
Writing MYMETA.yml and MYMETA.json
SHERZODR/Config-Simple-4.58.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for S/SH/SHERZODR/Config-Simple-4.58.tar.gz
cp Simple.pm blib/lib/Config/Simple.pm
AutoSplitting blib/lib/Config/Simple.pm (blib/lib/auto/Config/Simple)
Manifying blib/man3/Config::Simple.3pm
SHERZODR/Config-Simple-4.58.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/bug.t ............. ok
t/create.t .......... ok
t/import.t .......... ok
t/ini.t ............. ok
t/is_modified.t ..... ok
t/read-rv.t ......... ok
t/simple.t .......... ok
t/simplified-ini.t .. ok
t/tie.t ............. ok
All tests successful.
Files=9, Tests=75, 1 wallclock secs ( 0.06 usr 0.00 sys + 0.24 cusr 0.04 csys = 0.34 CPU)
Result: PASS
SHERZODR/Config-Simple-4.58.tar.gz
/usr/bin/make test -- OK
Running make install
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/import_from.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/EXISTS.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/TIEHASH.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/NEXTKEY.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/hashref.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/CLEAR.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/FIRSTKEY.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/verbose.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/param_hash.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/block.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/vars.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/autosplit.ix
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/errstr.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/dump.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/import_names.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/DELETE.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/FETCH.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/write_string.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/STORE.al
Installing /usr/local/share/perl/5.20.2/auto/Config/Simple/error.al
Installing /usr/local/share/perl/5.20.2/Config/Simple.pm
Installing /usr/local/man/man3/Config::Simple.3pm
Appending installation info to /usr/local/lib/x86_64-linux-gnu/perl/5.20.2/perllocal.pod
SHERZODR/Config-Simple-4.58.tar.gz
/usr/bin/make install -- OK
TELS/games/Games-Irrlicht-0.04.tar.gz
Has already been unwrapped into directory /home/me/.cpan/build/Games-Irrlicht-0.04-7adKre
TELS/games/Games-Irrlicht-0.04.tar.gz
Has already been prepared
Running make for T/TE/TELS/games/Games-Irrlicht-0.04.tar.gz
cp lib/Games/Irrlicht/Group.pm blib/lib/Games/Irrlicht/Group.pm
cp lib/Games/Irrlicht/EventHandler.pm blib/lib/Games/Irrlicht/EventHandler.pm
cp lib/Games/Irrlicht/Constants.pm blib/lib/Games/Irrlicht/Constants.pm
cp lib/Games/Irrlicht/Timer.pm blib/lib/Games/Irrlicht/Timer.pm
cp lib/Games/Irrlicht/Thingy.pm blib/lib/Games/Irrlicht/Thingy.pm
cp lib/Games/Irrlicht.pm blib/lib/Games/Irrlicht.pm
Running Mkbootstrap for Games::Irrlicht ()
chmod 644 Irrlicht.bs
/usr/bin/perl /usr/share/perl/5.20/ExtUtils/xsubpp -C++ -typemap /usr/share/perl/5.20/ExtUtils/typemap Irrlicht.xs > Irrlicht.xsc && mv Irrlicht.xsc Irrlicht.c
Warning: Found a 'CODE' section which seems to be using 'RETVAL' but no 'OUTPUT' section. in Irrlicht.xs, line 458
g++ -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.20/CORE" Irrlicht.c
Irrlicht.xs:6:31: fatal error: Irrlicht/irrlicht.h: No such file or directory
compilation terminated.
Makefile:362: recipe for target 'Irrlicht.o' failed
make: *** [Irrlicht.o] Error 1
TELS/games/Games-Irrlicht-0.04.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
TELS/games/Games-Irrlicht-0.04.tar.gz : make NO
This is in a terminal in Ubuntu 15.10
The README says to put "precompiled files" and "header files" into specific directories, but I can't find those files.
The README file says
You need to install the Irrlicht engine from http://irrlicht.sf.net
It looks from your log like you haven't done that
You should also read the rest of the README as there are a few other places where things may go wrong

Perl can't install Net::SSL

In order to install RT4.2, I tried to install Net::SSL, but without success. This is the output: (Ubuntu Server12.04, perl 5.14.2)
When I choice N selection that don't test connection, also can't success.
sudo cpan install Net::SSL
[sudo] password for hengaini:
Going to read '/home/hengaini/.cpan/Metadata'
Database was generated on Thu, 20 Feb 2014 09:41:02 GMT
Running install for module 'Net::SSL'
Running make for N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz
Checksum for /home/hengaini/.cpan/sources/authors/id/N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz ok
CPAN.pm: Going to build N/NA/NANIS/Crypt-SSLeay-0.64.tar.gz
The test suite can attempt to connect to public servers to ensure that the
code is working properly. If you are behind a strict firewall or have no
network connectivity, these tests may fail (through no fault of the code).
Do you want to run the live tests (y/N)? [N] y
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lssl32
Warning (mostly harmless): No library found for -lssleay32
Warning (mostly harmless): No library found for -leay32
Generating a Unix-style Makefile
Writing Makefile for Crypt::SSLeay
Writing MYMETA.yml and MYMETA.json
cp lib/Crypt/SSLeay/X509.pm blib/lib/Crypt/SSLeay/X509.pm
cp lib/Net/SSL.pm blib/lib/Net/SSL.pm
cp lib/Crypt/SSLeay/MainContext.pm blib/lib/Crypt/SSLeay/MainContext.pm
cp lib/Crypt/SSLeay/Conn.pm blib/lib/Crypt/SSLeay/Conn.pm
cp lib/Crypt/SSLeay/CTX.pm blib/lib/Crypt/SSLeay/CTX.pm
cp SSLeay.pm blib/lib/Crypt/SSLeay.pm
cp lib/Crypt/SSLeay/Err.pm blib/lib/Crypt/SSLeay/Err.pm
/usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"0.64\" -DXS_VERSION=\"0.64\" -fPIC "-I/usr/lib/perl/5.14/CORE" SSLeay.c
rm -f blib/arch/auto/Crypt/SSLeay/SSLeay.so
LD_RUN_PATH="/lib/x86_64-linux-gnu" cc -shared -O2 -g -L/usr/local/lib -fstack-protector SSLeay.o -o blib/arch/auto/Crypt/SSLeay/SSLeay.so \
-lz -lssl -lcrypto \
chmod 755 blib/arch/auto/Crypt/SSLeay/SSLeay.so
/usr/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- SSLeay.bs blib/arch/auto/Crypt/SSLeay/SSLeay.bs 644
Manifying blib/man3/Crypt::SSLeay.3pm
Manifying blib/man3/Net::SSL.3pm
NANIS/Crypt-SSLeay-0.64.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-basic.t .... ok
t/01-connect.t .. 1/8
# Failed test 'Net::SSL->new'
# at t/01-connect.t line 28.
# Connect failed: connect: 拒绝连接; 拒绝连接 at t/01-connect.t line 11.
# Looks like you failed 1 test of 8.
t/01-connect.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests
(less 7 skipped subtests: 0 okay)
t/02-live.t ..... # Reading configuration from 'test.config' on linux
# network_tests : 1
t/02-live.t ..... 1/? # [RT #73755] Cheat by disabling LWP::UserAgent host verification
t/02-live.t ..... ok
Test Summary Report
-------------------
t/01-connect.t (Wstat: 256 Tests: 8 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=3, Tests=28, 2 wallclock secs ( 0.03 usr 0.00 sys + 0.53 cusr 0.30 csys = 0.86 CPU)
Result: FAIL
Failed 1/3 test programs. 1/28 subtests failed.
make: *** [test_dynamic] 错误 255
NANIS/Crypt-SSLeay-0.64.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports NANIS/Crypt-SSLeay-0.64.tar.gz
Running make install
make test had returned bad status, won't install without force
A very old question, but I was stuck searching for this as well
Instead of attempting to install Perl's SSL modules with CPAN, you should, as #TLP stated in their comment on the original question, use the Ubuntu package manager
apt-cache search net-ssl
Will give a list of packages. For example:
apt install libnet-ssleay-perl
apt install libcrypt-ssleay-perl
These worked for me on Perl v5.20 and v5.30. You will have to search to see which libraries work for yours using apt-cache search
Better yet, I hope you are using a perlbrew or plenv based environment, and since you have at least bothered to install cpan rather than rely on the default packages.
So you seem to missing the libraries and headers for SSL on your system, fix this by:
sudo apt-get install libssl-dev
And if you haven'y already, look into setting up your environment with one of the methods as linked above and look into cpanminus as well for a very useful tool that compliments either of these.
Your problem is that testing after build was not successful and error is occurred in this file t/01-connect.t line 11.
eval {
$sock = Net::SSL->new(
PeerAddr => '127.0.0.1',
PeerPort => 443,
Timeout => 3,
);
};
I can assume that some process is already listening on 127.0.0.1 443 port. Try to stop it and reinstall it again in the way you would like. Tests should always be passed.

Cannot force install GD with cpan/cpanm

I have looked and seen similar issues posted but am unable to get GD working. the following error arises with libgd and libpng installed...
clang -c -I/usr/local/include -arch i386 -arch x86_64 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -Wformat=0 -Os -DVERSION=\"2.50\" -DXS_VERSION=\"2.50\" "-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE" -DHAVE_FT -DHAVE_GIF -DHAVE_ANIMGIF -DVERSION_33 -DHAVE_UNCLOSEDPOLY -DHAVE_FTCIRCLE GD.c
GD.xs:997:18: warning: implicit declaration of function 'gdImageGifAnimBeginPtr' is invalid in C99 [-Wimplicit-function-declaration]
data = (void *) gdImageGifAnimBeginPtr(image,&size,globalcm,loops);
^
GD.xs:1022:18: warning: implicit declaration of function 'gdImageGifAnimAddPtr' is invalid in C99 [-Wimplicit-function-declaration]
data = (void *) gdImageGifAnimAddPtr(image,&size,localcm,leftofs,topofs,delay,disposal,previm);
^
GD.xs:1041:18: warning: implicit declaration of function 'gdImageGifAnimEndPtr' is invalid in C99 [-Wimplicit-function-declaration]
data = (void *) gdImageGifAnimEndPtr(&size);
^
GD.xs:1598:3: warning: implicit declaration of function 'gdImageOpenPolygon' is invalid in C99 [-Wimplicit-function-declaration]
gdImageOpenPolygon(image,polyptr,length,color);
^
GD.xs:2192:16: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (value = hv_fetch(hash,"linespacing",strlen("linespacing"),0)) {
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GD.xs:2192:16: note: place parentheses around the assignment to silence this warning
if (value = hv_fetch(hash,"linespacing",strlen("linespacing"),0)) {
^
( )
...
2 warnings generated.
rm -f blib/arch/auto/GD/GD.bundle
LD_RUN_PATH="/usr/lib:/usr/local/lib" clang -mmacosx-version-min=10.8 -arch i386 -arch x86_64 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector GD.o -o blib/arch/auto/GD/GD.bundle \
-L/usr/local/lib -lz -liconv -lgd \
ld: warning: ignoring file /usr/local/lib/libgd.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libgd.dylib
chmod 755 blib/arch/auto/GD/GD.bundle
/usr/bin/perl -MExtUtils::Command::MM -e 'cp_nonempty' -- GD.bs blib/arch/auto/GD/GD.bs 644
/usr/bin/perl "-Iblib/arch" "-Iblib/lib" bdf_scripts/bdf2gdfont.PLS bdf_scripts/bdf2gdfont.pl
Extracting bdf2gdfont.pl (with variable substitutions)
cp bdf_scripts/bdf2gdfont.pl blib/script/bdf2gdfont.pl
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/bdf2gdfont.pl
Manifying blib/man1/bdf2gdfont.pl.1
Manifying blib/man3/GD.3pm
Manifying blib/man3/GD::Image.3pm
Manifying blib/man3/GD::Polygon.3pm
Manifying blib/man3/GD::Polyline.3pm
Manifying blib/man3/GD::Simple.3pm
Running Mkbootstrap for GD ()
chmod 644 GD.bs
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Testing using gif support.
t/GD.t ........
Failed 6/12 subtests
(less 3 skipped subtests: 3 okay)
t/Polyline.t .. ok
Test Summary Report
-------------------
t/GD.t (Wstat: 0 Tests: 12 Failed: 6)
Failed tests: 2-7
Files=2, Tests=13, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.10 cusr 0.01 csys = 0.14 CPU)
Result: FAIL
Failed 1/2 test programs. 6/13 subtests failed.
make: *** [test_dynamic] Error 255
-> FAIL Installing GD failed. See /Users/lraven/.cpanm/work/1391048234.74068/build.log for details. Retry with --force to force install it.
Expiring 19 work directories.
All other modules I need are installing, just not GD.
I am using OS X 10.8.5, bash version 3.2.48, perl version 5.012 and cpanm version 1.7
Before you can install GD the Perl module you must have installed a number of other libraries first, including the gd graphics library itself (libgd), the PNG library (libpng) and optionally the JPEG and FreeType libraries.
You will probably find it easier to use MacPorts to install these libraries, and you can then install GD from there too - the package is called p5.14-gd (or whatever matches your perl version)
Following up on this - To get circos to work I did the following....
1/ I installed all modules using cpanm
wget -O- http://cpanmin.us | perl - -l ~/perl5 App::cpanminus local::lib
eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`
cpanm Config::General
cpanm Font::TTF
cpanm List::MoreUtils
cpanm Math::Bezier
cpanm Math::Round
cpanm Math::VecStat
cpanm Params::Validate
cpanm Readonly
cpanm Regexp::Common
cpanm Set::IntSpan
cpanm Text::Format
cpanm Clone
cpanm GD
echo 'eval `perl -I ~/perl5/lib/perl5 -Mlocal::lib`' >> ~/.profile
GD would not install. To fix this:
I Downloaded and installed macports from http://www.macports.org/install.php
sudo /opt/local/bin/port install gd2
sudo /opt/local/bin/port install jpeg
sudo /opt/local/bin/port install libpng
sudo /opt/local/bin/port install libgda5
I got an error associated with gnome desktop and ran
sudo /opt/local/bin/port clean gnome-desktop then reinstalled libgd
Finally, to get GD to a spot where perl will find it…
export PATH=/opt/local/bin:/opt/local/sbin:$PATH