php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19345 Using libgd 2.0.1 will result in compile abort: Please reinstall iconv library
Submitted: 2002-09-10 16:50 UTC Modified: 2002-09-11 10:37 UTC
From: dust at whocares dot de Assigned:
Status: Closed Package: GD related
PHP Version: 4.2.3 OS: RedHat Linux 7.3
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: dust at whocares dot de
New email:
PHP Version: OS:

 

 [2002-09-10 16:50 UTC] dust at whocares dot de
When using libgd.so.2.0.0 with freetype support enabled (as I did for testing purposes) all of the gd related tests in ./configure will fail. However, no error message is given AND when testing for libiconv, -lgd is on the linker command line. Naturally, this will result in an error message - but actually it tells the user to reinstall iconv whereas the problem here really is gd. Reinstalling libgd-1.8.4 solves the problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-10 19:39 UTC] sniper@php.net
What exactly failed? What was your configure line?
Did you have two different versions of GD installed the same time?

 [2002-09-11 04:11 UTC] dust at whocares dot de
The configure script stops with the message "Please reinstall the iconv library". And yes, I do have two different versions of GD installed, although there is only one of them active at a given time. 

Other relevant info (configure parameters, config.log, contents of /usr/lib):

-- listing of /usr/lib --
-rw-r--r--    1 root     root       211212 Aug 13  2001 /usr/lib/libgd.a
lrwxrwxrwx    1 root     root           23 Sep 10 23:24 /usr/lib/libgd.so -> /usr/lib/libgd.so.2.0.0
lrwxrwxrwx    1 root     root           14 May 25 17:42 /usr/lib/libgd.so.1 -> libgd.so.1.8.4
lrwxrwxrwx    1 root     root           14 May 25 17:42 /usr/lib/libgd.so.1.8 -> libgd.so.1.8.4
-rwxr-xr-x    1 root     root       196866 Aug 13  2001 /usr/lib/libgd.so.1.8.4
lrwxrwxrwx    1 root     root           23 Aug 26 23:09 /usr/lib/libgd.so.2 -> /usr/lib/libgd.so.2.0.0
-rw-r--r--    1 root     root       417198 Aug 26 23:09 /usr/lib/libgd.so.2.0.0

<cfg-php>
#!/bin/bash
cd php-4.2.3
if [ -x config.cache ]; then rm config.* -f
fi
./configure \
	--enable-bcmath \
	--enable-calendar \
	--enable-dbase \
	--enable-debug=no \
	--enable-discard-path \
	--enable-force-cgi-redirect \
	--enable-ftp  \
	--enable-gd-imgstrttf \
	--enable-inline-optimization \
	--enable-magic-quotes \
	--enable-memory-limit \
	--enable-mhash \
	--enable-safe-mode=no \
	--enable-shmop \
	--enable-sigchild \
	--enable-sysvsem \
	--enable-sysvshm \
	--enable-track-vars \
	--enable-trans-sid \
	--enable-wddx \
	--enable-xslt \
	--with-apxs \
	--with-curl \
	--with-db \
	--with-gd \
	--with-gdbm \
	--with-iconv=/usr \
	--with-jpeg-dir= \
	--with-mcrypt \
	--with-mhash= \
	--with-mysql=/usr \
	--with-openssl \
	--with-png-dir= \
	--with-regex=php \
	--with-xml \
	--with-xslt-sablot \
	--with-zlib

-- config.log shows: --

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
[... many lines deleted ...]
configure:22620: checking for GD support
configure:22895: checking whether to enable truetype string function in GD
configure:22952: checking for the location of libjpeg
configure:23013: checking for jpeg_read_header in -ljpeg
configure:23032: gcc -o conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX 
      -L/usr/lib
      conftest.c -ljpeg  -lgdbm -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lresolv -lcrypt -lcurl -lssl -lcrypto -ldl 1>&5
configure:23165: checking for the location of libpng
configure:23230: checking for png_write_image in -lpng
configure:23249: gcc -o conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX 
      -L/usr/lib -lz -L/usr/lib
      conftest.c -lpng  -ljpeg -lgdbm -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lresolv -lcrypt -lcurl -lssl -lcrypto -ldl 1>&5
configure:23477: checking for the location of libXpm
configure:23784: checking for freetype(2)
configure:23983: checking for FreeType 1.x support
configure:24186: checking for T1lib support
configure:24548: checking for gdImageString16 in -lgd
configure:24567: gcc -o conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX  -L/usr/lib    conftest.c -lgd  -lgd -lpng -lz -ljpeg -lgdbm -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lresolv -lcrypt -lcurl -lssl -lcrypto -ldl 1>&5
/usr/lib/libgd.so: undefined reference to `FT_Init_FreeType'
/usr/lib/libgd.so: undefined reference to `FT_Load_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Done_Face'
/usr/lib/libgd.so: undefined reference to `FT_Get_Kerning'
/usr/lib/libgd.so: undefined reference to `FT_Get_Char_Index'
/usr/lib/libgd.so: undefined reference to `FT_Get_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_To_Bitmap'
/usr/lib/libgd.so: undefined reference to `FT_Set_Char_Size'
/usr/lib/libgd.so: undefined reference to `FT_Done_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Get_CBox'
/usr/lib/libgd.so: undefined reference to `FT_New_Face'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Transform'
collect2: ld returned 1 exit status
configure: failed program was:
#line 24556 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gdImageString16();

