Skip to contentSkip to conversation

Error from package.bbclass?

poky Paul Barker 2 participants 2 messages Jan 7 – Jan 13 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 13 lines · shawn.adams via lists.yoctoproject.org

I'm getting an error when building core-image-minimal for qemuarm64 using the scarthgap branch on a CentOS 9 VM.

From what I can tell, the error occurs when perform_packagecopy() attempts to copy the linux-libc-headers source files into tmp/work/cortexa57-poky-linux/linux-libc-headers/6.6/package. Line 355 in poky/meta/classes-global/package.bbclass runs two tar commands from Python's subprocess.check_output() which throw an exception. The text of the exception is

Quoted 8 lines

Exception: subprocess.CalledProcessError: Command 'tar --exclude=./sysroot-only -cf - -C /builds/build/qemuarm64/tmp/work/cortexa57-poky-linux/linux-libc-headers/6.6/image -p -S . | tar -xf - -C /builds/build/qemuarm64/tmp/work/cortexa57-poky-linux/linux-libc-headers/6.6/package' returned non-zero exit status 2.

Quoted 8 lines

The second tar command is what fails (the one extracting into the package directory). I have tar 1.34 installed on my VM and have verified that Bitbake uses the same version when it runs.

When I run the tar command manually from a terminal it works fine, so the problem seems to be unique to the Bitbake run-time environment. I have also changed perform_packagecopy() a couple different ways to see if I can get it to work:
* I changed it to use Python's tarfile module to do what the tar command is doing. This avoids running the tar command in a shell via subprocess.check_output() and seems to work.
* I added a shell function to package.bbclass which runs the same tar command and call it via bb.build.exec_func() instead of running the tar command in subprocess.check_output(). This produces the same error. I've attached the full Bitbake log file in case that helps.

Does anyone have ideas about what could be causing this problem? Could it be a problem with software versions installed on my VM?

([email protected] as that's a more relevant list)

This looks like an issue that we're seeing on our autobuilder with the CentOS 9 worker [1].

It also seems similar to RHEL issue "tar --xattrs -xf failure" [2], but that may not be an exact match as I'm unsure if we're using xattrs here without refreshing my memory on the details.

[1]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16117
[2]: https://issues.redhat.com/browse/RHEL-136277

Thanks,

Signature · 1 line
Paul Barker
#2 lore raw

RE: -EXT-Re: [poky] Error from package.bbclass?

Quoted 1 line

([email protected] as that's a more relevant list)

Thank you

Quoted 3 lines

This looks like an issue that we're seeing on our autobuilder with the CentOS 9 worker [1].

[1]: https://bugzilla.yoctoproject.org/show_bug.cgi?id=16117

Thanks for making that connection. I agree, this looks like the same issue.

I downgraded the version of tar installed in my VM from 1.34-9 to 1.34-7 until there is a fix available. Now my Bitbake build works again without modifying the tar command in package.bbclass.