Click to See Complete Forum and Search --> : PHP Extensions Compilation


Anon
08-13-2000, 07:58 PM
Linux RedHat 6.1

Software installed in /usr/local :
APACHE 1.3.12
FREETYPE 1.3.1
GD 1.8.3
LIBMCRYPT 2.4.4
MCRYPT 2.5.4
MYSQL 3.22.32
PHP 4.0.1pl2
XPAT

PHP Configure syntax:

./configure \
--with-apxs=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-gd \
--with-mcrypt \
--with-xml \
--enable-debugger \
--enable-magic-quotes \
--enable-safe-mode \
--enable-track-vars

Receiving the following compilation error:

make[2]: Entering directory `/usr/local/src/php-4.0.1pl2/ext/gd'
make[3]: Entering directory `/usr/local/src/php-4.0.1pl2/ext/gd'
/bin/sh /usr/local/src/php-4.0.1pl2/libtool --silent --mode=compile gcc -DHAVE_C
ONFIG_H -I. -I/usr/local/src/php-4.0.1pl2/ext/gd -I/usr/local/src/php-4.0.1pl2 -
I/usr/local/src/php-4.0.1pl2/main -I/usr/local/apache/include -I/usr/local/src/p
hp-4.0.1pl2/Zend -I/usr/local/src/php-4.0.1pl2 -I/usr/local/include/freetype -I/
usr/local/mysql/include/mysql -I/usr/local/src/php-4.0.1pl2/ext/xml/expat/xmltok
-I/usr/local/src/php-4.0.1pl2/ext/xml/expat/xmlparse -DXML_BYTE_ORDER=12 -g -O
2 -c gd.c
gd.c: In function `php_if_imagecreatefromgif':
gd.c:472: `gdImageCreateFromGif' undeclared (first use in this function)
gd.c:472: (Each undeclared identifier is reported only once
gd.c:472: for each function it appears in.)
gd.c: In function `php_if_imagegif':
gd.c:629: `gdImageGif' undeclared (first use in this function)
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/local/src/php-4.0.1pl2/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/php-4.0.1pl2/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/php-4.0.1pl2/ext'
make: *** [all-recursive] Error 1

Anon
08-14-2000, 11:58 AM
Compiling PHP with Freetype and GD is about the most frustrating aspect of installing PHP. GD with Freetype depends on so many other things being just right, such as X-windows, zlib, libjpeg, libpng, etc...

After many tries, I found a combination that works on FreeBSD. I haven't tested it with Linux, but it shouldn't be too different. There is one part where I do a small edit of the GD source, which you might not need in Linux:

If you go to this page (http://www.php.net/manual/ref.image.php) at the PHP site and look for rick@e-possibility.com at the notes at the bottom, you will see my complete method. It may seem crazy what I had to do, but it works. (I have done it on 4 systems)

Anon
01-12-2001, 07:32 AM
Tell me about frustrating.. i amtrying to install this on a redhat withou X11 installed because i need this for a webserver application... mind you not even the regular compilation works.. i completely recompiled apache without and then with the php module.. still it shows the 3.12 apache, while i installed with the 3.14... any suggestions on this? and how to install the TTF support (freetype is installed as RPM, manual compilation won't work)?

regards
Evert