Click here to get back home

[Q] Installing GD

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
[Q] Installing GD ericgorr 09-25-2006
Posted by ericgorr on September 25, 2006, 6:38 pm
Please log in for more thread options


I am having trouble installing the GD perl module. Using MCPAN, won't
work, so I am attempting to do it manually, but iconv is causing me
problems. Any help in getting this module installed would be
appreciated.

If it matters, I am running MacOSX 10.4.x and have used DarwinPorts
(now MacPorts) to install various things like iconv and gd2.

Thank you.


When I do:


======
> perl Makefile.PL
------

I get this output:

======
NOTICE: This module requires libgd 2.0.28 or higher.

If you are using Math::Trig 1.01 or lower, it has a bug that
causes a "prerequisite not found" warning to be issued. You
may
safely ignore this warning.

Type perl Makefile.PL -h for command-line option summary

Configuring for libgd version 2.0.33.
Checking for stray libgd header files...none found.

Included Features: GD_JPEG GD_FREETYPE GD_PNG GD_GIF
GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from: /opt/local
Checking if your kit is complete...
Looks good
Unrecognized argument in LIBS ignored: '/opt/local/lib/libiconv.dylib'
Writing Makefile for GD
------

So, already, it is complaining about iconv.

I can do a 'make' and it will build without any problems.
However, a 'make test' fails with the following output:

======
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD..........Can't load './blib/arch/auto/GD/GD.bundle' for module GD:
dlopen(./blib/arch/auto/GD/GD.bundle, 2): Symbol not found:
_libiconv_close
Referenced from: /opt/local/lib/libgd.2.dylib
Expected in: flat namespace
at t/GD.t line 14
Compilation failed in require at t/GD.t line 14.
BEGIN failed--compilation aborted at t/GD.t line 14.
t/GD..........dubious

Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-12
Failed 12/12 tests, 0.00% okay
t/Polyline....Can't load
'/Users/Eric/.cpan/build/GD-2.35/blib/arch/auto/GD/GD.bundle' for
module GD:
dlopen(/Users/Eric/.cpan/build/GD-2.35/blib/arch/auto/GD/GD.bundle, 2):
Symbol not found: _libiconv_close
Referenced from: /opt/local/lib/libgd.2.dylib
Expected in: flat namespace
at /Users/Eric/.cpan/build/GD-2.35/blib/lib/GD/Polyline.pm line 45
Compilation failed in require at
/Users/Eric/.cpan/build/GD-2.35/blib/lib/GD/Polyline.pm line 45.
BEGIN failed--compilation aborted at
/Users/Eric/.cpan/build/GD-2.35/blib/lib/GD/Polyline.pm line 45.
Compilation failed in require at t/Polyline.t line 10.
BEGIN failed--compilation aborted at t/Polyline.t line 10.
t/Polyline....dubious

Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/GD.t 255 65280 12 23 1-12
t/Polyline.t 255 65280 1 2 1
Failed 2/2 test scripts. 13/13 subtests failed.
Files=2, Tests=13, 0 wallclock secs ( 0.06 cusr + 0.02 csys = 0.08
CPU)
Failed 2/2 test programs. 13/13 subtests failed.
make: *** [test_dynamic] Error 255
------


Posted by Sherm Pendley on September 25, 2006, 9:29 pm
Please log in for more thread options


ericgorr@gmail.com writes:

> When I do:
>
>
> ======
>> perl Makefile.PL
> ------
>
> I get this output:

...snip...

> Unrecognized argument in LIBS ignored: '/opt/local/lib/libiconv.dylib'
> Writing Makefile for GD
> ------
>
> So, already, it is complaining about iconv.

Try this:

perl Makefile.PL LIBS='-L/opt/local/lib -liconv'

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Posted by Eric on September 26, 2006, 9:44 am
Please log in for more thread options


Sherm Pendley wrote:

> Try this:
>
> perl Makefile.PL LIBS='-L/opt/local/lib -liconv'

Thanks. This suggestion succeeded in getting perl Makefile.PL to work
without any reported problems. 'make'ing still succeeds, however, 'make
test' is still failing.

Any ideas?

Thank you.

Here is the output I am getting:



~/.cpan/build/GD-2.35 $perl Makefile.PL LIBS='-L/opt/local/lib -liconv'



Configuring for libgd version 2.0.33.
Checking for stray libgd header files...none found.
Included Features: GD_JPEG GD_FREETYPE GD_PNG GD_GIF
GD_UNCLOSEDPOLY GD_ANIMGIF GD_FTCIRCLE VERSION_33
GD library used from: /opt/local
Checking if your kit is complete...
Looks good
Writing Makefile for GD



