php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17993 external GD compile failure
Submitted: 2002-06-26 08:34 UTC Modified: 2002-07-02 03:39 UTC
From: cox at idecnet dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.0CVS-2002-06-26 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cox at idecnet dot com
New email:
PHP Version: OS:

 

 [2002-06-26 08:34 UTC] cox at idecnet dot com
After a fresh checkout from CVS HEAD (2002-06-26):
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c: In function `zif_imagecreatefromstring':
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c:1046: `gdImageCreateFromJpegCtx' undeclared (first use in this function)
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c:1046: (Each undeclared identifier
is reported only once
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c:1046: for each function it appears in.)
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c: In function `zif_imagecreatefromjpeg':
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c:1219: `gdImageCreateFromJpeg' undeclared (first use in this function)
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c:1219: `gdImageCreateFromJpegCtx' undeclared (first use in this function)
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c: In function `zif_imagejpeg':
/root/cdrom/download/php_cvs/php4/ext/gd/gd.c:1441: `gdImageJpegCtx' undeclared
(first use in this function)
make: *** [ext/gd/gd.lo] Error 1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./configure --prefix=/usr \
--with-apxs=/usr/sbin/apxs \
--with-config-file-path=/etc/php/cvs/ \
--with-gd \
--enable-ftp \
--with-pgsql=/usr/local/pgsql \
--with-mysql=/usr \
--enable-bcmath \
--with-gettext \
--with-xml \
--with-dom \
--enable-trans-sid \
--with-pear \
--with-zlib \
--enable-sysvshm \
--enable-sysvsem \
--disable-cli

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-26 12:29 UTC] rasmus@php.net
Make sure you have installed libjpg and add --with-jpeg-dir=/usr to your configure line.  Let us know if that fixes it.
 [2002-06-26 12:43 UTC] rasmus@php.net
Oh, and by the way, you are not getting the bundled GD with that configure line.  You need to use --with-gd=php currently to get the bundled one.
 [2002-06-26 16:17 UTC] cox at idecnet dot com
No errors with:
./configure --prefix=/usr \
--with-gd=php \
--without-mysql \
--with-zlib \
--disable-cli

The error I reported:
./configure --prefix=/usr \
--with-gd \
--without-mysql \
--with-zlib \
--disable-cli

Same error:
./configure --prefix=/usr \
--with-jpeg-dir=/usr \
--with-gd \
--without-mysql \
--with-zlib \
--disable-cli

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# rpm -q gd gd-devel libjpeg-devel
gd-1.8.1-2
gd-devel-1.8.1-2
libjpeg-devel-6b-7

Don't hesitate to request more info.
 [2002-06-26 16:28 UTC] rasmus@php.net
This is a pretty standard gd.h/libgd.a mismatch.  You have multiple versions of GD installed in your default include and lib dirs.  If you want to compile against your system's GD library, you need to install GD correctly on your system.  Get rid of the multiple copies of gd.h/libgd.[a|so] that are likely floating around on your system, rm config.cache and try again.  This was one of the reasons we ended up bundling GD.  Why not just use the bundled GD.  It is likely to be much more feature-complete and bug-free than any of your GD installs.
 [2002-06-26 16:53 UTC] sniper@php.net
User error -> bogus.

 [2002-06-27 07:09 UTC] cox at idecnet dot com
(root) ~># rpm --verify gd gd-devel
(root) ~># locate libgd.
/usr/lib/libgd.a
/usr/lib/libgd.so
/usr/lib/libgd.so.1
/usr/lib/libgd.so.1.8.1
(root) ~># ll /usr/lib/libgd.*
-rw-r--r--   1 root     root       205894 Jun  3  2000 /usr/lib/libgd.a
lrwxrwxrwx   1 root     root           14 Jun  3  2000 /usr/lib/libgd.so -> libgd.so.1.8.1*
lrwxrwxrwx   1 root     root           14 Jun  3  2000 /usr/lib/libgd.so.1 -> libgd.so.1.8.1*
-rwxr-xr-x   1 root     root       185176 Jun  3  2000 /usr/lib/libgd.so.1.8.1*

I have not multiple versions or a messed GD installation. For me is the same to use the working version of bundled GD (awesome btw), but I still guess there is some problem in PHP with it the external GD.

Tomas V.V.Cox
 [2002-06-27 07:29 UTC] mfischer@php.net
No user error (yet), not bogus, reopening.
 [2002-06-27 19:05 UTC] sniper@php.net
Do you have this in main/php_config.h:

#define HAVE_LIBGD15 1

And what does this output:

nm /usr/lib/libgd.so | grep gdImageCreateFromJpegCtx


 [2002-07-02 03:39 UTC] cox@php.net
Finally did some test on others boxes and the compilation went right. Looking more in deep at my system, I found another /usr/local/include/gd.h (apart from the original /usr/include/gd.h) that was probably causing that error. Sorry for making you loose your time on this.

Thanks,

Tomas V.V.Cox
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 14:01:33 2024 UTC