Trying to compile with GD image function. After downloading, and installing the following libraries:

gd 2.0.1
zlib 1.1.3
jpeg 6b
freetype 2.0.1
libpng 1.0.10

I configure php with the following directives (note: blank lines added for legibility).

configure
--with-apache=../apache_1.3.19
--enable-track-vars
--with-mysql=/servers/mysql
--with-pdflib=../pdflib-3.03
--with-gd
--enable-freetype-antialias-hack
--with-jpeg-dir=../jpeg-6b
--with-png-dir=../libpng-1.0.10
--with-tiff-dir=../tiff-v3.4
--with-t1lib

After some work, I got this configuration to "configure", so here I am on the make the bad puppy. Zend goes without whining, and all seems well until we get to gdttf.c and I get some pretty unexpected errors:

gdttf.c:74: parse error before TT_Engine'
gdttf.c:74: warning: no semicolon at end of struct or union
gdttf.c:75: warning: data definition has no type or storage class
gdttf.c:76: parse error before
properties'
gdttf.c: In function fontTest':
gdttf.c:319:
a' undeclared (first use this function)
gdttf.c:319: (Each undeclared identifier is reported only once
gdttf.c:319: for each function it appears in.)
gdttf.c:319: parse error before `)'

There's about 200 lines of this stuff.

Any Ideas?

Thanks so much!

Doug (doug@woolf.net)

    I have been trying to compile the 4 libraries into PHP that you have for the last 4 weeks. (Tried GD-1.8.4, GD-2.0.0, GD-2-2.0.1) and have had many frustrations.

    I haven't tried the with-pdflib, with-anitialias-hack, with-tiff, or with-t1lib. For freetype support, I thought you were supposed to use with-ttf. I can't get the libraries to compile into the libgd.so.

    Chris

      chris,

      I've tried with only gd and I get the same problems. t1lib, etc. don't seem to be much trouble. However, I wont trust my pdflib config until I have it all working.

      I did try earlier versions of GD as well, but to no avail. What kind of errors are you getting? Something seems to be sour when I get syntax errors on c code that was distributed with php (it seems to be php's ./ext/gd files that are the trouble makers, not GD's code).

      Let me know.

      Thanks,

      Doug

        I don't get errors untill I get to the end of the make for PHP. What it tells me is that something is wrong with my gdlib.so file. It was sugested that I use the nm command to look into the .so file and find what is compiled in. Unfortunately I have not yet found out what it does exactly. I do know that the jpeg, png, truetype functions all have a capital U in front of them, and I am speculating that they are not included properly.

          3 months later

          Howdy guys,
          whilst I haven't yet resolved the problem myself - I am getting a much better idea about it and though I shoudl update you.

          Forget the problem as being a PHP one - it's not - it's something to do with GD and Freetype libraries.
          When I compile GD without the entry "-DHAVE_LIBTTF" or "-lttf" it all works - but if I call it for TrueType fonts - it doesn't work sigh

          I am getting EXACTLY the same problems as yourselves - I just wanted to clear the water and let you know that the problem is actually in GD and involves that "DHAVE_TTF" entry (if you omit it and just leave "-lttf" - it fails with can't find ttf - so that is something else - I believe that it s looking for version 1x of TTF).

          Anyway - don't confuse it with PHP - it's at a lower layer than that.

          BTW: "t1f" in your posts should actually be "ttf" - it stands for TrueTypeFont ;o)

          Mike

            a month later

            i've had the same problems as well. i've had the most luck with gd1.8.3 freetype1.3.1 using php4.0.5 The key to it all working turned out to be going into where I have been installing these libraries(/usr/local/lib /usr/local/include) and deleting everything with gd and libgd (for example) and re-install. This got rid of old libraries that I installed when I was going through and trying every version of gd and freetype trying to get something / anything to work. Give it a shot. It might help those php make problems your seeing

              Write a Reply...