Problem with build when using external GD

resolveit

Verified User
Joined
Mar 22, 2004
Messages
757
Hi,

I changed my configure.php to use an external version of GD (not the internal version compiled into PHP), my configure.php looks like this:
Code:
#!/bin/sh
./configure \
        --with-apxs \
        --with-curl \
        --with-curl-dir=/usr/local/lib \
        --with-gd=/usr/local \
        --with-gd-dir=/usr/local \
        --with-freetype-dir=/usr/local \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-kerberos \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-xml \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --with-zip \
        --with-openssl \
        --with-libfreetype \
        --enable-bcmath \
        --enable-calendar \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-track-vars

pay attention to this line "--with-gd=/usr/local \" as the default would be "--with-gd \", the default will use the internal version of GD, as I require FreeType support and have tried everything to get the internal version compiled with TrueType support I've finally decided to use an external version.

Now if I use the internal version everything compiles fine but when I use the external version I get the following error:

Trying to make php...
/bin/sh /usr/local/directadmin/customapache/php-4.3.10/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/openssl/openssl.lo ext/zlib/zlib.lo ext/zlib/zlib_fopen_wrapper.lo ext/bcmath/bcmath.lo ext/bcmath/libbcmath/src/add.lo ext/bcmath/libbcmath/src/div.lo ext/bcmath/libbcmath/src/init.lo ext/bcmath/libbcmath/src/neg.lo ext/bcmath/libbcmath/src/outofmem.lo ext/bcmath/libbcmath/src/raisemod.lo ext/bcmath/libbcmath/src/rt.lo ext/bcmath/libbcmath/src/sub.lo ext/bcmath/libbcmath/src/compare.lo ext/bcmath/libbcmath/src/divmod.lo ext/bcmath/libbcmath/src/int2num.lo ext/bcmath/libbcmath/src/num2long.lo ext/bcmath/libbcmath/src/output.lo ext/bcmath/libbcmath/src/recmul.lo ext/bcmath/libbcmath/src/sqrt.lo ext/bcmath/libbcmath/src/zero.lo ext/bcmath/libbcmath/src/debug.lo ext/bcmath/libbcmath/src/doaddsub.lo ext/bcmath/libbcmath/src/nearzero.lo ext/bcmath/libbcmath/src/num2str.lo ext/bcmath/libbcmath/src/raise.lo ext/bcmath/libbcmath/src/rmzero.lo ext/bcmath/libbcmath/src/str2num.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/curl/curl.lo ext/curl/curlstreams.lo ext/ftp/php_ftp.lo ext/ftp/ftp.lo ext/gd/gd.lo ext/gd/gdttf.lo ext/gd/gdcache.lo ext/gettext/gettext.lo ext/mcrypt/mcrypt.lo ext/mhash/mhash.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 ext/sockets/sockets.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 ext/zip/zip.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_strtod.lo Zend/zend_execute.lo sapi/cli/php_cli.lo sapi/cli/getopt.lo main/internal_functions_cli.lo -lcrypt -lzzip -lcrypt -lmysqlclient -lmhash -lmcrypt -lltdl -lgd -lfreetype -lpng -lz -ljpeg -lcurl -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lcurl -lssl -lcrypto -ldl -lz -lcrypt -lcrypt -o sapi/cli/php
ext/gd/gd.lo(.text+0x1267): In function `zif_imagecolormatch':
/usr/local/directadmin/customapache/php-4.3.10/ext/gd/gd.c:807: undefined reference to `gdImageColorMatch'
ext/gd/gd.lo(.text+0x2cd4): In function `zif_imagerotate':
/usr/local/directadmin/customapache/php-4.3.10/ext/gd/gd.c:1117: undefined reference to `gdImageRotate'
ext/gd/gd.lo(.text+0x5c21): In function `zif_imageline':
/usr/local/directadmin/customapache/php-4.3.10/ext/gd/gd.c:2191: undefined reference to `gdImageAALine'
ext/gd/gd.lo(.text+0x6ca8): In function `zif_imageellipse':
/usr/local/directadmin/customapache/php-4.3.10/ext/gd/gd.c:2324: undefined reference to `gdImageEllipse'
ext/gd/gd.lo(.text+0x9d94): In function `zif_imageantialias':
/usr/local/directadmin/customapache/php-4.3.10/ext/gd/gd.c:3885: undefined reference to `gdImageAntialias'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

How can I solve this problem?
 
Looks like it's not taking your own GD installation, but the build in version and can't find the functions in it.

Do you have GD installed manualy first, before this compile ??

http://www.boutell.com/gd/

Download > ./configure >> make >> make install ???

Should work correctly. Just shooting in the wild here :)
 
GD is installed and working, with all the options I require.

PHP compiles using the internal GD but I want it to use the new version.

All help is appreciated :)
 
Back
Top