FreeType to PHP/GD

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
If anyone has successfully added FreeType to GD/PHP, please let me know how you did it.

I downloaded FreeType2 into /usr/local/directadmin/customapache

untar'd
cd into folder
gmake
gmake install clean

I then went back into /customapache and edited configure.php to put in

--with-freetype-dir=/usr/local/lib

I then did ./build gd and then ./build php

Everything seemed to go ok, and after restarting apache, the ./configure in phpinfo looks ok, but below under GD, there is no FreeType support listed. During the GD build, it listed FreeType2 as Yes and there were no errors in the builds.

I even did a complete ./build all and still the same problem is there.

I have to be missing a step, anyone have any ideas?
 
Hello,

Just a thought, but did you add a \ character to the line before your new line in the configure.php file? ... a backslash has to exist on every line except the last one.

John
 
Yeah, and everything compiled looking just fine.

I have set up probably 50 FreeBSD boxes over the last year and all I have to do there is go into the ports collection, do a make install clean, and a PHP menu pops up where you select the options you need. Everything is automatic from there.

Not that this is better or worse than your system, just different, and I am not use to it so I really am clueless on where to look for the problem. I am sure it is something simple that I am overlooking.
 
You might try doing a

./build clean

and then building everything again... if some objects are left over from the last build, it might mess things up.

John
 
I tried the build clean and this is what happened. Not quite sure how to deciphor this.

/usr/local/include/freetype2/freetype/ftglyph.h:104: syntax error before `FT_Library'
/usr/local/include/freetype2/freetype/ftglyph.h:106: syntax error before `FT_Glyph_Format'
/usr/local/include/freetype2/freetype/ftglyph.h:157: syntax error before `FT_Int'
/usr/local/include/freetype2/freetype/ftglyph.h:205: syntax error before `FT_Outline'
/usr/local/include/freetype2/freetype/ftglyph.h:228: syntax error before `FT_Get_Glyph'
/usr/local/include/freetype2/freetype/ftglyph.h:228: syntax error before `slot'
/usr/local/include/freetype2/freetype/ftglyph.h:229: warning: data definition has no type or storage class
/usr/local/include/freetype2/freetype/ftglyph.h:251: syntax error before `FT_Glyph_Copy'
/usr/local/include/freetype2/freetype/ftglyph.h:252: warning: data definition has no type or storage class
/usr/local/include/freetype2/freetype/ftglyph.h:281: syntax error before `FT_Glyph_Transform'
/usr/local/include/freetype2/freetype/ftglyph.h:282: syntax error before `FT_Matrix'
/usr/local/include/freetype2/freetype/ftglyph.h:283: warning: data definition has no type or storage class
/usr/local/include/freetype2/freetype/ftglyph.h:403: syntax error before `FT_Glyph_Get_CBox'
/usr/local/include/freetype2/freetype/ftglyph.h:404: syntax error before `FT_UInt'
/usr/local/include/freetype2/freetype/ftglyph.h:405: warning: data definition has no type or storage class
/usr/local/include/freetype2/freetype/ftglyph.h:479: syntax error before `FT_Glyph_To_Bitmap'
/usr/local/include/freetype2/freetype/ftglyph.h:480: syntax error before `FT_Render_Mode'
/usr/local/include/freetype2/freetype/ftglyph.h:482: warning: data definition has no type or storage class
/usr/local/include/freetype2/freetype/ftglyph.h:497: syntax error before `FT_Done_Glyph'
/usr/local/include/freetype2/freetype/ftglyph.h:497: warning: data definition has no type or storage class
/usr/local/include/freetype2/freetype/ftglyph.h:528: syntax error before `FT_Matrix_Multiply'
/usr/local/include/freetype2/freetype/ftglyph.h:528: syntax error before `*'
/usr/local/include/freetype2/freetype/ftglyph.h:529: warning: data definition has no type or storage class
/usr/local/include/freetype2/freetype/ftglyph.h:548: syntax error before `FT_Matrix_Invert'
/usr/local/include/freetype2/freetype/ftglyph.h:548: syntax error before `*'
/usr/local/include/freetype2/freetype/ftglyph.h:548: warning: data definition has no type or storage class
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:114: syntax error before `FT_Library'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:125: syntax error before `FT_Library'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: In function `fontFetch':
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:363: syntax error before `err'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:369: structure has no member named `library'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:369: structure has no member named `library'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:446: `err' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:446: (Each undeclared identifier is reported only once
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:446: for each function it appears in.)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:446: structure has no member named `library'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:446: structure has no member named `face'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:460: structure has no member named `have_char_map_unicode'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:461: structure has no member named `have_char_map_big5'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:462: structure has no member named `have_char_map_sjis'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:463: structure has no member named `have_char_map_apple_roman'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:464: structure has no member named `face'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:465: `charmap' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:465: structure has no member named `face'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:473: structure has no member named `have_char_map_unicode'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:474: `found' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:476: structure has no member named `have_char_map_big5'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:479: structure has no member named `have_char_map_sjis'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:484: structure has no member named `have_char_map_apple_roman'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:496: structure has no member named `face'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: In function `fontRelease':
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:504: structure has no member named `face'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: At top level:
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:590: syntax error before `FT_Bitmap'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: In function `gdft_draw_bitmap':
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:600: `fg' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:601: `im' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:605: `bitmap' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:609: `pen_y' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:616: `ft_pixel_mode_grays' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:625: `ft_pixel_mode_mono' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:644: `pen_x' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:726: `tc_cache' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: At top level:
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:736: syntax error before `v1'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: In function `gdroundupdown':
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:738: `updown' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:739: `v1' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: At top level:
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:748: syntax error before `library'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:748: warning: data definition has no type or storage class
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c: In function `gdImageStringFTEx':
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:775: syntax error before `bbox'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:780: syntax error before `slot'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:794: `FT_LOAD_DEFAULT' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:826: structure has no member named `library'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:832: `face' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:832: structure has no member named `face'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:833: `slot' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:835: `FT_F26Dot6' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:840: `matrix' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:840: `FT_Fixed' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:845: `penf' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:846: `pen' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:847: `bbox' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:849: `use_kerning' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:850: `previous' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:852: `FT_LOAD_MONOCHROME' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:866: structure has no member named `have_char_map_unicode'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:871: structure has no member named `have_char_map_sjis'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:892: structure has no member named `have_char_map_sjis'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:931: structure has no member named `have_char_map_unicode'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:938: structure has no member named `have_char_map_sjis'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:991: `glyph_index' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:995: `ft_kerning_default' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:995: `delta' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1012: `glyph_bbox' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1043: structure has no member named `format'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1043: `ft_glyph_format_bitmap' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1043: `ft_render_mode_normal' undeclared (first use in this function)
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1053: structure has no member named `bitmap'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1053: structure has no member named `left'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1053: structure has no member named `top'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1060: structure has no member named `advance'
/usr/local/directadmin/customapache/php-4.3.3/ext/gd/libgd/gdft.c:1061: structure has no member named `advance'
*** Error code 1

Stop in /usr/local/directadmin/customapache/php-4.3.3.
-e \n*** The make has failed, do you want to try to make again? (y,n):
 
Back
Top