Build fails when using populate_sdk due to chown operation not permitted

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Build fails when using populate_sdk due to chown operation not permitted

跳至解决方案
1,278 次查看
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)

标签 (1)
0 项奖励
1 解答
1,268 次查看
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?

在原帖中查看解决方案

1 回复
1,269 次查看
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?