php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23058 gdFreeFontCache compilation failure
Submitted: 2003-04-04 22:11 UTC Modified: 2003-04-07 19:27 UTC
From: russell+php dot net at loosenut dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 4.3.2RC1 OS: Solaris 2.5.1
Private report: No CVE-ID: None
 [2003-04-04 22:11 UTC] russell+php dot net at loosenut dot com
/bin/sh /export/home/russell/build/php-4.3.2RC1/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2  -avoid-version -module -L/usr/ucblib -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3 -L/usr/local/ssl/lib -L/usr/local/lib -L/usr/home/russell/build/jpeg-6b/lib -L/usr/local/imap-2002b/lib -L/usr/local/mysql/lib/mysql  -R /usr/ucblib -R /usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3 -R /usr/local/ssl/lib -R /usr/local/lib -R /usr/home/russell/build/jpeg-6b/lib -R /usr/local/imap-2002b/lib -R /usr/local/mysql/lib/mysql ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/ctype/ctype.lo ext/gd/gd.lo ext/gd/gdttf.lo ext/gd/gdcache.lo ext/imap/php_imap.lo ext/mysql/php_mysql.lo ext/openssl/openssl.lo ext/overload/overload.lo ext/pcre/pcrelib/maketables.lo ext/pcre/pcrelib/get.lo ext/pcre/pcrelib/study.lo ext/pcre/pcrelib/pcre.lo ext/pcre/php_pcre.lo ext/posix/posix.lo ext/session/session.lo ext/session/mod_files.lo ext/session/mod_mm.lo ext/session/mod_user.lo ext/standard/array.lo ext/standard/base64.lo ext/standard/basic_functions.lo ext/standard/browscap.lo ext/standard/crc32.lo ext/standard/crypt.lo ext/standard/cyr_convert.lo ext/standard/datetime.lo ext/standard/dir.lo ext/standard/dl.lo ext/standard/dns.lo ext/standard/exec.lo ext/standard/file.lo ext/standard/filestat.lo ext/standard/flock_compat.lo ext/standard/formatted_print.lo ext/standard/fsock.lo ext/standard/head.lo ext/standard/html.lo ext/standard/image.lo ext/standard/info.lo ext/standard/iptc.lo ext/standard/lcg.lo ext/standard/link.lo ext/standard/mail.lo ext/standard/math.lo ext/standard/md5.lo ext/standard/metaphone.lo ext/standard/microtime.lo ext/standard/pack.lo ext/standard/pageinfo.lo ext/standard/parsedate.lo ext/standard/quot_print.lo ext/standard/rand.lo ext/standard/reg.lo ext/standard/soundex.lo ext/standard/string.lo ext/standard/scanf.lo ext/standard/syslog.lo ext/standard/type.lo ext/standard/uniqid.lo ext/standard/url.lo ext/standard/url_scanner.lo ext/standard/var.lo ext/standard/versioning.lo ext/standard/assert.lo ext/standard/strnatcmp.lo ext/standard/levenshtein.lo ext/standard/incomplete_class.lo ext/standard/url_scanner_ex.lo ext/standard/ftp_fopen_wrapper.lo ext/standard/http_fopen_wrapper.lo ext/standard/php_fopen_wrapper.lo ext/standard/credits.lo ext/standard/css.lo ext/standard/var_unserializer.lo ext/standard/ftok.lo ext/standard/aggregation.lo ext/standard/sha1.lo ext/tokenizer/tokenizer.lo ext/xml/xml.lo ext/xml/expat/xmlparse.lo ext/xml/expat/xmlrole.lo ext/xml/expat/xmltok.lo regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.lo TSRM/TSRM.lo TSRM/tsrm_strtok_r.lo TSRM/tsrm_virtual_cwd.lo main/main.lo main/snprintf.lo main/spprintf.lo main/php_sprintf.lo main/safe_mode.lo main/fopen_wrappers.lo main/alloca.lo main/php_scandir.lo main/php_ini.lo main/SAPI.lo main/rfc1867.lo main/php_content_types.lo main/strlcpy.lo main/strlcat.lo main/mergesort.lo main/reentrancy.lo main/php_variables.lo main/php_ticks.lo main/streams.lo main/network.lo main/php_open_temporary_file.lo main/php_logos.lo main/output.lo main/memory_streams.lo main/user_streams.lo Zend/zend_language_parser.lo Zend/zend_language_scanner.lo Zend/zend_ini_parser.lo Zend/zend_ini_scanner.lo Zend/zend_alloc.lo Zend/zend_compile.lo Zend/zend_constants.lo Zend/zend_dynamic_array.lo Zend/zend_execute_API.lo Zend/zend_highlight.lo Zend/zend_llist.lo Zend/zend_opcode.lo Zend/zend_operators.lo Zend/zend_ptr_stack.lo Zend/zend_stack.lo Zend/zend_variables.lo Zend/zend.lo Zend/zend_API.lo Zend/zend_extensions.lo Zend/zend_hash.lo Zend/zend_list.lo Zend/zend_indent.lo Zend/zend_builtin_functions.lo Zend/zend_sprintf.lo Zend/zend_ini.lo Zend/zend_qsort.lo Zend/zend_multibyte.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lc-client -lssl -lcrypto -lmysqlclient -lcrypt -lgd -lpng -lz -ljpeg -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lsocket -lgcc -lcrypt  -o sapi/cli/php
Undefined                       first referenced
 symbol                             in file
