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

envoyproxy/envoy-build-centos build is failed #18365

Closed
Alexcei88 opened this issue Oct 1, 2021 · 10 comments
Closed

envoyproxy/envoy-build-centos build is failed #18365

Alexcei88 opened this issue Oct 1, 2021 · 10 comments

Comments

@Alexcei88
Copy link
Contributor

Alexcei88 commented Oct 1, 2021

Some time ago I was successful to build Envoy for centos. I was very happy.

IMAGE_NAME=envoyproxy/envoy-build-centos ./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.release.server_only'

But now I catch follow

Use --sandbox_debug to see verbose messages from the sandbox
/build/tmp/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/sandbox/processwrapper-sandbox/8/execroot/envoy/external/com_googlesource_chromium_v8/wee8 /build/tmp/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/sandbox/processwrapper-sandbox/8/execroot/envoy
ERROR at //testing/gmock/BUILD.gn:11:1: Dependency not allowed.
source_set("gmock") {
^--------------------
The item //testing/gmock:gmock
can not depend on //third_party/googletest:gtest_config
because it is not in //third_party/googletest:gtest_config's visibility list: [
  //third_party/googletest:*
]

Any idea how to fix it? I cannot catch what changes happened.

@Alexcei88 Alexcei88 added bug triage Issue requires triage labels Oct 1, 2021
@phlax
Copy link
Member

phlax commented Oct 1, 2021

Some time ago I was successful to build Envoy for centos. I was very happy.

you shouldnt require the centos build image to build for centos - i would suggest using the ubuntu build image

the centos build image is not properly supported (not sure exactly how that relates to the issue you have)

i have opened a ticket (here envoyproxy/envoy-build-tools#149) to remove the centos build image altogether for the above reason

@phlax phlax added area/build and removed triage Issue requires triage labels Oct 1, 2021
@Alexcei88
Copy link
Contributor Author

Alexcei88 commented Oct 1, 2021

But my target machine where I want to execute envoy is Centos 7.
So, I have problem with GLIBC version. We cannot refuse to build for Centos7.
Before I already built Envoy for Centos7 and all was OK.

@Alexcei88
Copy link
Contributor Author

Alexcei88 commented Oct 1, 2021

I agree that build doesn't take place for zero for centos. But I was able to resolve all problems with build earlier. But for this problem I have no idea.

@phlax
Copy link
Member

phlax commented Oct 1, 2021

So, I have problem with GLIBC version.

i see.

im not sure if the envoy repo itself will support a lesser version of GLIBC any more

also not sure how that relates to the issue you are facing

the one thing i am fairly sure of is that the centos build image is not properly maintained

https://github.com/envoyproxy/envoy-build-tools/commits/main/build_container/Dockerfile-centos

@bartsmykla
Copy link

I faced this issue today, and found out the bug was in v8, and here is the fix: v8/v8@eac21d5

I would love to contribute with PR updating v8 to version with this patched (9.5.164 - 9.6.152). @PiotrSikora as you are the one, who bumped the v8 version, would you be so kind and assist me with advice if I can do it?

@phlax
Copy link
Member

phlax commented Oct 1, 2021

@bartsmykla iiuc the problem/resolution, you probs need to start by looking here

com_googlesource_chromium_v8 = dict(
project_name = "V8",
project_desc = "Google’s open source high-performance JavaScript and WebAssembly engine, written in C++",
project_url = "https://v8.dev",
version = "9.2.230.13",
# This archive was created using https://storage.googleapis.com/envoyproxy-wee8/wee8-archive.sh
# and contains complete checkout of V8 with all dependencies necessary to build wee8.
sha256 = "77b4d6aaabe1dc60bf6bd2523a187d82292c27a2073ec48610dd098e3d4f80ce",
urls = ["https://storage.googleapis.com/envoyproxy-wee8/wee8-{version}.tar.gz"],
use_category = ["dataplane_ext"],
extensions = ["envoy.wasm.runtime.v8"],
release_date = "2021-06-25",
cpe = "cpe:2.3:a:google:v8:*",
),

@bartsmykla
Copy link

yes, I know, and am working on a PR, but my question was mostly if the community is ok with me doing so :-)

