thomas

Well-Known Member
Mar 31, 2002
70
0
306
Hi all,

I am downgrading PHP from 4.3.0 to 4.2.3, and need GD support, but it always fails with this error:

no - FreeType 2.x is to be used instead
checking for T1lib support... no
configure: error: Unable to find libgd.(a|so) anywhere under ../gd-2.0.11
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.


httpd has failed, please contact the sysadmin.
Does anyone have a solution to this? never had this problem with GD on this server before.
 

Admin356

Active Member
Feb 19, 2003
25
0
151
The path to gd may be incorrect , the buildapaches seem to have the incorrect path when compiling php 4.2.3 with the upgraded version of gd - try compiling php by

cd /cpapachebuild/buildapache/php-4.2.3 (or where you downloaded it to)

Compile gd with --with-gd and not --with-gd=../gd-2.0.11
along with your other options.

Hope that helps
 
Last edited:

thomas

Well-Known Member
Mar 31, 2002
70
0
306
Thanks, tried that.

./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-bcmath --enable-calendar --with-curl --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-mcrypt --enable-magic-quotes --with-mysql --with-pear --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-versioning --with-zlib
During 'make' it stops with this error:

Making all in .
make[1]: Entering directory `/home/cpapachebuild/buildapache/php-4.2.3'
/bin/sh /home/cpapachebuild/buildapache/php-4.2.3/libtool --silent --mode=link gcc -I. -I/home/cpapachebuild/buildapache/php-4.2.3/ -I/home/cpapachebuild/buildapache/php-4.2.3/main -I/home/cpapachebuild/buildapache/php-4.2.3 -I/usr/local/apache/include -I/home/cpapachebuild/buildapache/php-4.2.3/Zend -I/usr/include/freetype2/freetype -I/home/cpapachebuild/buildapache/php-4.2.3/ext/mysql/libmysql -I/home/cpapachebuild/buildapache/php-4.2.3/ext/xml/expat -DLINUX=22 -DMOD_SSL=208112 -DUSE_HSREGEX -DEAPI -I/home/cpapachebuild/buildapache/php-4.2.3/TSRM -g -O2 -prefer-pic -o libphp4.la -rpath /home/cpapachebuild/buildapache/php-4.2.3/libs -export-symbols /home/cpapachebuild/buildapache/php-4.2.3/sapi/apache/php.sym -avoid-version -L/usr/X11R6/lib -R /usr/X11R6/lib stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la /home/cpapachebuild/buildapache/php-4.2.3/ext/zlib/libzlib.la /home/cpapachebuild/buildapache/php-4.2.3/ext/bcmath/libbcmath.la /home/cpapachebuild/buildapache/php-4.2.3/ext/calendar/libcalendar.la /home/cpapachebuild/buildapache/php-4.2.3/ext/ctype/libctype.la /home/cpapachebuild/buildapache/php-4.2.3/ext/curl/libcurl.la /home/cpapachebuild/buildapache/php-4.2.3/ext/ftp/libftp.la /home/cpapachebuild/buildapache/php-4.2.3/ext/gd/libgd.la /home/cpapachebuild/buildapache/php-4.2.3/ext/mcrypt/libmcrypt.la /home/cpapachebuild/buildapache/php-4.2.3/ext/mysql/libmysql.la /home/cpapachebuild/buildapache/php-4.2.3/ext/pcre/libpcre.la /home/cpapachebuild/buildapache/php-4.2.3/ext/posix/libposix.la /home/cpapachebuild/buildapache/php-4.2.3/ext/session/libsession.la /home/cpapachebuild/buildapache/php-4.2.3/ext/sockets/libsockets.la /home/cpapachebuild/buildapache/php-4.2.3/ext/standard/libstandard.la /home/cpapachebuild/buildapache/php-4.2.3/ext/xml/libxml.la TSRM/libtsrm.la -lpam -lmcrypt -lltdl -lgd -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lcurl -lz -lcrypt -lresolv -lm -ldl -lnsl -lresolv -lcrypt -lcurl -lz -lssl -lcrypto -ldl -lz -ldl
stub.lo: file not recognized: File truncated
collect2: ld returned 1 exit status
make[1]: *** [libphp4.la] Error 1
make[1]: Leaving directory `/home/cpapachebuild/buildapache/php-4.2.3'
make: *** [all-recursive] Error 1
 

maxx

Registered
Feb 20, 2003
2
0
151
this one worked for me.

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '-- enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--with-mysql' '--with-pear' '-- enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib' '--with-gd' '-- enable-gd-native-ttf' '--with-jpeg-dir'

good luck!
 

maxx

Registered
Feb 20, 2003
2
0
151
although, on second look, that configure statement was with php 4.3.0.

sorry about that.
 

thomas

Well-Known Member
Mar 31, 2002
70
0
306
No problem.

I started over, removed the php dir, extracted it again.

During make now, I get this error:

Making all in gd
make[2]: Entering directory `/home/cpapachebuild/buildapache/php-4.2.3/ext/gd'
make[3]: Entering directory `/home/cpapachebuild/buildapache/php-4.2.3/ext/gd'
/bin/sh /home/cpapachebuild/buildapache/php-4.2.3/libtool --silent --mode=compile gcc -I. -I/home/cpapachebuild/buildapache/php-4.2.3/ext/gd -I/home/cpapachebuild/buildapache/php-4.2.3/main -I/home/cpapachebuild/buildapache/php-4.2.3 -I/usr/local/apache/include -I/home/cpapachebuild/buildapache/php-4.2.3/Zend -I/home/cpapachebuild/buildapache/php-4.2.3/ext/mysql/libmysql -I/home/cpapachebuild/buildapache/php-4.2.3/ext/xml/expat -DLINUX=22 -DMOD_SSL=208112 -DUSE_HSREGEX -DEAPI -I/home/cpapachebuild/buildapache/php-4.2.3/TSRM -g -O2 -prefer-pic -c gd.c
In file included from gd.c:83:
gd_ctx.c: In function `_php_image_output_ctx':
gd_ctx.c:70: structure has no member named `free'
gd_ctx.c:98: structure has no member named `free'
gd.c: In function `_php_image_type':
gd.c:1014: structure has no member named `free'
gd.c:1017: structure has no member named `free'
gd.c: In function `_php_image_create_from':
gd.c:1209: structure has no member named `free'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/home/cpapachebuild/buildapache/php-4.2.3/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/cpapachebuild/buildapache/php-4.2.3/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/cpapachebuild/buildapache/php-4.2.3/ext'
make: *** [all-recursive] Error 1
 

Admin356

Active Member
Feb 19, 2003
25
0
151
Try /scripts/fixheaders

Then compile the gd package (*you might want to try compiling gd 2.0.4 from your old build again)

Then recompile php to where you installed gd.

Good luck.
 

thomas

Well-Known Member
Mar 31, 2002
70
0
306
Never mind, I remembered I read 4.2.3 had to be patched to work with GD 2.0.8 ->, once I did that it compiled without errors. :eek:

Thanks guys!!

Now I need to get some sleep. :)
 

hostbet

Well-Known Member
Aug 13, 2001
80
0
306
Can you share were you get the patch and how...
I have the same problem.
 

hostbet

Well-Known Member
Aug 13, 2001
80
0
306
Thanks, I will try today.

That was a fast reply :)