gpt4 book ai didi

php - 从源代码编译 php-7 给出了目标 'libphp7.la' 失败的配方

转载 作者:行者123 更新时间:2023-12-04 18:01:37 36 4
gpt4 key购买 nike

我使用以下配置从源代码编译 PHP-7.0.1:

$ ./configure -q \
--prefix=/opt/php/php-7.0 \
--bindir=/opt/php/php-7.0/bin --sbindir=/opt/php/php-7.0/bin \
--with-apxs2=/usr/bin/apxs \
--enable-zip --enable-pdo \
--with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd \
--enable-calendar --enable-mysqlnd-compression-support \
--enable-embedded-mysqli --enable-mbregex \
--enable-bcmath --with-xsl \
--enable-sockets --with-tidy \
--enable-cli --enable-pcntl --with-mcrypt \
--with-gd --enable-gd-native-ttf --with-pear \
--enable-shared

以上成功完成。后来,我运行了一个 make && make test 给我以下错误:

libtool: link: `ext/xmlwriter/php_xmlwriter.lo' is not a valid libtool object

Makefile:146: recipe for target 'libphp7.la' failed make: *** [libphp7.la] Error 1

Makefile 中的第 145-147 行是:

libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1

这可能是什么问题?


编辑

ext/xmlwriter/php_xmlwriter.lo 的内容:

pic_object='.libs/php_xmlwriter.o'

# Name of the non-PIC object.
non_pic_object=none

编辑-2

整个输出,包括 ./configure 命令可在 hastebin 上获得按要求 in comments .未禁用 xmlwriter 时,输出与之前相同:

┌─[hjpotter92]─(php-7.0.1)─[12:48 pm] 
└──% make >> ~/out
libtool: link: `ext/xmlwriter/php_xmlwriter.lo' is not a valid libtool object
make: *** [libphp7.la] Error 1

最佳答案

我遇到了完全相同的问题,我所做的就是解决它:

make clean

然后:

make

即使我的包是第一次解压缩和 ./configure,运行“make clean”确实有很大的不同。

工作正常!

关于php - 从源代码编译 php-7 给出了目标 'libphp7.la' 失败的配方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34394514/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com