使用 freetype 编译 PHP 错误

发布于 2024-08-31 04:15:46 字数 1469 浏览 1 评论 0原文

我自己配置​​了 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 时却没有。这是怎么回事?我需要重新配置整个事情吗?

提前致谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冰葑 2024-09-07 04:15:46

您应该使用 --with-freetype-dir 代替 freetype 安装前缀的路径: --with-freetype-dir=/usr/local 在您的情况下。

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文