gdFreeFontCache                     ext/gd/gd.lo
ld: fatal: Symbol referencing errors. No output written to sapi/cli/php
collect2: ld returned 1 exit status
gmake: *** [sapi/cli/php] Error 1



I haven't been able to compile PHP natively since 4.1.1 or 4.1.2...

Current attempt:
./configure \
 --prefix=/usr/local/php-4.3.2rc1 \
 --with-openssl=/usr/local/ssl \
 --with-gd=/usr/local \
 --with-jpeg-dir=/usr/home/russell/build/jpeg-6b \
 --with-png-dir=/usr/local \
 --with-zlib-dir=/usr/home/russell/build/zlib-1.1.4 \
 --with-imap=/usr/local/imap-2002b \
 --with-imap-ssl=/usr/local/ssl \
 --with-xml \
 --with-mysql=/usr/local/mysql \
 --with-apxs=/usr/local/apache-1.3.27/bin/apxs \
 --enable-track-vars \
 --with-zlib


 - PHP 4.3.2rc1
 - OpenSSL 0.9.7
 - GD 2.0.12
 - Apache 1.3.27 with SSL
 - IMAP 2002b
 - libpng 1.2.5
 - zlib 1.1.4
 - MySQL 3.23.46

Solaris 2.5.1 (yeah, I know... legacy system I'm trying to get rid of).

Compiling with GCC 2.95.3 and bison 1.30 using GNU make 3.79


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-04 22:17 UTC] magnus@php.net
Try with the bundled gd lib. --with-gd only, no path.
 [2003-04-05 11:20 UTC] sniper@php.net
Please try using this CVS snapshot:

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

Can not reproduce. What version of GD library are you trying to compile PHP with? FYI: It's safer to use the bundled library if your external one is some GD 2.x.x version..

 [2003-04-05 11:21 UTC] sniper@php.net
duh..I can't read it seems. :)
Anyway, how did you configure the GD library?

 [2003-04-07 02:23 UTC] russell+php dot net at loosenut dot com
The "bundled" GD seemed to let it compile... I'm still working on bringing the server up, though (getting the SSL certificate generated and the associated tweaks for the config).

But, to address "the issue," here's some output from GD:

% /usr/local/bin/gdlib-config --all
GD library  2.0.12
includedir: /usr/local/include
cflags:     -I/usr/local/include
ldflags:     -L/usr/openwin/lib  -L/usr/local/lib -R/usr/local/lib -L/usr/home/russell/build/jpeg-6b/lib
libs:       -ljpeg -lpng -lz -lm 
libdir:     /usr/local/lib

It was compiled with:

$ ./configure --with-jpeg=/usr/home/russell/build/jpeg-6b

(basically JPEG and PNG only)

If you want, I can dump the config.log from it here, too...
 [2003-04-07 04:46 UTC] sniper@php.net
I'm pretty sure this was some configure problem on your behalf somewhere, this error could never come unless you
have at sometime tried to configure with --with-freetype-dir / --with-ttf options. 

And it's recommended that you use the bundled GD library
always if possible, and in your case, it's possible.

 [2003-04-07 19:27 UTC] russell+php dot net at loosenut dot com
Well, freetype/TTF's not on this system nor has it been...
The config.log in GD, in fact, says:

