php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27366 compile errors --with-gd
Submitted: 2004-02-23 11:34 UTC Modified: 2004-02-23 15:22 UTC
From: jim at falconsoft dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.5RC3 OS: redhat 9 2.4.20-20.9
Private report: No CVE-ID: None
 [2004-02-23 11:34 UTC] jim at falconsoft dot com
Description:
------------
When trying to compile with GD support, php make command gets error and quits.  I have tried this with 4.3.3 4.3.4rc1 and 4.3.4rc3.  All have the same problem.

./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-calendar --with-mysql=/usr --with-gd=/usr/local --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/include

I have tried to google this error but all i get is posts from people having the same problem, with no solutions found.

Expected result:
----------------
I expect php to build correctly.

Actual result:
--------------
/bin/sh /home/jmaul/download/php-4.3.5RC3/libtool --silent --preserve-dup-deps --mode=link gcc -export-dynamic -g -O2  -L/usr/local/lib -L/usr/lib/mysql  -R /usr/local/lib -R /usr/lib/mysql ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/calendar/calendar.lo ext/calendar/dow.lo ext/calendar/french.lo ext/calendar/gregor.lo ext/calendar/jewish.lo ext/calendar/julian.lo ext/calendar/easter.lo ext/calendar/cal_unix.lo ext/ctype/ctype.lo ext/gd/gd.lo ext/gd/gdttf.lo ext/gd/gdcache.lo ext/mysql/php_mysql.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 regex/regcomp.lo regex/regexec.lo regex/regerror.lo regex/regfree.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 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 -lcrypt -lmysqlclient -lgd -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lcrypt -lcrypt  -o sapi/cli/php
ext/gd/gd.lo(.text+0x63a): In function `zm_deactivate_gd':
/home/jmaul/download/php-4.3.5RC3/ext/gd/gd.c:385: undefined reference to `gdFreeFontCache'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-02-23 11:36 UTC] jim at falconsoft dot com
NOTE: The description below should read I have tried this with 4.3.4, 4.3.5RC1 and 4.3.5RC3.  Sorry for the typo.
 [2004-02-23 13:05 UTC] sniper@php.net
Use the bundled GD library. Or add the necessary --with-freetype-dir to your configure line.

(the configure shouldn't even succeed, there's a build test done in the end of GD config..)

 [2004-02-23 14:30 UTC] jim at falconsoft dot com
Thanks for the response.

However, building with the built in GD library give me the follwing errors on make:

/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:42:21: jpeglib.h: No such file or directory
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:43:20: jerror.h: No such file or directory
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:53: parse error before "cinfo"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c: In function `fatal_jpeg_error':
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:58: `cinfo' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:58: (Each undeclared identifier is reported only once
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:58: for each function it appears in.)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c: At top level:
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:100: parse error before "cinfo"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c: In function `gdImageJpegCtx':
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:104: storage size of `cinfo' isn't known
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:105: storage size of `jerr' isn't known
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:108: syntax error before "row"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:109: `JSAMPROW' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:111: `JDIMENSION' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:111: parse error before "nlines"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:121: `row' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:134: `JCS_RGB' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:137: `TRUE' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:147: parse error before "_safe_emalloc"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:148: `JSAMPLE' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:149: `rowptr' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:154: `JPEG_LIB_VERSION' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:158: `JPEG_COM' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:175: `nlines' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:198:2: #error IJG JPEG library BITS_IN_JSAMPLE value must be 8 or 12
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c: At top level:
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:224: parse error before "cinfo"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c: In function `gdImageCreateFromJpegCtx':
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:232: storage size of `cinfo' isn't known
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:233: storage size of `jerr' isn't known
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:236: syntax error before "row"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:238: `JSAMPROW' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:238: parse error before "rowptr"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:241: `JDIMENSION' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:241: parse error before "nrows"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:250: `row' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:265: `TRUE' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:266: `JPEG_HEADER_OK' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:285: `JCS_RGB' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:314: `JSAMPLE' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:316: `rowptr' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:319: syntax error before "currow"
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:321: `nrows' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:326: `currow' undeclared (first use in this function)
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c: At top level:
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:380: field `pub' has incomplete type
/home/jmaul/download/php-4.3.5RC3/ext/gd/libgd/gd_jpeg.c:385: confused by earlier errors, bailing out
make: *** [ext/gd/libgd/gd_jpeg.lo] Error 1


And using the NECESSARY --with-freetype-dir gives me the exact same error as initally reported.  My revised configure script is:


./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-calendar --with-mysql=/usr --with-gd=/usr/local --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/include --with-freetype-dir=/usr

Thank you for your time.
 [2004-02-23 15:22 UTC] jim at falconsoft dot com
I have gotten it to compile using the last shown configure line.  I had to recompile gd after installing freetype2.  Only after that was i able to build php with gd support.  I find it odd that the configure script didnt complain at all and completed successfully even without freetype being installed.  Thanks for your time.
 [2004-08-28 18:11 UTC] emrah at olgunca dot com
i just marked the specified line and the compilation has completed. everything seems to be normal for now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 18 22:01:26 2024 UTC