Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bear caused yocto bitbake build failed #293

Closed
xudongr opened this issue Sep 7, 2020 · 7 comments
Closed

bear caused yocto bitbake build failed #293

xudongr opened this issue Sep 7, 2020 · 7 comments
Labels
Milestone

Comments

@xudongr
Copy link

xudongr commented Sep 7, 2020

$ ~/work/bear2/build/bear/bear -l ~/work/bear2/build/libear/libear.so bitbake zlib
Loading cache: 100% |##############################################################################################################################################################################| Time: 0:00:00
Loaded 1312 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal-4.8"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "qemux86-64"
DISTRO = "poky"
DISTRO_VERSION = "3.1.2"
TUNE_FEATURES = "m64 core2"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "my-yocto-3.1.2:569b1f5d67c57de957e243997c53ec2f81dc8dfe"

Initialising tasks: 100% |#########################################################################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 150 Found 143 Missed 7 Current 0 (95% match, 0% complete)
NOTE: Executing Tasks
ERROR: zlib-1.2.11-r0 do_install_ptest_base: Execution of '/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/temp/run.do_install_ptest_base.14195' failed with exit code 1:
chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest/examplesh’: Operation not permitted
chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest/run-ptest’: Operation not permitted
chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest’: Operation not permitted
WARNING: /home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/temp/run.do_install_ptest_base.14195:1 exit 1 from 'chown -R root:root /home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest'

ERROR: Logfile of failure stored in: /home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/temp/log.do_install_ptest_base.14195
Log data follows:
| DEBUG: Executing shell function do_install_ptest_base
| chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest/examplesh’: Operation not permitted
| chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest/run-ptest’: Operation not permitted
| chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest’: Operation not permitted
| WARNING: /home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/temp/run.do_install_ptest_base.14195:1 exit 1 from 'chown -R root:root /home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest'
| ERROR: Execution of '/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/temp/run.do_install_ptest_base.14195' failed with exit code 1:
| chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest/examplesh’: Operation not permitted
| chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest/run-ptest’: Operation not permitted
| chown: changing ownership of ‘/home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest’: Operation not permitted
| WARNING: /home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/temp/run.do_install_ptest_base.14195:1 exit 1 from 'chown -R root:root /home/user01/work/poky/build/tmp/work/core2-64-poky-linux/zlib/1.2.11-r0/image/usr/lib/zlib/ptest'
|
ERROR: Task (/home/user01/work/poky/meta/recipes-core/zlib/zlib_1.2.11.bb:do_install_ptest_base) failed with exit code '1'
NOTE: Tasks Summary: Attempted 582 tasks of which 570 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/user01/work/poky/meta/recipes-core/zlib/zlib_1.2.11.bb:do_install_ptest_base
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

To Reproduce
$ git clone git://git.yoctoproject.org/poky
$ cd poky
$ git checkout tags/yocto-3.1.2 -b my-yocto-3.1.2
$ ./scripts/install-buildtools
$ source buildtools/environment-setup-x86_64-pokysdk-linux
$ source oe-init-build-env
$ bear -l /path/to/libear.so bitbake zlib

Expected behavior
$ bitbake zlib
Loading cache: 100% |##############################################################################################################################################################################| Time: 0:00:00
Loaded 1312 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal-4.8"
TARGET_SYS = "x86_64-poky-linux"
MACHINE = "qemux86-64"
DISTRO = "poky"
DISTRO_VERSION = "3.1.2"
TUNE_FEATURES = "m64 core2"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "my-yocto-3.1.2:569b1f5d67c57de957e243997c53ec2f81dc8dfe"

Initialising tasks: 100% |#########################################################################################################################################################################| Time: 0:00:00
Sstate summary: Wanted 150 Found 146 Missed 4 Current 0 (97% match, 0% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 588 tasks of which 573 didn't need to be rerun and all succeeded.

Environment:

  • OS name: Linux
  • OS version: CentOS 7.6
  • OS architecture: x86_64
  • Bear version: 2.4.2 HEAD(2a459c3)
  • Bear install method: build from source
@xudongr xudongr closed this as completed Sep 7, 2020
@xudongr xudongr reopened this Sep 7, 2020
@rizsotto
Copy link
Owner

rizsotto commented Sep 7, 2020

Thanks for the report @xudongr .

It looks like it fails at the install step, right? Is the tool using fakeroot for doing this step? (Fakeroot and Bear are both using LD_PRELOAD on linux, and it's not yet supported by Bear to respect other tools. I am aware of that problem and will be fixed in the next version.)

@xudongr
Copy link
Author

xudongr commented Sep 8, 2020

yes, yocto used 'pseudo', https://www.yoctoproject.org/software-item/pseudo/

@rizsotto rizsotto added this to the 3.0 milestone Sep 8, 2020
@rizsotto rizsotto added the bug label Sep 8, 2020
@rizsotto
Copy link
Owner

Hey @xudongr , there is a release candidate on master branch now, which suppose to fix this issue. Could you give it a try for that?

I'm closing this ticket now, but will re-open if the bug still there.

@hac425xxx
Copy link

Hello, I want apply this patch to bear 2.4 , which is the commit to fix this issue? @rizsotto

@hac425xxx
Copy link

hac425xxx commented Jan 3, 2023

I also try to use bear 3.0.20 , but error occur .

wrapper: failed with: gRPC call failed: failed to connect to all addresses; last error: UNKNOWN: Network is unreachable

I also try follow method, but not work

export no_proxy=localhost,127.0.0.1
export GRPC_DNS_RESOLVER=native

unset https_proxy;unset http_proxy

@rizsotto
Copy link
Owner

rizsotto commented Jan 3, 2023

Hi @hac425xxx , could you open a new issue and provide context what you are trying to achieve and how it fails. Please use the issue template to capture the relevant details to help me to reproduce the error you got.

@hac425xxx
Copy link

#498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants