сборка php с поддержкой freetype2

jer

...
сборка php с поддержкой freetype2

freebsd 6.2
php 5.2.6

все необходимые либы лежат в /usr/local/lib
freetype 2.3.7

./configure --with-mysql --with-pdo-mysql --enable-debug --with-t1lib=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --enable-gd-native-ttf --with-gd

проходит без ошибок

далее:
make

...

In function `fontFetch':
/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:339: undefined reference to `TT_Open_Face'
ext/gd/gdttf.o(.text+0x335):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:349: undefined reference to `TT_Get_Face_Properties'
ext/gd/gdttf.o(.text+0x34d):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:352: undefined reference to `TT_New_Instance'
ext/gd/gdttf.o(.text+0x389):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:358: undefined reference to `TT_Set_Instance_Resolutions'
ext/gd/gdttf.o(.text+0x3e9):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:364: undefined reference to `TT_Set_Instance_CharSize'
ext/gd/gdttf.o(.text+0x428):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:370: undefined reference to `TT_Get_Instance_Metrics'
ext/gd/gdttf.o(.text+0x439):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:373: undefined reference to `TT_Get_CharMap_Count'
ext/gd/gdttf.o(.text+0x46c):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:376: undefined reference to `TT_Get_CharMap_ID'
ext/gd/gdttf.o(.text+0x4ae):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:380: undefined reference to `TT_Get_CharMap'
ext/gd/gdttf.o(.text+0x4ec):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:384: undefined reference to `TT_Get_CharMap'
ext/gd/gdttf.o(.text+0x52a):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:388: undefined reference to `TT_Get_CharMap'
ext/gd/gdttf.o(.text+0x676): In function `fontRelease':
/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:415: undefined reference to `TT_Done_Instance'
ext/gd/gdttf.o(.text+0x687):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:416: undefined reference to `TT_Close_Face'
ext/gd/gdttf.o(.text+0x76d): In function `glyphFetch':
/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:448: undefined reference to `TT_New_Glyph'
ext/gd/gdttf.o(.text+0x7ee):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:459: undefined reference to `TT_Char_Index'
ext/gd/gdttf.o(.text+0x828):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:461: undefined reference to `TT_Char_Index'
ext/gd/gdttf.o(.text+0x857):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:463: undefined reference to `TT_Char_Index'
ext/gd/gdttf.o(.text+0x87e):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:465: undefined reference to `TT_Load_Glyph'
ext/gd/gdttf.o(.text+0x8c3):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:471: undefined reference to `TT_Get_Glyph_Metrics'
ext/gd/gdttf.o(.text+0x8f6):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:473: undefined reference to `TT_Get_Glyph_Outline'
ext/gd/gdttf.o(.text+0x912):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:474: undefined reference to `TT_Transform_Outline'
ext/gd/gdttf.o(.text+0xdc3): In function `glyphRelease':
/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:521: undefined reference to `TT_Done_Glyph'
ext/gd/gdttf.o(.text+0xecd): In function `bitmapFetch':
/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:553: undefined reference to `TT_Get_Glyph_Pixmap'
ext/gd/gdttf.o(.text+0xef5):/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:555: undefined reference to `TT_Get_Glyph_Bitmap'
ext/gd/gdttf.o(.text+0x155e): In function `gdttf':
/usr/home/adm/php-5.2.6/ext/gd/gdttf.c:753: undefined reference to `TT_Init_FreeType'
*** Error code 1


чего ему не хватает?
 

tony2001

TeaM PHPClub
1) ./configure --with-mysql --with-pdo-mysql --enable-debug --with-t1lib=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --enable-gd-native-ttf --with-gd

ни одна известная мне опция не принимает полный путь до либ.
абсолютно все принимают *префикс*.
хидеры в /usr/local/include? либы в /usr/local/lib? префикс - /usr/local!

2) по поводу compile failure - нужна более детальная информация, я не понимаю как ты это сумел сделать.
как минимум, надо знать что сказал ./configure про gd, freetype, там строк 15 после "checking for GD support... yes".
 

jer

...
префикс поправил:
./configure --with-mysql --with-pdo-mysql --enable-debug --with-t1lib=/usr/local --with-jpeg-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-gd > _log.txt

...
checking for GD support... yes
checking for the location of libjpeg... /usr/local
checking for the location of libpng... no
checking for the location of libXpm... no
checking for FreeType 1.x support... no
checking for FreeType 2... /usr/local
checking for T1lib support... /usr/local
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... (cached) yes
checking for floorf... (cached) yes
checking for jpeg_read_header in -ljpeg... (cached) yes
checking for png_write_image in -lpng... (cached) yes
If configure fails try --with-xpm-dir=<DIR>
checking for FT_New_Face in -lfreetype... (cached) yes
checking for T1_StrError in -lt1... (cached) yes
checking for GNU gettext support... no
...
 

440hz

php.ru
а из портов собрать не судьба? че выеживаться-то?

hosting(root):/usr/ports#>pkg_info | grep freetype
freetype2-2.3.5 A free and portable TrueType font rendering engine


gd

GD Support => enabled
GD Version => bundled (2.0.34 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.3.5
T1Lib Support => enabled
GIF Read Support => enabled
GIF Create Support => enabled
JPG Support => enabled
PNG Support => enabled
WBMP Support => enabled
XBM Support => enabled
 

jer

...
я не большой асс в никсах, поэтому мне казалось я простым путём иду ))) не думал что это "выёживание" ))

да и фритайп то как раз без вопросов у меня собрался. все встало на этапе прикручивания его к пыху.

в общем, хотелось понять что к чему.


a24# pkg_info | grep freetype
freetype2-2.2.1_1 A free and portable TrueType font rendering engine

установлен.
пробуем обновиться:

a24# pkg_add -r ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/freetype2.tbz
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/freetype2.tbz... Done.
pkg_add: package 'freetype2-2.3.7' or its older version already installed

ругается на старую версию, пытаюсь удалить старую:

a24# pkg_delete freetype2-2.2.1_1
pkg_delete: package 'freetype2-2.2.1_1' is required by these other packages
and may not be deinstalled:
fontconfig-2.3.2_6,1
xorg-libraries-6.9.0_1
t1lib-5.1.0_1,1
php5-extensions-1.1
gd-2.0.33_4,1
p5-GD-2.35
p5-GD-TextUtil-0.86
p5-GD-Graph-1.43.08
bugzilla-2.22.2
php5-extensions-1.0
php5-gd-5.1.6_3

на него завязано еще куча всего.
вы думаете проблема в самом freetype2?
 

440hz

php.ru
portupgrade?

или порт обновить и поверх поставить принудительно.

p.s. а чем текущий freetype не катит? или мы хотим иметь последние версии?
 

jer

...
текущий катит. с ним php не хочет собираться. см. первый пост.
 

440hz

php.ru
Автор оригинала: jer
текущий катит. с ним php не хочет собираться. см. первый пост.
так я ж и спрашивал php из портов не поставить?
=)

или мы все руками? все не ищем легких путей?
 

jer

...
если туплю, прошу простить. сейчас попробую сам пых из портов поставить )) изначально не ставил т.к. там была древняя версия. не допер что можно накатить свежую ))

-~{}~ 02.09.08 15:39:

а как мне накатить port php поверх текущего со всеми зависимостями?

ps: не вдаваясь в детали - не получается у мя. запутался в паутине хитросплетений портов )))

-~{}~ 02.09.08 15:42:

хотя порт встал в итоге ;-/

a24# pkg_info | grep php
php5-5.2.6_1 PHP Scripting Language

и в phpinfo видится он.

Но не пойму как его сконфигурировать.

a24# cd /usr/ports/lang/php5
a24# ./configure --help
./configure: Command not found.

-~{}~ 02.09.08 15:42:

по умолчанию он встал так:

'./configure' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection' '--program-prefix=' '--enable-fastcgi' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd6.3'
 
Сверху