Pytho3-cryptography recipe build in Kirkstone-6.x.y branch failing on do_patch

Team,

We’ve just started experimenting with Kirkstone BSP of TorizonCore.

This port failed to build pytho2-cryptography recipe on do_patch stage. Custom BBAPPEND file is being used under meta-toradex-torizon with PATCH.


ERROR: python3-cryptography-36.0.2-r0 do_patch: Applying patch ‘0001-setup.py-drop-cffi-from-requirements.patch’ on target directory ‘/opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/tmp/work/cortexa53-tdx-linux/python3-cryptography/36.0.2-r0/cryptography-36.0.2’
CmdError(‘quilt --quiltrc /opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/tmp/work/cortexa53-tdx-linux/python3-cryptography/36.0.2-r0/recipe-sysroot-native/etc/quiltrcpush’, 0, 'stdout: Applying patch 0001-setup.py-drop-cffi-from-requirements.patch
patching file pyproject.toml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED – rejects in file pyproject.toml
patching file setup.py
Hunk #1 FAILED at 38.
1 out of 1 hunk FAILED – rejects in file setup.py
Patch 0001-setup.py-drop-cffi-from-requirements.patch does not apply (enforce with -f)

stderr: ')
ERROR: Logfile of failure stored in: /opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/tmp/work/cortexa53-tdx-linux/python3-cryptography/36.0.2-r0/temp/log.do_patch.2973603
ERROR: Task (/opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/conf/…/…/layers/openembedded-core/meta/recipes-devtools/python/python3-cryptography_36.0.2.bb:do_patch) failed with exit code ‘1’

Greetings @dpatel,

Just to clarify, is this an unmodified Kirkstone build of TorizonCore? Or have you made changes of your own?

As far as I can tell none of our Kirkstone builds are showing any errors at the moment. So I’m not sure how you got this build error.

Best Regards,
Jeremias

@jeremias.tx - No change to meta-toradex-torizon layer or any other toradex layers that come default with manifest.

Just to add here, whole build is happening on Ubuntu 22.04 docker container

We have our meta layer that we inherit from meta-toradex-torizon. Using Layer DEPENDS line.

We’ve added TPM layer since we’re using TPM 2.0 Chip on SPI bus.

Content of Conf file,

We might have a conf and classes directory, append to BBPATH

BBPATH .= “:${LAYERDIR}”

We have a recipes directory, add to BBFILES

BBFILES += “${LAYERDIR}/recipes*//.bb ${LAYERDIR}/recipes*//.bbappend”

BBFILE_COLLECTIONS += “meta-uca-public”
BBFILE_PATTERN_meta-uca-public := “^${LAYERDIR}/”
BBFILE_PRIORITY_meta-uca-public = “92”

LAYERDEPENDS_meta-uca-public = “meta-toradex-torizon”
LAYERSERIES_COMPAT_meta-uca-public = “kirkstone”

I’m not able to see this error on our side with just the default layers. As a sanity check could you do a build without your custom meta-layer just to check. Does the issue still happen then?

Best Regards,
Jeremias

I just did fresh build, ONLY Toradex’s as is Torizon Core Menifest file. It is failing for us.

$ bitbake python3-cryptography
Loading cache: 100% |#########################################################################################| Time: 0:00:00
Loaded 4505 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = “2.0.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “aarch64-tdx-linux”
MACHINE = “verdin-imx8mp”
DISTRO = “torizon”
DISTRO_VERSION = “6.0.0-devel-20221101210353+build.0”
TUNE_FEATURES = “aarch64 armv8a crc cortexa53”
TARGET_FPU = “”
meta-toradex-torizon = “HEAD:5df3e2549375dc685d06543f911c7bb78eb01da0”
meta-toradex-distro = “HEAD:095032507d6560ff6bb916982732a2190019b97f”
meta-toradex-bsp-common = “HEAD:0a52bbb4b3759d21848330bac72f1b23ac9d6c7d”
meta-oe
meta-networking
meta-filesystems
meta-python
meta-perl = “HEAD:744a4b6eda88b9a9ca1cf0df6e18be384d9054e3”
meta-virtualization = “HEAD:e11d5b630e6b5626b58b742b80f5bdf277a44168”
meta-updater = “HEAD:03fc4eb32bccc43f6aa386408dad30205efa5b8e”
meta-toradex-nxp = “HEAD:a80de26deaaf94fd735bf00ce724ed568f965b04”
meta-freescale = “HEAD:133d626a0626c61fd66549e555b2883a5e7ca516”
meta-freescale-3rdparty = “HEAD:5977197340c7a7db17fe3e02a4e014ad997565ae”
meta-yocto-bsp
meta-poky = “HEAD:b5cf7a6501d954ac76b18d7ef91376b5a046a522”
meta-security = “HEAD:c79262a30bd385f5dbb009ef8704a1a01644528e”
meta = “HEAD:4781fee6aea9512b7cb390b76e6f9f0a86a5bd11”

Initialising tasks: 100% |####################################################################################| Time: 0:00:04
Sstate summary: Wanted 127 Local 52 Mirrors 0 Missed 75 Current 384 (40% match, 85% complete)
NOTE: Executing Tasks
ERROR: python3-cryptography-36.0.2-r0 do_patch: Applying patch ‘0001-setup.py-drop-cffi-from-requirements.patch’ on target directory ‘/opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/tmp/work/cortexa53-tdx-linux/python3-cryptography/36.0.2-r0/cryptography-36.0.2’
CmdError(‘quilt --quiltrc /opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/tmp/work/cortexa53-tdx-linux/python3-cryptography/36.0.2-r0/recipe-sysroot-native/etc/quiltrc push’, 0, 'stdout: Applying patch 0001-setup.py-drop-cffi-from-requirements.patch
patching file pyproject.toml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED – rejects in file pyproject.toml
patching file setup.py
Hunk #1 FAILED at 38.
1 out of 1 hunk FAILED – rejects in file setup.py
Patch 0001-setup.py-drop-cffi-from-requirements.patch does not apply (enforce with -f)

stderr: ')
ERROR: Logfile of failure stored in: /opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/tmp/work/cortexa53-tdx-linux/python3-cryptography/36.0.2-r0/temp/log.do_patch.257528
ERROR: Task (/opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/conf/…/…/layers/openembedded-core/meta/recipes-devtools/python/python3-cryptography_36.0.2.bb:do_patch) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 1452 tasks of which 1316 didn’t need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 5 seconds

Summary: 1 task failed:
/opt/hachdev/buildsystem/uca-linux/tdx-imx8mp/build/conf/…/…/layers/openembedded-core/meta/recipes-devtools/python/python3-cryptography_36.0.2.bb:do_patch
Summary: There was 1 ERROR message, returning a non-zero exit code.

Ok I think I understand what’s going on now.

As of Kirkstone TorizonCore does not use python3-cryptography in it’s image anymore. We still have the bbappend and patch in our layer, but it’s not used in our image builds. If you need python3-cryptography in your build then you should ignore our patch/bbappend.

Best Regards,
Jeremias

Thank you for confirming the issue. Does toradex plan to patch this recipe or remove it if not used in Kirkstone?

Our team has made a ticket to review this patch in the future. An exact course of action has not been decided yet.

Just to inform you the team has chosen to remove this patch in it’s entirety as seen by this commit here: python3-cryptography: remove patch · toradex/meta-toradex-torizon@69d2d61 · GitHub

Thank you @jeremias.tx . We’ll test it out with latest SHAs from Manifest repo.