php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33141 libiconv dependency in gd extension not accounted for by linker
Submitted: 2005-05-25 18:25 UTC Modified: 2006-01-03 14:21 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: liamr at umich dot edu Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5.0.4, 4.3.11, 5.1.0RC1 OS: Linux 2.4.28, Solaris 10
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: liamr at umich dot edu
New email:
PHP Version: OS:

 

 [2005-05-25 18:25 UTC] liamr at umich dot edu
Description:
------------
The gd module can include undefined references to the following symbols..

         U libiconv
         U libiconv_close
         U libiconv_open

If compiled as a shared module, it can only load if something else w/ a libiconv dependency has loaded before it.  On systems where GD detects libconv during configuration, -liconv should be added to GD_SHARED_LIBADD so the runtime linker can resolve those symbols.

It looks like libiconv is only mentioned in gdkanji.c, but I had the same problem regardless of whether I built php with --enable-gd-jis-conv or not.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-27 01:13 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Can't reproduce.
Also there is no '--with-iconv-lib' option neither in 5.x, nor in 4.3 branch.
 [2005-06-28 00:00 UTC] ntoge at amber dot plala dot or dot jp
With php5-200506272030 exact the same problem as my posting of Jun 12 is recurring. BTW, when I do grep on ./configure --help, I get -
[php5-200506272030]$ ./configure --help | grep iconv
  --without-iconv[=DIR]   Exclude iconv support
  --with-iconv-dir=DIR      XMLRPC-EPI: iconv dir for XMLRPC-EP
tony2001, are you saying that you are not seeing this, or this option actually is null? This option is not helping resolve the problem anyways, though.
 [2005-08-19 12:47 UTC] tuupola at appelsiini dot net
Same problem with Solaris 10 and the latest snapshot (php5-200508190830).

./configure --with-apxs=/usr/local/apache/bin/apxs --with-zlib --with-jpeg-dir --with-png-dir --with-config-file-path=/usr/local/apache/conf --with-gd --with-freetype-dir=/usr/sfw --enable-gd-native-ttf --with-pgsql --with-dom --enable-mbstring --with-xmlrpc

Make dies with:

Undefined                       first referenced
 symbol                             in file
libiconv_close                      ext/gd/libgd/.libs/gdkanji.o
libiconv_open                       ext/gd/libgd/.libs/gdkanji.o
libiconv                            ext/gd/libgd/.libs/gdkanji.o
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
 [2005-08-19 13:07 UTC] tuupola@php.net
And as suggested, adding -liconv to EXTRA_LIBS in Makefile by hand fixes the problem.
 [2005-08-19 14:00 UTC] sniper@php.net
Also by using --disable-mbstring it will work fine..

 [2005-08-19 14:04 UTC] pajoye@php.net
We cannot fix that now.

With the unicode, mbstring will be useless here.

Sorry, do it manually until php and unicode are available in a release.
 [2006-01-03 14:21 UTC] sniper@php.net
This bug has been fixed in CVS.

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/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC