Мне нужно создать пакет php, поддерживающий расширение intl с помощью bitbake (http://php.net/manual/en/intl.installation.php).
Итак, я создал 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 \
"
Чтобы включить компиляцию intl, я добавил --enable-intl и --with-icu-dir в EXTRA_OECONF. Однако задача настройки выдает следующую ошибку, несмотря на то, что путь к icu-config был добавлен в --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.
Я подозреваю, что configure пытается найти заголовки icu, потому что для сценария icu-config (сгенерированного рецептом icu) указан правильный путь.
Когда я пытаюсь добавить icu-dev в переменную DEPENDS в моем bbappend, я получаю
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']
Когда я пытаюсь добавить icu-dev в переменную RDEPENDS в bbappend, я получаю следующую ошибку:
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']
Есть идеи, как выбраться из этой дыры?
Спасибо!
PACKAGECONFIG_append_pn-php
наPACKAGECONFIG_append
, так как вы уже находитесь в рецепте php.DEPENDS
предназначен для рецептов, поэтому он не будет работать сicu-dev
, так как это пакет.RDEPENDS
поместит пакет dev в вашу текущую цель, это не то, что вам нужно. php предоставляет собственный пакет, поэтому он проверяет пакет icu-dev-native, которого не существует. Возможно, вам придется пропатчить icu-config для работы с кросс-компиляцией Yocto. Вы смотрели на ошибки в файлеconfig.log
? - person Nayfe   schedule 26.04.2018PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2"
, поэтому вы можете добавитьPACKAGECONFIG[icu2] = "--enable-intl --with-icu-dir=${STAGING_BINDIR_CROSS}/icuXX,,icu2-native icu2"
- person Nayfe   schedule 26.04.2018poky/meta/recipes-support/icu/icu.inc
:# ICU needs the native build directory as an argument to its --with-cross-build option when # cross-compiling. Taken the situation that different builds may share a common sstate-cache # into consideration, the native build directory needs to be staged. EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" EXTRA_OECONF_class-native = "" EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
, так что я думаю, что патч для icu-config не нужен... верно? Я не уверен на 100% в этом - person Bernardo Rodrigues   schedule 26.04.2018icu.inc
, но я думаю, вы можете получить картину - person Bernardo Rodrigues   schedule 26.04.2018PACKAGECONFIG_append_pn-php
наPACKAGECONFIG_append
, я получу следующую ошибку: paste.debian.net/1022225 - person Bernardo Rodrigues   schedule 26.04.2018