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

bazel build requires python2 #8

Closed
vkobel opened this Issue May 2, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@vkobel
Copy link

vkobel commented May 2, 2018

When compiling with bazel build runsc, it assumes that the default python version is 2. When using version 3 one can expect error messages such as bytes-like object is required, not 'str' or CRITICAL:root:VDSO contains relocations: b'\nThere are no relocations in this file.\n'.

Changing default python version to python2 fixes this issue.

@prattmic

This comment has been minimized.

Copy link
Member

prattmic commented May 2, 2018

Oops. We'll make that script work in Python 2 or 3.

@q3k

This comment has been minimized.

Copy link
Contributor

q3k commented May 2, 2018

This is one build error that you get when building against python3:

INFO: Analysed target //runsc:runsc (0 packages loaded).
INFO: Found 1 target...
ERROR: /home/q3k/Software/gvisor/vdso/BUILD:8:1: Executing genrule //vdso:vdso failed (Exit 1)
Traceback (most recent call last):
  File "/home/q3k/.cache/bazel/_bazel_q3k/2a6b2df8cb638e5ef4933f67041a7700/bazel-sandbox/2604803244674486523/execroot/__main__/bazel-out/host/bin/vdso/check_vdso.runfiles/__main__/vdso/check_vdso.py", line 204, in <module>
    main()
  File "/home/q3k/.cache/bazel/_bazel_q3k/2a6b2df8cb638e5ef4933f67041a7700/bazel-sandbox/2604803244674486523/execroot/__main__/bazel-out/host/bin/vdso/check_vdso.runfiles/__main__/vdso/check_vdso.py", line 196, in main
    CheckSegments(args.vdso)
  File "/home/q3k/.cache/bazel/_bazel_q3k/2a6b2df8cb638e5ef4933f67041a7700/bazel-sandbox/2604803244674486523/execroot/__main__/bazel-out/host/bin/vdso/check_vdso.runfiles/__main__/vdso/check_vdso.py", line 69, in CheckSegments
    lines = output.split("\n")
TypeError: a bytes-like object is required, not 'str'
Target //runsc:runsc failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.855s, Critical Path: 0.93s
FAILED: Build did NOT complete successfully

Workaround is, of course, to make python in your $PATH point to a Python 2.7 interpreter.

@qrpike qrpike referenced this issue May 2, 2018

Closed

Issues Building #13

@q3k

This comment has been minimized.

Copy link
Contributor

q3k commented May 2, 2018

https://gvisor-review.googlesource.com/#/c/gvisor/+/1420

Here's a fix to make check_vdso.py run on both py2 and py3.

shentubot added a commit that referenced this issue May 2, 2018

Note that build requires Python 2.7
Updates #8

PiperOrigin-RevId: 195122103

@shentubot shentubot closed this in c400a03 May 3, 2018

maljub01 added a commit to maljub01/gvisor that referenced this issue May 3, 2018

Remove obsolete note on Python 3 support.
Python 3 is now supported, and google#8 is marked as fixed.

shentubot added a commit that referenced this issue May 3, 2018

Python 3.0 is now supported.
Also document that linux is required.

Updates #8

PiperOrigin-RevId: 195317016

chanwit pushed a commit to chanwit/gvisor that referenced this issue May 8, 2018

Note that build requires Python 2.7
Updates google#8

PiperOrigin-RevId: 195122103
Change-Id: Iff190283961b8ab99ad4f3e47ffeb9ab491d0eb3

chanwit pushed a commit to chanwit/gvisor that referenced this issue May 8, 2018

Make check_vdso compatible with Python 2 and 3
This makes gVisor build with `python` set to Python 3.

Fixes google#8

PiperOrigin-RevId: 195216683
Change-Id: I1c8b86ad91a0844f7c3c85839d53f3fcba10813e

chanwit pushed a commit to chanwit/gvisor that referenced this issue May 8, 2018

Python 3.0 is now supported.
Also document that linux is required.

Updates google#8

PiperOrigin-RevId: 195317016
Change-Id: I4c0305a26339f03772001b56e7a0ac4b39a4352a

shentubot added a commit that referenced this issue Jul 3, 2018

runsc/boot/filter: permit SYS_TIME for race
glibc's malloc also uses SYS_TIME. Permit it.

#0  0x0000000000de6267 in time ()
#1  0x0000000000db19d8 in get_nprocs ()
#2  0x0000000000d8a31a in arena_get2.part ()
#3  0x0000000000d8ab4a in malloc ()
#4  0x0000000000d3c6b5 in __sanitizer::InternalAlloc(unsigned long, __sanitizer::SizeClassAllocatorLocalCache<__sanitizer::SizeClassAllocator32<0ul, 140737488355328ull, 0ul, __sanitizer::SizeClassMap<3ul, 4ul, 8ul, 17ul, 64ul, 14ul>, 20ul, __sanitizer::TwoLevelByteMap<32768ull, 4096ull, __sanitizer::NoOpMapUnmapCallback>, __sanitizer::NoOpMapUnmapCallback> >*, unsigned long) ()
#5  0x0000000000d4cd70 in __tsan_go_start ()
#6  0x00000000004617a3 in racecall ()
#7  0x00000000010f4ea0 in runtime.findfunctab ()
#8  0x000000000043f193 in runtime.racegostart ()

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
[mpratt@google.com: updated comments and commit message]
Signed-off-by: Michael Pratt <mpratt@google.com>

Change-Id: Ibe2d0dc3035bf5052d5fb802cfaa37c5e0e7a09a
PiperOrigin-RevId: 203042627

dvyukov added a commit to dvyukov/gvisor that referenced this issue Jul 4, 2018

runsc/boot/filter: permit SYS_TIME for race
glibc's malloc also uses SYS_TIME. Permit it.

#0  0x0000000000de6267 in time ()
google#1  0x0000000000db19d8 in get_nprocs ()
google#2  0x0000000000d8a31a in arena_get2.part ()
google#3  0x0000000000d8ab4a in malloc ()
google#4  0x0000000000d3c6b5 in __sanitizer::InternalAlloc(unsigned long, __sanitizer::SizeClassAllocatorLocalCache<__sanitizer::SizeClassAllocator32<0ul, 140737488355328ull, 0ul, __sanitizer::SizeClassMap<3ul, 4ul, 8ul, 17ul, 64ul, 14ul>, 20ul, __sanitizer::TwoLevelByteMap<32768ull, 4096ull, __sanitizer::NoOpMapUnmapCallback>, __sanitizer::NoOpMapUnmapCallback> >*, unsigned long) ()
google#5  0x0000000000d4cd70 in __tsan_go_start ()
google#6  0x00000000004617a3 in racecall ()
google#7  0x00000000010f4ea0 in runtime.findfunctab ()
google#8  0x000000000043f193 in runtime.racegostart ()

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
[mpratt@google.com: updated comments and commit message]
Signed-off-by: Michael Pratt <mpratt@google.com>

Change-Id: Ibe2d0dc3035bf5052d5fb802cfaa37c5e0e7a09a
PiperOrigin-RevId: 203042627

tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue Jan 29, 2019

Note that build requires Python 2.7
Updates google#8

PiperOrigin-RevId: 195122103
Change-Id: Iff190283961b8ab99ad4f3e47ffeb9ab491d0eb3
Upstream-commit: 6c061ad

tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue Jan 29, 2019

Python 3.0 is now supported.
Also document that linux is required.

Updates google#8

PiperOrigin-RevId: 195317016
Change-Id: I4c0305a26339f03772001b56e7a0ac4b39a4352a
Upstream-commit: 6488f40

tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue Jan 30, 2019

Note that build requires Python 2.7
Updates google#8

PiperOrigin-RevId: 195122103
Change-Id: Iff190283961b8ab99ad4f3e47ffeb9ab491d0eb3
Upstream-commit: 6c061ad

tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue Jan 30, 2019

Make check_vdso compatible with Python 2 and 3
This makes gVisor build with `python` set to Python 3.

Fixes google#8

PiperOrigin-RevId: 195216683
Change-Id: I1c8b86ad91a0844f7c3c85839d53f3fcba10813e
Upstream-commit: 9c665c4

tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue Jan 30, 2019

Python 3.0 is now supported.
Also document that linux is required.

Updates google#8

PiperOrigin-RevId: 195317016
Change-Id: I4c0305a26339f03772001b56e7a0ac4b39a4352a
Upstream-commit: 6488f40

tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue Jan 30, 2019

runsc/boot/filter: permit SYS_TIME for race
glibc's malloc also uses SYS_TIME. Permit it.

#0  0x0000000000de6267 in time ()
#1  0x0000000000db19d8 in get_nprocs ()
#2  0x0000000000d8a31a in arena_get2.part ()
google#3  0x0000000000d8ab4a in malloc ()
google#4  0x0000000000d3c6b5 in __sanitizer::InternalAlloc(unsigned long, __sanitizer::SizeClassAllocatorLocalCache<__sanitizer::SizeClassAllocator32<0ul, 140737488355328ull, 0ul, __sanitizer::SizeClassMap<3ul, 4ul, 8ul, 17ul, 64ul, 14ul>, 20ul, __sanitizer::TwoLevelByteMap<32768ull, 4096ull, __sanitizer::NoOpMapUnmapCallback>, __sanitizer::NoOpMapUnmapCallback> >*, unsigned long) ()
google#5  0x0000000000d4cd70 in __tsan_go_start ()
google#6  0x00000000004617a3 in racecall ()
google#7  0x00000000010f4ea0 in runtime.findfunctab ()
google#8  0x000000000043f193 in runtime.racegostart ()

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
[mpratt@google.com: updated comments and commit message]
Signed-off-by: Michael Pratt <mpratt@google.com>

Change-Id: Ibe2d0dc3035bf5052d5fb802cfaa37c5e0e7a09a
PiperOrigin-RevId: 203042627
Upstream-commit: 6144751
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.