configure:10244: checking for freetype-config
configure:10277: result: no
configure:10307: checking for FT_Init_FreeType in -lfreetype
configure:10338: gcc -o conftest -g -O2   -I/usr/openwin/include -I/usr/local/in
clude/libpng12 -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE   -L/usr/openwin/lib  
-L/usr/local/lib -R/usr/local/lib conftest.c -lfreetype  -lpng -lz -lm  >&5
ld: fatal: library -lfreetype: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure:10341: $? = 1
configure: failed program was:
| #line 10314 "configure"
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GD"
| #define PACKAGE_TARNAME "gd"
| #define PACKAGE_VERSION "2.0.12"
| #define PACKAGE_STRING "GD 2.0.12"
| #define PACKAGE_BUGREPORT "gd@boutell.com"
| #define PACKAGE "gd"
| #define VERSION "2.0.12"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define STDC_HEADERS 1
| #define HAVE_ERRNO_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ICONV 1
| #define ICONV_CONST const
| #define HAVE_ICONV_H 1
| #define HAVE_ICONV_T_DEF 1
| #define HAVE_LIBM 1
| #define HAVE_LIBZ 1
| #define HAVE_PNG_H 1
| #define HAVE_LIBPNG 1
| /* end confdefs.h.  */
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char FT_Init_FreeType ();
| int
| main ()
| {
| FT_Init_FreeType ();
|   ;
|   return 0;
| }
configure:10359: result: no
configure:10370: WARNING: not found - disabling freetype support
configure:10389: checking freetype/freetype.h usability
configure:10402: gcc -c -g -O2   -I/usr/openwin/include -I/usr/local/include/lib
png12 -DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE conftest.c >&5
configure:10459: freetype/freetype.h: No such file or directory
configure:10405: $? = 1
configure: failed program was:
| #line 10391 "configure"
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GD"
| #define PACKAGE_TARNAME "gd"
| #define PACKAGE_VERSION "2.0.12"
| #define PACKAGE_STRING "GD 2.0.12"
| #define PACKAGE_BUGREPORT "gd@boutell.com"
| #define PACKAGE "gd"
| #define VERSION "2.0.12"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define STDC_HEADERS 1
| #define HAVE_ERRNO_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ICONV 1
| #define ICONV_CONST const
| #define HAVE_ICONV_H 1
| #define HAVE_ICONV_T_DEF 1
| #define HAVE_LIBM 1
| #define HAVE_LIBZ 1
| #define HAVE_PNG_H 1
| #define HAVE_LIBPNG 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #if HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #if HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #if STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # if HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #if HAVE_STRING_H
| # if !STDC_HEADERS && HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #if HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #if HAVE_INTTYPES_H
| # include <inttypes.h>
| #else
| # if HAVE_STDINT_H
| #  include <stdint.h>
| # endif
| #endif
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <freetype/freetype.h>
configure:10421: result: no
configure:10425: checking freetype/freetype.h presence
configure:10436: gcc -E   -I/usr/openwin/include -I/usr/local/include/libpng12 -
DPNG_USE_PNGGCCRD -DPNG_NO_ASSEMBLER_CODE conftest.c
configure:10461: freetype/freetype.h: No such file or directory
configure:10442: $? = 1
configure: failed program was:
| #line 10427 "configure"
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GD"
| #define PACKAGE_TARNAME "gd"
| #define PACKAGE_VERSION "2.0.12"
| #define PACKAGE_STRING "GD 2.0.12"
| #define PACKAGE_BUGREPORT "gd@boutell.com"
| #define PACKAGE "gd"
| #define VERSION "2.0.12"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define STDC_HEADERS 1
| #define HAVE_ERRNO_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ICONV 1
| #define ICONV_CONST const
| #define HAVE_ICONV_H 1
| #define HAVE_ICONV_T_DEF 1
| #define HAVE_LIBM 1
| #define HAVE_LIBZ 1
| #define HAVE_PNG_H 1
| #define HAVE_LIBPNG 1
| /* end confdefs.h.  */
| #include <freetype/freetype.h>
configure:10461: result: no
configure:10497: checking for freetype/freetype.h
configure:10504: result: no



Which is summararily followed by:

configure:10708: result:
** Configuration summary for gd 2.0.12:

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

configure:10837: creating ./config.status


The test, on the other hand, in php-4.3.2RC1/ext/gd is:

#if HAVE_LIBGD20 && HAVE_GD_STRINGFT
        gdFreeFontCache();
#endif

...and both of those /appear/ to be set "because of shipped copy of GD" (ie. possibly poor "assumptions" since the bundled libs contain stuff that is different or older than stuff on the system that I'm trying to link with) -- then again, I must also admit only a cursory glance at the code and, well... I could be "off."

...only trying to help track a bug with this...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 12:01:30 2024 UTC