Robert Ross
Robert Ross

Reputation: 51

Compile PHP Error with freetype

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.

Upvotes: 5

Views: 10231

Answers (1)

Pierre
Pierre

Reputation: 716

You should use --with-freetype-dir instead 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).

Upvotes: 3

Related Questions