It looks like the pkg_resource module is using the native installation


I cloned poky early september, and could complete a build.

When I clone poky today, the build fails.

As part of "do_image_wic" from image_types_wic.bbclass

A python program in 'bmap-tools-native' is executing

        "from pkg_resources import load_entry_point"

grep'ing for pkg_resources in bmap-tools-native reveals:

bmaptool:               from pkg_resources import load_entry_point
easy3_install:          from pkg_resources import load_entry_point
easy_install-3.5:       from pkg_resources import load_entry_point
=============================
pkg_resources.py is not available inside poky at the moment.

It is (or used to be) part of python-setuptools.

On Ubuntu, it is present in: "http://archive.ubuntu.com/ubuntu/pool/main/p/python-setuptools/python-setuptools_3.3.orig.tar.gz";
and used in Ubuntu 14.04 and 16.04 to generate the
        "python3-pkg-resource" package.

When python-setuptools is generated by Yocto, it is partly
a class, but the python-setuptools-native recipe downloads
        
"https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-26.2.7.zip";
which does not contain "pkg_resources.py"

=============================
When bmaptool imports pkg_resources, it will not find anything in the
yocto build, but will find the native "/usr/lib/python3/dist-packages/pkg_resources.py" from

This requires bmap-tools == 3.4, but the native bmap-tools in Ubuntu-14.04 is 2.5, and in Ubuntu-16.04 it is 3.2 so the build fails.

Maybe Ubuntu-17.04 supports bmap-tools 3.4 and it will build there,
but using the native pkg_resource is of course not a good idea?

Upgrading to a non-LTS Ubuntu is not something I would like to do...
============================================================================================

Error report

============================================================================================

| DEBUG: Executing shell function do_image_wic
| wic create "/home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/../meta-emagii/wic/emagii_beaglebone.wks" --vars "/home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/sysroots/beaglebone/imgdata/" -e "emagii-image" -o "/home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/deploy-emagii-image-image-complete/emagii-image-beaglebone-20170929070314/"
| INFO: Creating image(s)...
|
| INFO: The new image(s) can be found here:
| /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/deploy-emagii-image-image-complete/emagii-image-beaglebone-20170929070314/emagii_beaglebone-201709290903-mmcblk.direct
|
| The following build artifacts were used to create the image(s):
| ROOTFS_DIR: /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/deploy-emagii-image-image-complete/emagii-image-beaglebone-20170929070314/tmp.wic.slysr_64/rootfs_copy | BOOTIMG_DIR: /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/recipe-sysroot/usr/share | KERNEL_DIR: /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/deploy/images/beaglebone | NATIVE_SYSROOT: /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/recipe-sysroot-native
|
| INFO: The image(s) were created using OE kickstart file:
| /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/../meta-emagii/wic/emagii_beaglebone.wks
| Traceback (most recent call last):
| File "/home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/recipe-sysroot-native/usr/bin/bmaptool", line 6, in <module>
|     from pkg_resources import load_entry_point
| File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2749, in <module>
|     working_set = WorkingSet._build_master()
| File "/usr/lib/python3/dist-packages/pkg_resources.py", line 444, in _build_master
|     ws.require(__requires__)
| File "/usr/lib/python3/dist-packages/pkg_resources.py", line 725, in require
|     needed = self.resolve(parse_requirements(requirements))
| File "/usr/lib/python3/dist-packages/pkg_resources.py", line 628, in resolve
|     raise DistributionNotFound(req)
| pkg_resources.DistributionNotFound: bmap-tools==3.4
| WARNING: /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/temp/run.do_image_wic.19342:1 exit 1 from 'bmaptool create emagii-image-beaglebone-20170929070314.rootfs.wic -o emagii-image-beaglebone-20170929070314.rootfs.wic.bmap' | ERROR: Function failed: do_image_wic (log file is located at /home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/tmp/work/beaglebone-poky-linux-gnueabi/emagii-image/1.0-r0/temp/log.do_image_wic.19342) ERROR: Task (/home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/../meta-emagii/recipes-images/images/emagii-image.bb:do_image_wic) failed with exit code '1' NOTE: Tasks Summary: Attempted 3187 tasks of which 3186 didn't need to be rerun and 1 failed.

Summary: 1 task failed:

/home/ulf/Kunder/eMagii/Disk/yocto-arm/poky-arm/build/../meta-emagii/recipes-images/images/emagii-image.bb:do_image_wic
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.



Best Regards
Ulf Samuelsson
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to