views:

31

answers:

1

Hey Guys,

I configured PHP myself, included all of the libraries I needed... but then realized I forgot the freetype library.

So I went back to my php-5.3.2 directory and ran ./configure '--with-free-type=/usr/local/lib'

PHP did the configure fine, no errors.

But when I run make:

collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

Something that comes up frequently:

/php-5.3.2/ext/libxml/libxml.c:336: undefined reference to `ts_resource_ex'
/php-5.3.2/ext/sqlite3/sqlite3.c:663: undefined reference to `executor_globals_id'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_final':
/php-5.3.2/ext/sqlite3/sqlite3.c:811: undefined reference to `ts_resource_ex'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_step':
/php-5.3.2/ext/sqlite3/sqlite3.c:799: undefined reference to `ts_resource_ex'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_func':
/php-5.3.2/ext/sqlite3/sqlite3.c:788: undefined reference to `ts_resource_ex'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_authorizer':
/php-5.3.2/ext/sqlite3/sqlite3.c:1782: undefined reference to `ts_resource_ex'
/php-5.3.2/ext/sqlite3/sqlite3.c:1787: undefined reference to `core_globals_id'
ext/sqlite3/.libs/sqlite3.o: In function `zim_sqlite3_open':
/php-5.3.2/ext/sqlite3/sqlite3.c:161: undefined reference to `core_globals_id'
/php-5.3.2/ext/sqlite3/sqlite3.c:123: undefined reference to `core_globals_id'

The undefined reference comes up for several things.

So it fails here but it didn't when I initially compiled PHP. What's going on? Do I need to reconfigure the entire thing?

Thanks in advance.

A: 

You should use --with-freetype-dir instead (http://libgd.org/FAQ_PHP#How_do_I_get_gd_to_work_with_PHP.3F) with the path to the freetype install prefix: --with-freetype-dir=/usr/local in your case

The compile error should go away when you do a clean build (make clean, configure, make)

Pierre