Build fails when using populate_sdk due to chown operation not permitted

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

Build fails when using populate_sdk due to chown operation not permitted

Jump to solution
1,262 Views
mgoodner
Contributor II

I have been able to build the imx-image-core using the configuration below. When I try to populate the sdk the build fails in the last stages due to an operation not permitted on a chown command. What can I do so I can create the SDK? Bitbake shouldn't be run as root should it?

Logs attached.

Config:

DISTRO=fsl-imx-xwayland MACHINE=imx7ulpevk source imx-setup-release.sh -b build-xwayland

Works:

bitbake imx-image-core

Fails:

bitbake imx-image-core -c populate_sdk

Error at end of log (attached):

W: chown to _apt:root of directory /home/robotdad/imx-yocto-bsp/build-xwayland/tmp/work/imx7ulpevk-poky-linux-gnueabi/imx-image-core/1.0-r0/recipe-sysroot-native/var/cache/apt/archives/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
W: chown to root:adm of file /home/robotdad/imx-yocto-bsp/build-xwayland/tmp/work/imx7ulpevk-poky-linux-gnueabi/imx-image-core/1.0-r0/recipe-sysroot-native/var/log/apt/term.log failed - OpenLog (1: Operation not permitted)
E: Sub-process dpkg returned an error code (1)

Labels (1)
0 Kudos
1 Solution
1,252 Views
mgoodner
Contributor II

Searching the forums for nativesdk-shadow which seems to be at the first error point in my logs I found some posts by @weidong_sun about issues with populate_sdk. The guidance was to comment out  PACKAGE_CLASSES = "package_deb" in local.conf. I did so, as well as EXTRA_IMAGE_FEATURES += "package-management", and that did the trick. I can now generate the sdk.

Does this mean that you should prepare an os image in one pass with package management enabled, save that image, then generate the SDK in another pass? Or should you just not use package management at all?

View solution in original post

1 Reply
1,253 Views
mgoodner
Contributor II

Searching the forums for nativesdk-shadow which seems to be at the first error point in my logs I found some posts by @weidong_sun about issues with populate_sdk. The guidance was to comment out  PACKAGE_CLASSES = "package_deb" in local.conf. I did so, as well as EXTRA_IMAGE_FEATURES += "package-management", and that did the trick. I can now generate the sdk.

Does this mean that you should prepare an os image in one pass with package management enabled, save that image, then generate the SDK in another pass? Or should you just not use package management at all?