@Alexcei88
Copy link
Contributor Author

Alexcei88 commented Oct 1, 2021

Yep, thank you @bartsmykla, but I just rolled back gn to old version(I took 1935) and it seems like envoy will be built. It's in progress while...

@Alexcei88
Copy link
Contributor Author

Alexcei88 commented Oct 1, 2021

Rollback to older version gn inside docker image solved error and I got build for centos7.
I think the issue can be closed.

I made 3 changes inside docker image locally to build envoy:

  • modify PATH according this issue
  • install gn according this issue
  • install libstdc++ library yum install glibc-static libstdc++-static

I think it is not so many issues to fix docker build image.
Since I am very interested to save build envoy for centos7, may be if I will have time I can try to fix docker build image for centos 7.

bartsmykla added a commit to bartsmykla/envoy-build-tools that referenced this issue Oct 5, 2021
- gn has to be compiled to satisfy centos glibc requirements and
  to mitigate problems with the version of envoy's wasm/v8
  dependency (ref: envoyproxy/envoy#15119)
- prependend PATH env var in centos' dockerfile by /usr/local/bin
  which was missing before and which is path where bazel is present
  (ref: envoyproxy/envoy/#12535)
- added installation of glibc-static and libstdc++-static

ref: envoyproxy/envoy#18365

Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla
Copy link

I created a PR with fixes: envoyproxy/envoy-build-tools#154

phlax pushed a commit to envoyproxy/envoy-build-tools that referenced this issue Feb 16, 2022
* fix: script and dockerfile for centos

- gn has to be compiled to satisfy centos glibc requirements and
  to mitigate problems with the version of envoy's wasm/v8
  dependency (ref: envoyproxy/envoy#15119)
- prependend PATH env var in centos' dockerfile by /usr/local/bin
  which was missing before and which is path where bazel is present
  (ref: envoyproxy/envoy/#12535)
- added installation of glibc-static and libstdc++-static

ref: envoyproxy/envoy#18365

Signed-off-by: Bart Smykla <bartek@smykla.com>

* boringssl/fips: move gn building down

as it expects to have llvm+clang installed to compile

Signed-off-by: Bart Smykla <bartek@smykla.com>

* remove unnecessary whitespace changes

Signed-off-by: Bart Smykla <bartek@smykla.com>

* centos: remove unnecessary PATH alteration

it's actually unnecessary as it's already included and the problem
was not with the order, but with PATH not being preserved, when
run `run_envoy_docker.sh` script from envoyproxy/envoy/ci

Signed-off-by: Bart Smykla <bartek@smykla.com>

* move PATH from container to build_container_centos

As the PATH is not preserved from environment in some of the CI
scripts, we have to use it like in ubuntu scripts, which means
to just move the PATH wrom dockerfile to the script

Signed-off-by: Bart Smykla <bartek@smykla.com>

* Revert "move PATH from container to build_container_centos"

This reverts commit 46d091c.

Signed-off-by: Bart Smykla <bartek@smykla.com>

* move centos PATH to /etc/profile.d file

Signed-off-by: Bart Smykla <bartek@smykla.com>

* source profile in build_container_centos.sh

As when building container we also need updated PATH, I'm sourcing
/etc/profile.d/profile_centos.sh at the beginning of the script

Signed-off-by: Bart Smykla <bartek@smykla.com>

* modify path in sudoers

Signed-off-by: Bart Smykla <bartek@smykla.com>

* remove duplication

Signed-off-by: Bart Smykla <bartek@smykla.com>
htuch pushed a commit to envoyproxy/envoy-build-tools that referenced this issue Feb 16, 2022
  [skip ci]
  fix: script and dockerfile for centos (#154)

* fix: script and dockerfile for centos

- gn has to be compiled to satisfy centos glibc requirements and
  to mitigate problems with the version of envoy's wasm/v8
  dependency (ref: envoyproxy/envoy#15119)
- prependend PATH env var in centos' dockerfile by /usr/local/bin
  which was missing before and which is path where bazel is present
  (ref: envoyproxy/envoy/#12535)
- added installation of glibc-static and libstdc++-static

ref: envoyproxy/envoy#18365

Signed-off-by: Bart Smykla <bartek@smykla.com>

* boringssl/fips: move gn building down

as it expects to have llvm+clang installed to compile

Signed-off-by: Bart Smykla <bartek@smykla.com>

* remove unnecessary whitespace changes

Signed-off-by: Bart Smykla <bartek@smykla.com>

* centos: remove unnecessary PATH alteration

it's actually unnecessary as it's already included and the problem
was not with the order, but with PATH not being preserved, when
run `run_envoy_docker.sh` script from envoyproxy/envoy/ci

Signed-off-by: Bart Smykla <bartek@smykla.com>

* move PATH from container to build_container_centos

As the PATH is not preserved from environment in some of the CI
scripts, we have to use it like in ubuntu scripts, which means
to just move the PATH wrom dockerfile to the script

Signed-off-by: Bart Smykla <bartek@smykla.com>

* Revert "move PATH from container to build_container_centos"

This reverts commit 46d091c.

Signed-off-by: Bart Smykla <bartek@smykla.com>

* move centos PATH to /etc/profile.d file

Signed-off-by: Bart Smykla <bartek@smykla.com>

* source profile in build_container_centos.sh

As when building container we also need updated PATH, I'm sourcing
/etc/profile.d/profile_centos.sh at the beginning of the script

Signed-off-by: Bart Smykla <bartek@smykla.com>

* modify path in sudoers

Signed-off-by: Bart Smykla <bartek@smykla.com>

* remove duplication

Signed-off-by: Bart Smykla <bartek@smykla.com>
htuch pushed a commit to envoyproxy/envoy-build-tools that referenced this issue Feb 16, 2022
  [skip ci]
  Regenerate linux toolchains from 3f6b1b0

  [skip ci]
  fix: script and dockerfile for centos (#154)

* fix: script and dockerfile for centos

- gn has to be compiled to satisfy centos glibc requirements and
  to mitigate problems with the version of envoy's wasm/v8
  dependency (ref: envoyproxy/envoy#15119)
- prependend PATH env var in centos' dockerfile by /usr/local/bin
  which was missing before and which is path where bazel is present
  (ref: envoyproxy/envoy/#12535)
- added installation of glibc-static and libstdc++-static

ref: envoyproxy/envoy#18365

Signed-off-by: Bart Smykla <bartek@smykla.com>

* boringssl/fips: move gn building down

as it expects to have llvm+clang installed to compile

Signed-off-by: Bart Smykla <bartek@smykla.com>

* remove unnecessary whitespace changes

Signed-off-by: Bart Smykla <bartek@smykla.com>

* centos: remove unnecessary PATH alteration

it's actually unnecessary as it's already included and the problem
was not with the order, but with PATH not being preserved, when
run `run_envoy_docker.sh` script from envoyproxy/envoy/ci

Signed-off-by: Bart Smykla <bartek@smykla.com>

* move PATH from container to build_container_centos

As the PATH is not preserved from environment in some of the CI
scripts, we have to use it like in ubuntu scripts, which means
to just move the PATH wrom dockerfile to the script

Signed-off-by: Bart Smykla <bartek@smykla.com>

* Revert "move PATH from container to build_container_centos"

This reverts commit 46d091c.

Signed-off-by: Bart Smykla <bartek@smykla.com>

* move centos PATH to /etc/profile.d file

Signed-off-by: Bart Smykla <bartek@smykla.com>

* source profile in build_container_centos.sh

As when building container we also need updated PATH, I'm sourcing
/etc/profile.d/profile_centos.sh at the beginning of the script

Signed-off-by: Bart Smykla <bartek@smykla.com>

* modify path in sudoers

Signed-off-by: Bart Smykla <bartek@smykla.com>

* remove duplication

Signed-off-by: Bart Smykla <bartek@smykla.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants