【问题标题】:Compile PHP Error with freetype使用 freetype 编译 PHP 错误
【发布时间】:2011-02-14 14:59:03
【问题描述】:

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

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

PHP 的配置很好,没有错误。

但是当我运行 make 时:

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

经常出现的事情:

/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'

未定义的引用出现了几件事。

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

提前致谢。

【问题讨论】:

  • @Robert Ross:获取更多上面的错误数据,这个网站上的人更喜欢一些编译器错误。
  • 工作就像一个魅力。谢谢!!
  • VolkerK 的评论就是答案

标签: php makefile compilation configure


【解决方案1】:

You should use --with-freetype-dir instead 与 freetype 安装前缀的路径:--with-freetype-dir=/usr/local 在您的情况下。

当您进行干净构建时,编译错误应该会消失(make cleanconfiguremake)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-11-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多