~/.cpan/build/GD-2.35 $make



cp GD/Polyline.pm blib/lib/GD/Polyline.pm
cp qd.pl blib/lib/qd.pl
cp GD/Image.pm blib/lib/GD/Image.pm
cp GD.pm blib/lib/GD.pm
AutoSplitting blib/lib/GD.pm (blib/lib/auto/GD)
cp GD/Simple.pm blib/lib/GD/Simple.pm
cp GD/Polygon.pm blib/lib/GD/Polygon.pm
/usr/bin/perl /System/Library/Perl/5.8.6/ExtUtils/xsubpp -typemap
/System/Library/Perl/5.8.6/ExtUtils/typemap -typemap typemap GD.xs >
GD.xsc && mv GD.xsc GD.c
cc -c -I/opt/local/include -g -pipe -fno-common -DPERL_DARWIN
-no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -O3
-DVERSION=\"2.35\" -DXS_VERSION=\"2.35\"
"-I/System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE"
-DHAVE_JPEG -DHAVE_FT -DHAVE_GIF -DHAVE_PNG -DHAVE_ANIMGIF -DVERSION_33
-DHAVE_UNCLOSEDPOLY -DHAVE_FTCIRCLE GD.c
Running Mkbootstrap for GD ()
chmod 644 GD.bs
rm -f blib/arch/auto/GD/GD.bundle
LD_RUN_PATH="/opt/local/lib" env MACOSX_DEPLOYMENT_TARGET=10.3 cc
-bundle -undefined dynamic_lookup -L/usr/local/lib GD.o -o
blib/arch/auto/GD/GD.bundle -L/opt/local/lib -liconv
/usr/bin/ld: warning -L: directory name (/usr/local/lib) does not exist
chmod 755 blib/arch/auto/GD/GD.bundle
cp GD.bs blib/arch/auto/GD/GD.bs
chmod 644 blib/arch/auto/GD/GD.bs
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::Polyline.3pm
Manifying blib/man3/GD::Image.3pm
Manifying blib/man3/GD::Simple.3pm
Manifying blib/man3/GD.3pm
Manifying blib/man3/GD::Polygon.3pm



~/.cpan/build/GD-2.35 $make test



PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD..........Can't load './blib/arch/auto/GD/GD.bundle' for module GD:
dlopen(./blib/arch/auto/GD/GD.bundle, 2): Symbol not found:
_gdImageAlphaBlending
Referenced from: ./blib/arch/auto/GD/GD.bundle
Expected in: dynamic lookup
at t/GD.t line 14
Compilation failed in require at t/GD.t line 14.
BEGIN failed--compilation aborted at t/GD.t line 14.
t/GD..........dubious

Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-12
Failed 12/12 tests, 0.00% okay
t/Polyline....Can't load
'/Users/Eric/.cpan/build/GD-2.35/blib/arch/auto/GD/GD.bundle' for
module GD:
dlopen(/Users/Eric/.cpan/build/GD-2.35/blib/arch/auto/GD/GD.bundle, 2):
Symbol not found: _gdImageAlphaBlending
Referenced from:
/Users/Eric/.cpan/build/GD-2.35/blib/arch/auto/GD/GD.bundle
Expected in: dynamic lookup
at /Users/Eric/.cpan/build/GD-2.35/blib/lib/GD/Polyline.pm line 45
Compilation failed in require at
/Users/Eric/.cpan/build/GD-2.35/blib/lib/GD/Polyline.pm line 45.
BEGIN failed--compilation aborted at
/Users/Eric/.cpan/build/GD-2.35/blib/lib/GD/Polyline.pm line 45.
Compilation failed in require at t/Polyline.t line 10.
BEGIN failed--compilation aborted at t/Polyline.t line 10.
t/Polyline....dubious

Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/GD.t 255 65280 12 23 1-12
t/Polyline.t 255 65280 1 2 1
Failed 2/2 test scripts. 13/13 subtests failed.
Files=2, Tests=13, 0 wallclock secs ( 0.06 cusr + 0.02 csys = 0.08
CPU)
Failed 2/2 test programs. 13/13 subtests failed.
make: *** [test_dynamic] Error 255


Posted by Eric on September 26, 2006, 12:07 pm
Please log in for more thread options


I thought the problem might be that I was telling perl to build the GD
module with support for things that the gd library was not built
with...however, this still failed.

With DarwinPorts (MacPorts), I built the gd2 port:

======
~ $port info gd2
gd2 2.0.33, Revision 2, graphics/gd2 (Variants: darwin_6, darwin)
http://www.boutell.com/gd/

gd is a graphics library. It allows your code to quickly draw images
complete with lines, arcs, text, multiple colors, cut and paste from
other images, and flood fills, and write out the result as a .PNG file.
This is particularly useful in World Wide Web applications, where .PNG
is the format used for inline images. gd is not a paint program. If you
are looking for a paint program, you are looking in the wrong place. If
you are not a programmer, you are looking in the wrong place.

Library Dependencies: libpng, jpeg, freetype, XFree86
------

and then tried:

perl Makefile.PL LIBS='-L/opt/local/lib -liconv' -options "JPEG,FT,PNG"

'make test' failed with the following output:

======
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/GD..........Can't load './blib/arch/auto/GD/GD.bundle' for module GD:
dlopen(./blib/arch/auto/GD/GD.bundle, 2): Symbol not found:
_gdImageAlphaBlending
Referenced from: ./blib/arch/auto/GD/GD.bundle
Expected in: dynamic lookup
at t/GD.t line 14
Compilation failed in require at t/GD.t line 14.
BEGIN failed--compilation aborted at t/GD.t line 14.
t/GD..........dubious

Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-12
Failed 12/12 tests, 0.00% okay
t/Polyline....Can't load
'/Users/Eric/Desktop/Downloads/GD-2.35/blib/arch/auto/GD/GD.bundle' for
module GD:
dlopen(/Users/Eric/Desktop/Downloads/GD-2.35/blib/arch/auto/GD/GD.bundle,
2): Symbol not found: _gdImageAlphaBlending
Referenced from:
/Users/Eric/Desktop/Downloads/GD-2.35/blib/arch/auto/GD/GD.bundle
Expected in: dynamic lookup
at /Users/Eric/Desktop/Downloads/GD-2.35/blib/lib/GD/Polyline.pm line
45
Compilation failed in require at
/Users/Eric/Desktop/Downloads/GD-2.35/blib/lib/GD/Polyline.pm line 45.
BEGIN failed--compilation aborted at
/Users/Eric/Desktop/Downloads/GD-2.35/blib/lib/GD/Polyline.pm line 45.
Compilation failed in require at t/Polyline.t line 10.
BEGIN failed--compilation aborted at t/Polyline.t line 10.
t/Polyline....dubious

Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/GD.t 255 65280 12 23 1-12
t/Polyline.t 255 65280 1 2 1
Failed 2/2 test scripts. 13/13 subtests failed.
Files=2, Tests=13, 0 wallclock secs ( 0.06 cusr + 0.02 csys = 0.08
CPU)
Failed 2/2 test programs. 13/13 subtests failed.
make: *** [test_dynamic] Error 255
------


Now, I did come across a comment in a google search on this problem
that the fact it is failing here is not likely a real problem and that
I can just go ahead and install the module. Is this true? However, I
would like to see it pass...


Posted by Sherm Pendley on September 26, 2006, 12:39 pm
Please log in for more thread options



> Thanks. This suggestion succeeded in getting perl Makefile.PL to work
> without any reported problems. 'make'ing still succeeds, however, 'make
> test' is still failing.
>
> Any ideas?
>
> Thank you.
>
> Here is the output I am getting:

... snip ...

> ~/.cpan/build/GD-2.35 $make test
>
>
>
> PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
> t/GD..........Can't load './blib/arch/auto/GD/GD.bundle' for module GD:
> dlopen(./blib/arch/auto/GD/GD.bundle, 2): Symbol not found:
> _gdImageAlphaBlending
> Referenced from: ./blib/arch/auto/GD/GD.bundle

Try verifying that GD.bundle is linked against the *correct* libiconv,
with "otool -L ./blib/arch/auto/GD/GD.bundle".

I've a sneaking suspicion that it's picking up the Apple-supplied library
from /usr/lib instead, and that's an older version than what DarwinPorts
supplies.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Similar ThreadsPosted
Installing GD November 8, 2005, 2:05 pm
Installing Tk November 13, 2005, 10:49 pm
Error Installing XML::DOM October 15, 2004, 9:16 am
Trouble installing GD November 5, 2004, 10:51 am
installing modules? September 29, 2005, 1:52 pm
Need help installing via CPAN March 17, 2005, 3:33 pm
Newbie & Installing NET::FTP,CGI.PM, etc. July 7, 2005, 8:58 am
installing mod_perl? July 20, 2005, 9:05 pm
Installing modules August 5, 2005, 8:32 pm
Installing XML Parser May 25, 2006, 2:20 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap