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

IMAGE_NAME=envoyproxy/envoy-build-centos failed for incorrect $PATH #12535

Closed
cz-theng opened this issue Aug 7, 2020 · 6 comments
Closed

IMAGE_NAME=envoyproxy/envoy-build-centos failed for incorrect $PATH #12535

cz-theng opened this issue Aug 7, 2020 · 6 comments
Labels
area/build stale stalebot believes this issue/PR has not been touched recently

Comments

@cz-theng
Copy link

cz-theng commented Aug 7, 2020

Description:

When I followed Developer use of CI Docker images and set IMAGE_NAME to
"envoyproxy/envoy-build-centos", then got error message:

No remote cache is set, skipping setup remote cache.
ENVOY_SRCDIR=/source
ENVOY_BUILD_TARGET=//source/exe:envoy-static
./ci/../bazel/setup_clang.sh: line 3: bazel: command not found
./ci/build_setup.sh: line 119: bazel: command not found
Skip setting up Envoy Filter Example.
building using 8 CPUs
clang toolchain with libc++ configured
bazel debug build...
Building...
./ci/do_ci.sh: line 92: bazel: command not found

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

Repro steps:

Checkout envoy with master branch . Go to the envoy directory and use command

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

Admin and Stats Output:

No remote cache is set, skipping setup remote cache.
ENVOY_SRCDIR=/source
ENVOY_BUILD_TARGET=//source/exe:envoy-static
./ci/../bazel/setup_clang.sh: line 3: bazel: command not found
./ci/build_setup.sh: line 119: bazel: command not found
Skip setting up Envoy Filter Example.
building using 8 CPUs
clang toolchain with libc++ configured
bazel debug build...
Building...
./ci/do_ci.sh: line 92: bazel: command not found

Discuss:

It is obvious that bazel is no in $PATH, so I try this:

--- a/ci/do_ci.sh
+++ b/ci/do_ci.sh
@@ -83,6 +84,8 @@ function bazel_binary_build() {
   fi
 
   echo "Building..."
+  echo "PATH:" $PATH
+  which bazel

add this to ci/do_ci.sh, and got :

Building...
PATH: /opt/llvm/bin:/sbin:/bin:/usr/sbin:/usr/bin
which: no bazel in (/opt/llvm/bin:/sbin:/bin:/usr/sbin:/usr/bin)

and then I try this:

[root@VM-88-169-centos /data/cz/envoy]# docker run -it 806aa54f4400 /bin/bash
[root@66d20b8517dd /]# which bazel
/usr/local/bin/bazel

806aa54f4400 is my "envoyproxy/envoy-build-centos"'s IMAGE ID. so bazel is in /usr/local/bin/.

To resolve the problem, I add :

export PATH=$PATH:/usr/local/bin

to ci/build_setup.sh:

--- a/ci/build_setup.sh
+++ b/ci/build_setup.sh
@@ -55,6 +55,7 @@ fi
 # Environment setup.
 export TEST_TMPDIR=${BUILD_DIR}/tmp
 export PATH=/opt/llvm/bin:${PATH}
+export PATH=$PATH:/usr/local/bin

But this time I got :

No remote cache is set, skipping setup remote cache.
ENVOY_SRCDIR=/source
ENVOY_BUILD_TARGET=//source/exe:envoy-static
$TEST_TMPDIR defined: output root default is '/build/tmp' and max_idle_secs default is '15'.
Starting local Bazel server and connecting to it...
WARNING: Blaze info does not support starlark options. Ignoring options: [--@com_googlesource_googleurl//build_config:system_icu=0]
$TEST_TMPDIR defined: output root default is '/build/tmp' and max_idle_secs default is '15'.
WARNING: Blaze info does not support starlark options. Ignoring options: [--@com_googlesource_googleurl//build_config:system_icu=0]
./ci/filter_example_setup.sh: line 18: git: command not found

Again, it is "git":

[root@VM-88-169-centos /data/cz/envoy]# docker run -it 806aa54f4400 /bin/bash
[root@88208c4d35ba /]# which git
/opt/rh/rh-git218/root/usr/bin/git

Then modify ci/build_setup.sh again:

--- a/ci/build_setup.sh
+++ b/ci/build_setup.sh
@@ -55,6 +55,7 @@ fi
 # Environment setup.
 export TEST_TMPDIR=${BUILD_DIR}/tmp
 export PATH=/opt/llvm/bin:${PATH}
+export PATH=$PATH:/usr/local/bin:/opt/rh/rh-git218/root/usr/bin

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

Success!!!
Then I got the compiled envoy binary.

@dio dio added the area/build label Aug 7, 2020
@stale
Copy link

stale bot commented Sep 7, 2020

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 7, 2020
@stale
Copy link

stale bot commented Sep 14, 2020

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@stale stale bot closed this as completed Sep 14, 2020
@atali
Copy link

atali commented Sep 15, 2021

I still got the same issue. Is there any chance to fix the PATH for Centos ?

@phlax
Copy link
Member

phlax commented Sep 15, 2021

the centos build image is not currently very well maintained (my view is that we should probs just drop it as its not tested anywhere)

is there a reason for using the centos build image over the ubuntu one ?

@atali
Copy link

atali commented Sep 16, 2021

The target machine where I want to execute envoy is Centos 7.
I tried to extract the Envoy built by ubuntu but I got the following issue:
./envoy --version ./envoy: /lib64/libc.so.6: versionGLIBC_2.18' not found (required by ./envoy)`

So I suppose I need a statically compiled version of Envoy, do you have any idea how I can get it ?

@phlax
Copy link
Member

phlax commented Sep 16, 2021

i think the statically compiled versions still have a glibc dependency

you may find one of the older versions of Envoy supports a lower version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

4 participants