Skip to content

Update the way dockerfiles install pip for python 2.7 and 3.5#25333

Merged
jtattermusch merged 5 commits intogrpc:masterfrom
jtattermusch:python27_pip
Feb 11, 2021
Merged

Update the way dockerfiles install pip for python 2.7 and 3.5#25333
jtattermusch merged 5 commits intogrpc:masterfrom
jtattermusch:python27_pip

Conversation

@jtattermusch
Copy link
Copy Markdown
Contributor

The pip obtained by https://bootstrap.pypa.io/get-pip.py no longer works under python2.7 and python3.5, which makes python dockerfiles fail on rebuild.

  • update the way pip gets installed
  • get rid of no-longer-needed fuzzer docker image (it doesn't seem to be used anywhere).

@jtattermusch jtattermusch added lang/Python release notes: no Indicates if PR should not be in release notes labels Feb 3, 2021
@jtattermusch jtattermusch requested a review from gnossen February 3, 2021 12:24
@jtattermusch
Copy link
Copy Markdown
Contributor Author

@apolcyn owners approval please.

@jtattermusch
Copy link
Copy Markdown
Contributor Author

Explanation for the bazel basic build issue: https://source.cloud.google.com/results/invocations/1e9a4031-9616-4da7-b5a4-3a4c74c133de

It seems that rebuilding the bazel dockerimage, the clang version also gets upgraded from 9.0.0 to 12.0.0 and the new clang version reports some new warnings that get treated as an error:

src/core/lib/iomgr/exec_ctx.cc:61:11: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-const-int-float-conversion]

The old docker image:

docker run -it --rm grpctesting/bazel:2cf9b498c9e7a1969979afa5a28e1d7f7d280c7d clang --version
clang version 9.0.0 (trunk 351477)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

The new bazel docker image:

docker run -it --rm grpctesting/bazel:fc0b8900d4ed32d7e8da071cfa59c8fe80543efd clang --version
clang version 12.0.0 (https://github.com/llvm/llvm-project.git 6de4865545da73687dd6d28d153cd345ed5e7918)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

Easy way to reproduce locally:
bazel build --define=use_strict_warning=true //:grpc_base_c (I have clang 11.0)

@jtattermusch
Copy link
Copy Markdown
Contributor Author

I found this PR that should be solving the implicit conversion warning: #24775

@jtattermusch
Copy link
Copy Markdown
Contributor Author

#24775 was merged, that should fix the bazel basic build issue.

@jtattermusch
Copy link
Copy Markdown
Contributor Author

Now getting this error:

ERROR: /var/local/git/grpc/BUILD:725:16: C++ compilation of rule '//:grpc_base_c' failed (Exit 1): clang failed: error executing command /usr/local/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 66 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox clang failed: error executing command /usr/local/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 66 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
src/core/lib/debug/stats_data.cc:285:5: error: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Werror,-Wstring-concatenation]
    "requested the incoming call",
    ^
src/core/lib/debug/stats_data.cc:284:5: note: place parentheses around the string literal to silence warning
    "How many completion queues were checked looking for a CQ that had "
    ^
1 error generated.
INFO: Elapsed time: 96.561s, Critical Path: 20.96s
INFO: 1053 processes: 193 internal, 860 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

@jtattermusch
Copy link
Copy Markdown
Contributor Author

I pinned the version of gcr.io/oss-fuzz-base/base-builder in the bazel docker image, which has solved the bazel build issue (as clang version is now <12.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang/Python release notes: no Indicates if PR should not be in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants