php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22751 compilation error in gdcache if used system libgd
Submitted: 2003-03-17 13:12 UTC Modified: 2003-03-17 20:15 UTC
From: php-bugs at i dot org dot ua Assigned:
Status: Closed Package: GD related
PHP Version: 4.3.2RC1 OS: Solaris8, may be any
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: php-bugs at i dot org dot ua
New email:
PHP Version: OS:

 

 [2003-03-17 13:12 UTC] php-bugs at i dot org dot ua
Hi.

Branch: PHP_4_3, updated at 03/17/2003.
Compiler: cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15
OS: Solaris 8
GD version 2.0.11 placed in /usr/local
Configure: 
./configure \
    --with-gd=/usr/local --enable-gd-imgstrttf \
    --enable-gd-native-ttf --with-png-dir=/usr/local \
    --with-jpeg-dir=/usr/local \
    --with-freetype-dir=/usr/local
...

Problem: If PHP try compile with system GD library, build break with this error:

ld: fatal: symbol `gdCacheCreate' is multiply-defined:
        (file ext/gd/gdcache.lo and file /usr/local/lib/libgd.a(gdcache.o));
ld: fatal: symbol `gdCacheDelete' is multiply-defined:
        (file ext/gd/gdcache.lo and file /usr/local/lib/libgd.a(gdcache.o));
ld: fatal: symbol `gdCacheGet' is multiply-defined:
        (file ext/gd/gdcache.lo and file /usr/local/lib/libgd.a(gdcache.o));


Solutions: Dirty hack...

--- ext/gd/config.m4.old        2003-03-17 18:01:40.090001000 +0200
+++ ext/gd/config.m4    2003-03-17 18:36:18.120001000 +0200
@@ -246,4 +246,5 @@
   PHP_CHECK_LIBRARY(gd, gdImageColorResolve,    [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
   PHP_CHECK_LIBRARY(gd, gdImageGifCtx,          [AC_DEFINE(HAVE_GD_GIF_CTX,          1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
+  PHP_CHECK_LIBRARY(gd, gdCacheCreate,          [AC_DEFINE(HAVE_GD_CACHE_CREATE,     1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
 ])


--- ext/gd/gdcache.c.orig       2003-03-17 18:10:02.280000000 +0200
+++ ext/gd/gdcache.c    2003-03-17 21:03:03.039999000 +0200
@@ -44,7 +44,7 @@
 #else
 #include "php_config.h"
 #endif
-#if HAVE_LIBTTF|HAVE_LIBFREETYPE
+#if !HAVE_GD_CACHE_CREATE && HAVE_LIBTTF|HAVE_LIBFREETYPE

 #include "gdcache.h"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-17 20:15 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.

Thanks for the patch, it wasn't any dirty hack.. :)


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC