Click here to get back home

Problem installing GD module

 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
Problem installing GD module James E Keenan 04-04-2006
Posted by James E Keenan on April 4, 2006, 12:26 pm
Please log in for more thread options


I have successfully installed the GD module on Darwin (10.3), but now
I'm encountering problems trying to install it on Linux Ubuntu 5.04.
When I call 'make', the output starts like this:

GD.xs:7:16: gd.h: No such file or directory
GD.xs:8:21: gdfontg.h: No such file or directory
GD.xs:9:21: gdfontl.h: No such file or directory
GD.xs:10:22: gdfontmb.h: No such file or directory
GD.xs:11:21: gdfonts.h: No such file or directory
GD.xs:12:21: gdfontt.h: No such file or directory
GD.xs:336: error: syntax error before "GD__Image"
GD.xs:336: warning: data definition has no type or storage class
GD.xs:337: error: syntax error before "GD__Font"
GD.xs:337: warning: data definition has no type or storage class

... and ends like this:

GD.c:4378: error: `font' undeclared (first use in this function)
GD.c:4378: error: called object is not a function
{standard input}: Assembler messages:
{standard input}:366: Error: symbol `__u' is already defined
{standard input}:372: Error: symbol `__u' is already defined
{standard input}:378: Error: symbol `__u' is already defined
{standard input}:384: Error: symbol `__u' is already defined
{standard input}:390: Error: symbol `__u' is already defined
{standard input}:396: Error: symbol `__u' is already defined
{standard input}:402: Error: symbol `__u' is already defined
{standard input}:408: Error: symbol `__u' is already defined
{standard input}:414: Error: symbol `__u' is already defined
{standard input}:420: Error: symbol `__u' is already defined
{standard input}:426: Error: symbol `__u' is already defined
make: *** [GD.o] Error 1

Figuring that I might not have had the latest version of the underlying
libgd library, I upgraded with apt-get install libgd2-xpm. Then, when
that didn't solve the problem, I tried installing gd 2.0.33 from
source. When I tried to do so, I got error messages excerpted here:

>From ./configure:

** Configuration summary for gd 2.0.33:

Support for PNG library: no
Support for JPEG library: no
Support for Freetype 2.x library: no
Support for Fontconfig library: no
Support for Xpm library: no
Support for pthreads: yes

>From make install:

collect2: ld returned 1 exit status
make[1]: *** [gdparttopng] Error 1
make[1]: Leaving directory `/home/jimk/Downloads/gd-2.0.33'
make: *** [install-recursive] Error 1

On the one hand, Ubuntu's 'apt-get' is telling me that the missing
libraries are up-to-date. On the other hand, when I call 'locate' I
cannot locate header files such as 'gd.h' -- only shared object files.

So I'm having no luck either with the Perl GD module or with libgd
itself. Can anyone suggest where I am going astray? Thank you very
much.

Jim Keenan


Posted by James E Keenan on April 4, 2006, 4:14 pm
Please log in for more thread options


After much effort and consultation with a more knowledgeable colleague,
I was able to remedy the problem roughly as follows:

1. While installing Ubuntu packages, I mistakenly thought that the
"dev" versions of various packages (e.g., libpng12-dev) referred to the
"blead" versions. My colleague then informed me that it meant
something more like "developer's tools." So I first had to install
libpng12-dev, libgd2-xpm-dev, libjpeg62-dev and libfreetype6-dev, then
go back and complete the installation of gd 2.0.33 ... at which point
all those "no"s in the Configuration summary quoted in the OP changed
to "yes."

2. Only when I completed all of the above was I able to get the GD
extension to make, test and install properly.


Similar ThreadsPosted
Problem Installing Module April 4, 2007, 10:02 am
problem installing Gtk2 Module January 10, 2005, 1:44 pm
problem installing MATH::MATLAB module August 28, 2006, 10:50 am
Problem installing module Email-Send December 4, 2007, 8:39 pm
Problem Installing Module (Email::MIME::Modifier) July 31, 2007, 11:41 pm
Problem installing win32::OLE September 20, 2005, 12:52 pm
Problem installing Net::LDAP September 22, 2005, 12:54 pm
problem installing DBD-mysql January 10, 2005, 5:51 pm
Problem with installing modules November 24, 2006, 6:15 pm
Problem installing XML::Checker March 21, 2007, 2:15 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap