Build error after changing PACKAGE_CLASSES to package_debERROR: linux-imx-4.14.62-r0 do_package_write_deb: Error executing a python function in exec_python_func() autogenerated:

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Build error after changing PACKAGE_CLASSES to package_debERROR: linux-imx-4.14.62-r0 do_package_write_deb: Error executing a python function in exec_python_func() autogenerated:

1,472 Views
srini_shanmugam
Contributor II

Dear NXP Community experts,

I am seeing the below error after changing the package_classes from "rpm" to "deb" as below, when I am trying to add freescale meta layers to my custom yocto distribution

Could you please do the needful by providing some inputs in resolving the below issue?

Logs:
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |#############################################################################################################################################################################################################################################| Time: 0:00:15
Parsing of 2304 .bb files complete (0 cached, 2304 parsed). 3210 targets, 385 skipped, 6 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.38.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "ubuntu-18.04"
TARGET_SYS = "aarch64-poky-linux"
MACHINE = "imx8mmevk"
DISTRO = "CustomOS"
DISTRO_VERSION = "1.0.8"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta-traktor-imx8 = "master:525bab5e576c2f0f1242cd1e6b546859c856441a"
meta-traktor = "sumo:b91788da6bd52485faa85bb19bc7a9a1ddf2ee5d"
meta-qt5 = "qt-5.11:ff6127ddd318d422f595295d1c189a86b3032873"
meta-customos = "sumo:8a14b16e4049051e29009e67afa63bfac5ddb26e"
meta-freescale = "master:525bab5e576c2f0f1242cd1e6b546859c856441a"
meta
meta-poky = "sumo:623b77885051174d0e05198843e739110977bd18"
meta-oe
meta-python
meta-networking = "sumo:8760facba1bceb299b3613b8955621ddaa3d4c3f"
meta-bsp
meta-sdk = "master:525bab5e576c2f0f1242cd1e6b546859c856441a"

Initialising tasks: 100% |##########################################################################################################################################################################################################################################| Time: 0:00:05
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: linux-imx-4.14.62-r0 do_package_write_deb: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_package_deb(d)
0003:
File: '/home/srinishanmugam/custombuild_test/customos/sources/poky/meta/classes/package_deb.bbclass', lineno: 102, function: do_package_deb
0098:
0099: os.chdir(oldcwd)
0100:
0101: if error:
*** 0102: raise error
0103:}
0104:do_package_deb[vardeps] += "deb_write_pkg"
0105:do_package_deb[vardepsexclude] = "BB_NUMBER_THREADS"
0106:
Exception: subprocess.CalledProcessError: Command 'PATH="/home/srinishanmugam/custombuild_test/customos/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/srinishanmugam/custombuild_test/customos/sources/poky/scripts:/home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/recipe-sysroot/usr/bin/crossscripts:/home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/recipe-sysroot-native/usr/sbin:/home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/recipe-sysroot-native/usr/bin:/home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/recipe-sysroot-native/sbin:/home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/recipe-sysroot-native/bin:/home/srinishanmugam/custombuild_test/customos/sources/poky/bitbake/bin:/home/srinishanmugam/custombuild_test/customos/build/tmp/hosttools" dpkg-deb -b /home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/packages-split/kernel-module-snd-usbmidi-lib-4.14.62-imx_4.14.62_1.0.0_beta+g1907fe4c3287 /home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/deploy-debs/imx8mmevk' returned non-zero exit status 2.

Subprocess output:
dpkg-deb: error: package name has characters that aren't lowercase alphanums or '-+.'

ERROR: linux-imx-4.14.62-r0 do_package_write_deb: Function failed: do_package_deb
ERROR: Logfile of failure stored in: /home/srinishanmugam/custombuild_test/customos/build/tmp/work/imx8mmevk-poky-linux/linux-imx/4.14.62-r0/temp/log.do_package_write_deb.31568
ERROR: Task (/home/srinishanmugam/custombuild_test/customos/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_4.14.62.bb:do_package_write_deb) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3614 tasks of which 3104 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/srinishanmugam/custombuild_test/customos/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_4.14.62.bb:do_package_write_deb

 
Many Thanks in advance
0 Kudos
1 Reply

1,030 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Srinivasan,

package_deb is where the packaging machinery for deb packages is stored, it's not something you'd inherit in a recipe but should be listed in PACKAGE_CLASSES.

When you put a .deb in a SRC_URI the fetcher will try to unpack it so you can access the contents: the assumption is that you're going to repack the contents as a native Yocto recipe.

If that's what you want to do, then first you'll need to fix the unpack logic (in bitbake/lib/bb/fetch2/__init__.py) to handle .debs with xz-compressed data.

The alternative would be to use their deb directly but I don't recommend that as it's likely the dependencies don't match. The best long-term solution would be to build it from source directly instead of attempting to use a package for another distro.

Regards

0 Kudos