gumstix / yocto-manifest

Repo to manage YoctoProject related git repositories
42 stars 53 forks source link

PHP fails to build #59

Closed 17twenty closed 9 years ago

17twenty commented 9 years ago

After using the IMAGE_FEATURES += "php" and performing a bitbake on gumstix-console-image the system fails with the following.


WARNING: QA Issue: php requires /home/nick/yocto-build/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/image/usr/bin/php, but no providers in its RDEPENDS [file-rdeps]
ERROR: Unable to install packages. Command '/home/nick/yocto-build/build/tmp/sysroots/i686-linux/usr/bin/smart --quiet --data-dir=/home/nick/yocto-build/build/tmp/work/overo-poky-linux-gnueabi/gumstix-console-image/1.0-r0/rootfs/var/lib/smart install -y alsa-utils@cortexa8hf_vfp_neon psplash@cortexa8hf_vfp_neon mtdev@cortexa8hf_vfp_neon tar@cortexa8hf_vfp_neon less@cortexa8hf_vfp_neon lighttpd@cortexa8hf_vfp_neon iputils@cortexa8hf_vfp_neon mtd-utils-ubifs@cortexa8hf_vfp_neon sudo@cortexa8hf_vfp_neon uim@cortexa8hf_vfp_neon raw2rgbpnm@cortexa8hf_vfp_neon vim@cortexa8hf_vfp_neon media-ctl@cortexa8hf_vfp_neon linux-firmware-wl18xx@all ppp@cortexa8hf_vfp_neon findutils@cortexa8hf_vfp_neon curl@cortexa8hf_vfp_neon rpm@cortexa8hf_vfp_neon cpufrequtils@cortexa8hf_vfp_neon packagegroup-cli-tools@all v4l-utils@cortexa8hf_vfp_neon nano@cortexa8hf_vfp_neon smartpm@cortexa8hf_vfp_neon tzdata@all coreutils@cortexa8hf_vfp_neon systemd-analyze@cortexa8hf_vfp_neon memtester@cortexa8hf_vfp_neon yavta@cortexa8hf_vfp_neon libts-1.0-0@cortexa8hf_vfp_neon packagegroup-core-ssh-openssh@all ntp@cortexa8hf_vfp_neon packagegroup-cli-tools-debug@all ti-wifi-utils@cortexa8hf_vfp_neon gpsd@cortexa8hf_vfp_neon iw@cortexa8hf_vfp_neon wget@cortexa8hf_vfp_neon shadow@cortexa8hf_vfp_neon php@cortexa8hf_vfp_neon grep@cortexa8hf_vfp_neon zip@cortexa8hf_vfp_neon hostapd@cortexa8hf_vfp_neon diffutils@cortexa8hf_vfp_neon linux-firmware-sd8787@all linux-firmware-sd8686@all gzip@cortexa8hf_vfp_neon u-boot-mkimage@cortexa8hf_vfp_neon base-passwd@cortexa8hf_vfp_neon locale-base-en-us@cortexa8hf_vfp_neon' returned 1:
error: Can't install php-5.4.36-r0.0@cortexa8hf_vfp_neon: no package provides /home/nick/yocto-build/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/image/usr/bin/php

ERROR: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/nick/yocto-build/build/tmp/work/overo-poky-linux-gnueabi/gumstix-console-image/1.0-r0/temp/log.do_rootfs.15681
ERROR: Task 7 (/home/nick/yocto-build/poky/meta-gumstix-extras/recipes-images/gumstix/gumstix-console-image.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3590 tasks of which 3465 didn't need to be rerun and 1 failed.
No currently running tasks (3590 of 3591)

Summary: 1 task failed:
  /home/nick/yocto-build/poky/meta-gumstix-extras/recipes-images/gumstix/gumstix-console-image.bb, do_rootfs

I've tried fixing it but it looks like a unmet dependency on smart

/home/nick/yocto-build/build/tmp/sysroots/i686-linux/usr/bin/smart --quiet --data-dir=/home/nick/yocto-build/build/tmp/work/overo-poky-linux-gnueabi/gumstix-console-image/1.0-r0/rootfs/var/lib/smart install -y alsa-utils@cortexa8hf_vfp_neon psplash@cortexa8hf_vfp_neon mtdev@cortexa8hf_vfp_neon tar@cortexa8hf_vfp_neon less@cortexa8hf_vfp_neon lighttpd@cortexa8hf_vfp_neon iputils@cortexa8hf_vfp_neon mtd-utils-ubifs@cortexa8hf_vfp_neon sudo@cortexa8hf_vfp_neon uim@cortexa8hf_vfp_neon raw2rgbpnm@cortexa8hf_vfp_neon vim@cortexa8hf_vfp_neon media-ctl@cortexa8hf_vfp_neon linux-firmware-wl18xx@all ppp@cortexa8hf_vfp_neon findutils@cortexa8hf_vfp_neon curl@cortexa8hf_vfp_neon rpm@cortexa8hf_vfp_neon cpufrequtils@cortexa8hf_vfp_neon packagegroup-cli-tools@all v4l-utils@cortexa8hf_vfp_neon nano@cortexa8hf_vfp_neon smartpm@cortexa8hf_vfp_neon tzdata@all coreutils@cortexa8hf_vfp_neon systemd-analyze@cortexa8hf_vfp_neon memtester@cortexa8hf_vfp_neon yavta@cortexa8hf_vfp_neon libts-1.0-0@cortexa8hf_vfp_neon packagegroup-core-ssh-openssh@all ntp@cortexa8hf_vfp_neon packagegroup-cli-tools-debug@all ti-wifi-utils@cortexa8hf_vfp_neon gpsd@cortexa8hf_vfp_neon iw@cortexa8hf_vfp_neon wget@cortexa8hf_vfp_neon shadow@cortexa8hf_vfp_neon php@cortexa8hf_vfp_neon grep@cortexa8hf_vfp_neon zip@cortexa8hf_vfp_neon hostapd@cortexa8hf_vfp_neon diffutils@cortexa8hf_vfp_neon linux-firmware-sd8787@all linux-firmware-sd8686@all gzip@cortexa8hf_vfp_neon u-boot-mkimage@cortexa8hf_vfp_neon base-passwd@cortexa8hf_vfp_neon locale-base-en-us@cortexa8hf_vfp_neon
Traceback (most recent call last):
  File "/home/nick/yocto-build/build/tmp/sysroots/i686-linux/usr/bin/smart.real", line 27, in <module>
    from smart import init, initDistro, initPlugins, initPycurl, initPsyco
ImportError: No module named smart

Incidentally the only other reference was: https://github.com/gumstix/meta-gumstix-extras/commit/fe1a6df7a68ad6d75bae732094b4044ab778ec43

adam-lee commented 9 years ago

Are you sure IMAGE_FEATURES is where you are adding php? Poky Reference Manual does not include it as a possibility [1].

[1] http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html#ref-features-image

17twenty commented 9 years ago

IMAGE_INSTALL += is what I meant, apologies.

Even trying IMAGE_INSTALL_append didn't help.

17twenty commented 9 years ago

I have the line:

IMAGE_INSTALL += "lighttpd ppp lighttpd-module-fastcgi php"
adam-lee commented 9 years ago

@17twenty Ok adding php to IMAGE_INSTALL fails for me also. I think php is not the right package name to use. A recipe may provide multiple packages, and in this case the php recipe provides multiple packages and php is not one of.

Try php-cgi instead.

adam@pine:/media/Build/next/build$ bitbake -e php | grep ^FILES_
FILES_SOLIBSDEV="/lib/lib*.so /usr/lib/lib*.so"
FILES_php-bin="/usr/bin/* /usr/sbin/*"
FILES_php-cgi="/usr/bin/php-cgi"
FILES_php-doc="/usr/share/doc /usr/share/man /usr/share/info /usr/share/gtk-doc /usr/share/gnome/help /usr/lib/php/doc"
FILES_php-staticdev="/usr/lib/*.a /lib/*.a /usr/lib/php/*.a"
FILES_php-fpm-apache2="/etc/apache2/conf.d/php-fpm.conf"
FILES_php="/usr/lib/php /usr/bin"
FILES_php-dbg="/usr/bin/.debug /usr/bin/.debug /usr/sbin/.debug /usr/lib/php/.debug /usr/lib/.debug /bin/.debug /sbin/.debug /lib/.debug /usr/lib/php/.debug /usr/lib/matchbox-panel/.debug /usr/lib/php/php/.debug /usr/src/debug"
FILES_php-pear="/usr/bin/pear* /usr/bin/pecl /usr/lib/php/PEAR                 /usr/lib/php/PEAR.php /usr/lib/php/System.php                 /usr/libphp/peclcmd.php /usr/lib/php/pearcmd.php                 /usr/lib/php/.channels  /usr/lib/php/.channels/.alias                  /usr/lib/php/.channels\__uri.reg                 /usr/lib/php/.channels\pear.php.net.reg                 /usr/lib/php/.channels/pecl.php.net.reg                 /usr/lib/php/.registry /usr/lib/php/Archive/Tar.php                 /usr/lib/php/Console/Getopt.php /usr/lib/php/OS/Guess.php                 /etc/pear.conf"
FILES_php-dev="/usr/include/php /usr/lib/build /usr/bin/phpize                 /usr/bin/php-config /usr/lib/php/.depdb                 /usr/lib/php/.depdblock /usr/lib/php/.filemap                 /usr/lib/php/.lock /usr/lib/php/test"
FILES_php-cli="/usr/bin/php"
FILES_php-fpm="/usr/sbin/php-fpm /etc/php-fpm.conf /usr/share/fpm /etc/init.d/php-fpm"
FILES_php-locale="/usr/share/locale"
17twenty commented 9 years ago

That seems to solve the issue. I'm surprised it's packaged in that way as foo and foo-bin are often equivalent. Esp as it built a php binary and failed quite late.

adam-lee commented 9 years ago

@17twenty I agree. Perhaps we need to get into the habit of checking with the recipe

17twenty commented 9 years ago

One of the guys on #yocto mentioned that he could bitbake php directly which didn't help resolve the confusion.

adam-lee commented 9 years ago

he probably meant bitbake php. That works, but it only build packages.

17twenty commented 9 years ago

This issue has actually manifested again as a weird issue on the populate_sdk task:

...
warning: Can't install php-dev-5.4.36-r0.0@cortexa8hf_vfp_neon: Can't install php-5.4.36-r0.0@cortexa8hf_vfp_neon: no package provides /home/nick/yocto-build/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/image/usr/bin/php
error: php-5.4.36-r0.0 requires /home/nick/yocto-build/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/image/usr/bin/php

ERROR: Function failed: do_populate_sdk
ERROR: Logfile of failure stored in: /home/nick/yocto-build/build/tmp/work/overo-poky-linux-gnueabi/gumstix-console-image/1.0-r0/temp/log.do_populate_sdk.9548
ERROR: Task 9 (/home/nick/yocto-build/poky/meta-gumstix-extras/recipes-images/gumstix/gumstix-console-image.bb, do_populate_sdk) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3755 tasks of which 3754 didn't need to be rerun and 1 failed.
adam-lee commented 9 years ago

I see php-cli package providing /usr/bin/php. Can you try including php-cli in your image?

/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/packages-split$ ls
php      php-cgi.shlibdeps  php-cli.shlibdeps  php-dev  php-fpm          php-fpm.shlibdeps  php-staticdev
php-cgi  php-cli            php-dbg            php-doc  php-fpm-apache2  php-pear

/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/packages-split$ tree php-cli
php-cli
└── usr
    └── bin
        └── php
17twenty commented 9 years ago

Tried it...

ERROR: Unable to install packages. Command '/home/nick/yocto-build/build/tmp/sysroots/i686-linux/usr/bin/smart --quiet --data-dir=/home/nick/yocto-build/build/tmp/work/overo-poky-linux-gnueabi/gumstix-console-image/1.0-r0/sdk/image/opt/poky/1.7.1/sysroots/cortexa8hf-vfp-neon-poky-linux-gnueabi/var/lib/smart install -y alsa-utils@cortexa8hf_vfp_neon psplash@cortexa8hf_vfp_neon mtdev@cortexa8hf_vfp_neon tar@cortexa8hf_vfp_neon less@cortexa8hf_vfp_neon lighttpd@cortexa8hf_vfp_neon libxml2@cortexa8hf_vfp_neon mtd-utils-ubifs@cortexa8hf_vfp_neon sudo@cortexa8hf_vfp_neon uim@cortexa8hf_vfp_neon iw@cortexa8hf_vfp_neon vim@cortexa8hf_vfp_neon xz@cortexa8hf_vfp_neon media-ctl@cortexa8hf_vfp_neon linux-firmware-wl18xx@all ppp@cortexa8hf_vfp_neon findutils@cortexa8hf_vfp_neon dhcp-server@cortexa8hf_vfp_neon curl@cortexa8hf_vfp_neon rpm@cortexa8hf_vfp_neon cpufrequtils@cortexa8hf_vfp_neon packagegroup-cli-tools@all packagegroup-core-standalone-sdk-target-dbg@all v4l-utils@cortexa8hf_vfp_neon nano@cortexa8hf_vfp_neon php-cgi@cortexa8hf_vfp_neon smartpm@cortexa8hf_vfp_neon yavta@cortexa8hf_vfp_neon tzdata@all coreutils@cortexa8hf_vfp_neon lighttpd-module-staticfile@cortexa8hf_vfp_neon iputils@cortexa8hf_vfp_neon systemd-analyze@cortexa8hf_vfp_neon packagegroup-core-boot@overo memtester@cortexa8hf_vfp_neon iptables@cortexa8hf_vfp_neon libts-1.0-0@cortexa8hf_vfp_neon php-cli@cortexa8hf_vfp_neon packagegroup-core-ssh-openssh@all ntp@cortexa8hf_vfp_neon packagegroup-cli-tools-debug@all lighttpd-module-fastcgi@cortexa8hf_vfp_neon linux-firmware-sd8787@all gpsd@cortexa8hf_vfp_neon raw2rgbpnm@cortexa8hf_vfp_neon lighttpd-module-access@cortexa8hf_vfp_neon wget@cortexa8hf_vfp_neon shadow@cortexa8hf_vfp_neon ti-wifi-utils@cortexa8hf_vfp_neon packagegroup-core-standalone-sdk-target@all grep@cortexa8hf_vfp_neon zip@cortexa8hf_vfp_neon lighttpd-module-dirlisting@cortexa8hf_vfp_neon hostapd@cortexa8hf_vfp_neon diffutils@cortexa8hf_vfp_neon lighttpd-module-indexfile@cortexa8hf_vfp_neon linux-firmware-sd8686@all hello-mod@overo gzip@cortexa8hf_vfp_neon packagegroup-base-extended@overo u-boot-mkimage@cortexa8hf_vfp_neon base-passwd@cortexa8hf_vfp_neon lighttpd-module-accesslog@cortexa8hf_vfp_neon' returned 1:
error: Can't install php-5.4.36-r0.0@cortexa8hf_vfp_neon: no package provides /home/nick/yocto-build/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/image/usr/bin/php

ERROR: Function failed: do_populate_sdk
ERROR: Logfile of failure stored in: /home/nick/yocto-build/build/tmp/work/overo-poky-linux-gnueabi/gumstix-console-image/1.0-r0/temp/log.do_populate_sdk.15028
ERROR: Task 9 (/home/nick/yocto-build/poky/meta-gumstix-extras/recipes-images/gumstix/gumstix-console-image.bb, do_populate_sdk) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3755 tasks of which 3754 didn't need to be rerun and 1 failed.

This is very similar to the original issue where using 'php-cgi' fixed it. Is there some broken dependencies for the main php bin?

17twenty commented 9 years ago
CORE_IMAGE_EXTRA_INSTALL += "xz lighttpd ppp lighttpd-module-fastcgi hello-mod lighttpd-module-accesslog lighttpd-module-access libxml2 lighttpd-module-indexfile lighttpd-module-staticfile lighttpd-module-dirlisting dhcp-server iptables php-cgi php-cli"

That's the current failing populate_sdk but without php-cli the rootfs at least builds. Definitely a bit odd.

adam-lee commented 9 years ago

@17twenty I ran bitbake gumstix-console-image -c populate_sdk and fails the same way. I see php as the runtime dependency (RDEPENDS) of php-cgi and php-cli in the recipe.

Now neither of php-cgi and php-cli depend on each other. So including php-cli just because it contains the php binary does not seem to provide the file to php-cgi. In other words, I think php-cgi fails because its dependency php package does not provide the file /usr/bin/php.

If I add this line FILES_${PN} += "${bindir}/php" to the recipe, I can successfully run bitbake gusmtix-console-image -c populate_sdk, and see the sdk manifest containing php. The recipe does contain the line FILES_${PN} += "${bindir}/", but I think this does not include files within it.

I'm not sure if it's the right solution however. What do you think?

17twenty commented 9 years ago

I'm not entirely sure - might be a job for the guys on #openembedded or #yocto as it looks like a bug. Shouldn't need a workaround I dont think as it should be consistent behaviour between bitbake gumstix-console-image and bitbake gumstix-console-image -c populate_sdk as it should just setup the same sysroot for the toolchain etc. Really odd :worried:

adam-lee commented 9 years ago

@17twenty Ok, when I do bitbake php with no change to the recipe, I get a QA error saying this:

WARNING: QA Issue: php requires /media/Build/master/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/image/usr/bin/php, but no providers in its RDEPENDS [file-rdeps]

And this seems to be the culprit of our problem. Usually this type of error does not show the full path of the host machine. It usually complains like this I believe:

WARNING: QA Issue: cluster-glue requires /usr/bin/perl, but no providers in its RDEPENDS [file-rdeps]

I think somewhere in the make or config file there is a reference to the sysroot, and it should be removed.

adam-lee commented 9 years ago

Indeed, there are references to sysroot in in these package files:

root@pine:/media/Build/master/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/packages-split# grep media/Build/master/build/tmp/sysroots/x86_64-linux -r .

./php-pear/usr/bin/pear:  if test "/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" = '@'php_bin'@'; then
./php-pear/usr/bin/pear:    PHP="/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php"
./php-pear/usr/bin/peardev:  if test "/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" = '@'php_bin'@'; then
./php-pear/usr/bin/peardev:    PHP="/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php"
./php-pear/usr/bin/pecl:  if test "/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" = '@'php_bin'@'; then
./php-pear/usr/bin/pecl:    PHP="/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php"
root@pine:/media/Build/master/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/packages-split# 

I don't know how to fix this, so I will let upstream devs know.

adam-lee commented 9 years ago

@17twenty It looks like it is fixed in the master branch [1]. It has not been back ported to Dizzy branch however. You can try applying the patch yourself.

[1] http://lists.openembedded.org/pipermail/openembedded-devel/2015-March/100836.html

ashcharles commented 9 years ago

I'm jumping in late to the discussion but wanted to clarify/add some notes:

[1] https://github.com/gumstix/meta-gumstix-extras/commit/6346c8bf9bc7d71c36b51b32f78c519f1f9783e8 [2] https://buildbot.gumstix.com/builders/yocto-overo-dev [3] http://lists.openembedded.org/pipermail/openembedded-commits/2015-January/170064.html [4] https://github.com/gumstix/meta-gumstix-extras/commit/bc10fc0904c986458826a99f93c0b300b67bcd09 [5] http://lists.openembedded.org/pipermail/openembedded-devel/2015-March/100836.html

On Fri, Mar 20, 2015 at 1:19 PM, Adam Lee notifications@github.com wrote:

Indeed, there are references to sysroot in in these package files:

root@pine:/media/Build/master/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/packages-split# grep media/Build/master/build/tmp/sysroots/x86_64-linux -r .

./php-pear/usr/bin/pear: if test "/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" = '@'php_bin'@'; then ./php-pear/usr/bin/pear: PHP="/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" ./php-pear/usr/bin/peardev: if test "/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" = '@'php_bin'@'; then ./php-pear/usr/bin/peardev: PHP="/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" ./php-pear/usr/bin/pecl: if test "/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" = '@'php_bin'@'; then ./php-pear/usr/bin/pecl: PHP="/media/Build/master/build/tmp/sysroots/x86_64-linux/usr/bin/php" root@pine:/media/Build/master/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/php/5.4.36-r0/packages-split#

I don't know how to fix this, so I will let upstream devs know.

— Reply to this email directly or view it on GitHub https://github.com/gumstix/Gumstix-YoctoProject-Repo/issues/59#issuecomment-84134227 .