drcx71276 2018-04-26 03:15
浏览 356

bitbake:为php配方添加php-intl支持

I need to build a php package supporting the intl extension with bitbake (http://php.net/manual/en/intl.installation.php).

So I created a bbappend:

bernardo@bernardo-UX51VZA:~/dev/yocto/meta-steempi$ cat recipes-devtools/php/php_7.%.bbappend 

DEPENDS += " icu apache2"
RDEPENDS_${PN} += " icu apache2"

PACKAGECONFIG_append_pn-php = " apache2 icu icu-dev"
EXTRA_OECONF += " --with-openssl=${STAGING_DIR_TARGET}${exec_prefix} \
                  --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \
                  --with-icu-dir=${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/icu/60.2-r0/image/usr \
                  --enable-intl \
"

To enable the intl compilation, I added the --enable-intl and --with-icu-dir to EXTRA_OECONF. However, the configure task presents the following error, even though the path to icu-config was added to --with-icu-dir.

...
| checking whether to enable internationalization support... yes
| checking for location of ICU headers and libraries... not found 
| configure: error: Unable to detect ICU prefix or /home/bernardo/dev/yocto/poky/build-qemux86-64/tmp/work/core2-64-poky-linux/icu/60.2-r0/image/usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.
| NOTE: The following config.log files may provide further information.
| NOTE: /home/bernardo/dev/yocto/poky/build-qemux86-64/tmp/work/core2-64-poky-linux/php/7.2.4-r0/build/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/bernardo/dev/yocto/poky/build-qemux86-64/tmp/work/core2-64-poky-linux/php/7.2.4-r0/temp/log.do_configure.19483)
ERROR: Task (/home/bernardo/dev/yocto/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1802 tasks of which 1801 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
  /home/bernardo/dev/yocto/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb:do_configure
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

I suspect the configure is trying to find icu's headers, because the icu-config script (generated by icu recipe) is set with the right path.

When I try to add icu-dev to the DEPENDS variable in my bbappend, I get

ERROR: Nothing PROVIDES 'icu-dev' (but /home/leprechaun/dev/yocto/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb DEPENDS on or otherwise requires it). Close matches:
  udev
  icu RPROVIDES icu-dev
ERROR: Required build target 'php' has no buildable providers.
Missing or unbuildable dependency chain was: ['php', 'icu-dev']

When I try to add icu-dev to the RDEPENDS variable in the bbappend, I get the following error:

ERROR: Nothing RPROVIDES 'icu-dev-native' (but virtual:native:/home/leprechaun/dev/yocto/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'icu-dev-native' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['icu-dev-native']
ERROR: Required build target 'php' has no buildable providers.
Missing or unbuildable dependency chain was: ['php', 'php-native', 'icu-dev-native']

Any ideas on how to get out of this hole?

Thanks!

  • 写回答

1条回答 默认 最新

  • duanjiwu0324 2019-01-06 21:52
    关注

    I had the same issue and took me a while but I got the php build working. This is my .bbappend file:

    EXTRA_OECONF_append_class-target = " --with-curl=${STAGING_LIBDIR}/.."
    DEPENDS_append_class-target = " icu curl"
    
    EXTRA_OECONF =+ " --enable-mbstring --with-openssl --enable-bcmath --enable-sockets --enable-intl \
                                              --with-icu-dir=${BASE_WORKDIR}/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/icu/62.1-r0/recipe-sysroot-native/usr \
                          , \
                          , icu-native icu"
    PACKAGECONFIG ??= "sqlite3"
    PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \
                              --with-pdo-sqlite=${STAGING_LIBDIR}/.. \
                              , \
                              ,sqlite3"
    
    LIBS_pn-php =" -lpthread "
    export LIBS
    THREADS_pn-php = "pthread"
    export THREADS
    
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向