用freetype编译PHP错误 [英] Compile PHP Error with freetype

查看:369
本文介绍了用freetype编译PHP错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我自己配置​​PHP,包括所有我需要的库...但后来意识到我忘了freetype库。



所以我回到我的php- 5.3.2目录并运行./configure'--with-free-type = / usr / local / lib'



PHP配置正确,没有错误。 / p>

但是当我运行make:

  collect2:ld返回1 exit状态
make:*** [sapi / cgi / php-cgi]错误1

经常出现的东西:

  /php-5.3.2/ext/libxml/libxml.c:336:undefined `ts_resource_ex'
/php-5.3.2/ext/sqlite3/sqlite3.c:663:undefined对`executor_globals_id'的引用
ext / sqlite3 / .libs / sqlite3.o:在函数`php_sqlite3_callback_final' :
/php-5.3.2/ext/sqlite3/sqlite3.c:811:undefined对`ts_resource_ex'的引用
ext / sqlite3 / .libs / sqlite3.o:在函数`php_sqlite3_callback_step':
/php-5.3.2/ext/sqlite3/sqlite3.c:799:未定义引用`ts_resource_ex'
ext / sqlite3 / .libs / sqlite3.o:在函数`php_sqlite3_callback_func'中:
/php-5.3.2/ext/sqlite3/sqlite3.c:788:未定义引用`ts_resource_ex'
ext / sqlite3 / .libs / sqlite3.o:在函数`php_sqlite3_authorizer'中:
/ php-5.3.2 / ext / sqlite3 / sqlite3.c:1782:未定义引用`ts_resource_ex'
/php-5.3.2/ext/sqlite3/sqlite3.c:1787:未定义引用`core_globals_id'
ext / sqlite3 / .libs / sqlite3.o:在函数`zim_sqlite3_open'中:
/php-5.3.2/ext/sqlite3/sqlite3.c:161:未定义引用`core_globals_id'
/php-5.3.2/ext/sqlite3/sqlite3.c:123:未定义引用`core_globals_id'

未定义的引用出现几个问题。



所以它失败了,但是没有,当我最初编译PHP。这是怎么回事?我需要重新配置整个事情吗?



提前感谢。

解决方案

您应该使用 - with-freetype-dir 而不是与您的情况下的freetype安装前缀的路径: - with-freetype-dir = / usr / local



当你做一个干净的构建( make clean configure make )。


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.

解决方案

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).

这篇关于用freetype编译PHP错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