int main() {
gdImageString16()
; return 0; }
configure:24601: checking for gdImagePaletteCopy in -lgd
[ same error messages as above ]
configure:24654: checking for gdImageCreateFromPng in -lgd
[ same error messages as above ]
configure:24707: checking for gdImageCreateFromGif in -lgd
[ same error messages as above ]
configure:24760: checking for gdImageGif in -lgd
[ same error messages as above ]
configure:24813: checking for gdImageWBMP in -lgd
[ same error messages as above ]
configure:24866: checking for gdImageCreateFromJpeg in -lgd
[ same error messages as above ]
configure:24919: checking for gdImageCreateFromXpm in -lgd
[ same error messages as above ]
configure:24972: checking for gdImageCreateFromGd2 in -lgd
[ same error messages as above ]
configure:25025: checking for gdImageCreateTrueColor in -lgd
[ same error messages as above ]
configure:25078: checking for gdImageSetTile in -lgd
[ same error messages as above ]
configure:25131: checking for gdImageSetBrush in -lgd
[ same error messages as above ]
configure:25184: checking for gdImageStringTTF in -lgd
[ same error messages as above ]
configure:25237: checking for gdImageStringFT in -lgd
[ same error messages as above ]
configure:25290: checking for gdImageStringFTEx in -lgd
[ same error messages as above ]
configure:25343: checking for gdImageColorClosestHWB in -lgd
[ same error messages as above ]
configure:25396: checking for gdImageColorResolve in -lgd
[ same error messages as above ]
configure:25449: checking for gdImageGifCtx in -lgd
[ same error messages as above ]
configure:25561: checking for GNU gettext support
configure:26236: checking for GNU MP support
configure:26634: checking for Hyperwave support
configure:26874: checking for ICAP support
[... So far so bad, but: up to now no warning about gd not
     working except many "no"'s for the various gd functions ... ]
configure:27267: checking for iconv support
configure:27458: checking for libiconv in -liconv
configure:27477: gcc -o conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX 
        -L/usr/lib
        conftest.c -liconv  -lgd -lpng -lz -ljpeg -lgdbm -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lresolv -lcrypt -lcurl -lssl -lcrypto -ldl 1>&5
[ ...Now, the line above uses -lgd for the iconv tests which results in: ]
/usr/lib/libgd.so: undefined reference to `FT_Init_FreeType'
/usr/lib/libgd.so: undefined reference to `FT_Load_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Done_Face'
/usr/lib/libgd.so: undefined reference to `FT_Get_Kerning'
/usr/lib/libgd.so: undefined reference to `FT_Get_Char_Index'
/usr/lib/libgd.so: undefined reference to `FT_Get_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_To_Bitmap'
/usr/lib/libgd.so: undefined reference to `FT_Set_Char_Size'
/usr/lib/libgd.so: undefined reference to `FT_Done_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Get_CBox'
/usr/lib/libgd.so: undefined reference to `FT_New_Face'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Transform'
collect2: ld returned 1 exit status
configure: failed program was:
#line 27466 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char libiconv();

int main() {
libiconv()
; return 0; }
configure:27513: checking for iconv in -liconv
configure:27532: gcc -o conftest -g -O2  -DLINUX=22 -DUSE_HSREGEX 
          -L/usr/lib
          conftest.c -liconv  -lgd -lpng -lz -ljpeg -lgdbm -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lresolv -lcrypt -lcurl -lssl -lcrypto -ldl 1>&5
/usr/lib/libgd.so: undefined reference to `FT_Init_FreeType'
/usr/lib/libgd.so: undefined reference to `FT_Load_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Done_Face'
/usr/lib/libgd.so: undefined reference to `FT_Get_Kerning'
/usr/lib/libgd.so: undefined reference to `FT_Get_Char_Index'
/usr/lib/libgd.so: undefined reference to `FT_Get_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_To_Bitmap'
/usr/lib/libgd.so: undefined reference to `FT_Set_Char_Size'
/usr/lib/libgd.so: undefined reference to `FT_Done_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Get_CBox'
/usr/lib/libgd.so: undefined reference to `FT_New_Face'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Transform'
collect2: ld returned 1 exit status
configure: failed program was:
#line 27521 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char iconv();

int main() {
iconv()
; return 0; }

End of config.log, ./configure stops with "Please reinstall the iconv library"

--- Changed directory /usr/lib/ 
-rw-r--r--    1 root     root       211212 Aug 13  2001 /usr/lib/libgd.a
lrwxrwxrwx    1 root     root           23 Sep 11 10:53 /usr/lib/libgd.so -> /usr/lib/libgd.so.1.8.4
lrwxrwxrwx    1 root     root           14 May 25 17:42 /usr/lib/libgd.so.1 -> libgd.so.1.8.4
lrwxrwxrwx    1 root     root           14 May 25 17:42 /usr/lib/libgd.so.1.8 -> libgd.so.1.8.4
-rwxr-xr-x    1 root     root       196866 Aug 13  2001 /usr/lib/libgd.so.1.8.4
lrwxrwxrwx    1 root     root           23 Aug 26 23:09 /usr/lib/libgd.so.2 -> /usr/lib/libgd.so.2.0.0
-rw-r--r--    1 root     root       417198 Aug 26 23:09 /usr/lib/libgd.so.2.0.0

Will compile a working PHP 4.2.3 w/o any problems.
 [2002-09-11 04:19 UTC] dust at whocares dot de
What I wanted to point out is that if ./configure fails _all_ the GD tests it imho should
- tell the user to reinstall GD
- disable GD support (e.g. remove -lgd from the  library options)
- never use -lgd for any remaining tests for this will result in wrong error messages, pointing the user in the wrong direction.
 [2002-09-11 10:37 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


The configure will now stop and output an error message.

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Jul 06 08:05:45 2022 UTC