首页 > 解决方案 > 交叉编译 PHP for arm - 错误无法运行测试

问题描述

我正在尝试为 cortex A6 - armv7 平台编译 PHP 5.6.36(在 PHP 网站上下载)。

我这样配置编译器:

./configure --host=arm CC="arm-gad-linux-gnueabi-gcc  -march=armv7-a -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/gad/1.0.0/sysroots/cortexa9hf-vfp-neon-gad-linux-gnueabi" --disable-dom  --without-iconv --without-openssl --without-pear --without-sqlite3 --disable-pdo --without-pdo-sqlite --disable-phar

但我得到这个错误:

checking for strcasestr... configure: error: in `/home/PHP/php-5.6.36': 

configure: error: cannot run test program while cross compiling

问我是否需要更精确。

谢谢你的帮助,

标签: phpcross-compilingarmv7cortex-a

解决方案


当您进行交叉编译时,您正在创建不会在您正在编译的系统上运行(测试)的二进制文件。观察。

然而,编写配置脚本的人并不认为人们会进行交叉编译。这应该被标记为维护者的错误。


推荐阅读