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

building failed,by guide of readme #525

Open
ggjjlldd opened this issue Sep 11, 2020 · 1 comment
Open

building failed,by guide of readme #525

ggjjlldd opened this issue Sep 11, 2020 · 1 comment

Comments

@ggjjlldd
Copy link

building failed,by guide of readme,use command, bazel build -c opt //:nighthawk

environment: centos 8

[root@sundl-hs nighthawk]# bazel build -c opt //:nighthawk
WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE.
WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE.
DEBUG: /root/.cache/bazel/_bazel_root/1244163c7aa16348645f91fe359f2a31/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:118:10: 
Auto-Configuration Warning: CC with -fuse-ld=gold returned 0, but its -v output didn't contain 'gold', falling back to the default linker.
INFO: Analyzed target //:nighthawk (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /root/.cache/bazel/_bazel_root/1244163c7aa16348645f91fe359f2a31/external/envoy/bazel/foreign_cc/BUILD:82:21: error executing shell command: '/bin/bash -c #!/usr/bin/env bash
function cleanup_function() {
local ecode=$?
if [ $ecode -eq 0 ]; then
cleanup_on_success
else
cleanup_on_failure
fi
}
set -e
function cleanup_on_success() {
printf...' failed (Exit 1) bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox

rules_foreign_cc: Build failed!
rules_foreign_cc: Keeping temp build directory  and dependencies directory  for debug.
rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify '--sandbox_debug' Bazel command line flag.

rules_foreign_cc: Printing build logs:

_____ BEGIN BUILD LOGS _____
Bazel external C/C++ Rules #0.0.8. Building library 'ares'
Environment:______________
BAZEL_LINKLIBS=-l%:libstdc++.a
EXT_BUILD_ROOT=/root/.cache/bazel/_bazel_root/1244163c7aa16348645f91fe359f2a31/sandbox/linux-sandbox/1110/execroot/nighthawk
INSTALLDIR=/root/.cache/bazel/_bazel_root/1244163c7aa16348645f91fe359f2a31/sandbox/linux-sandbox/1110/execroot/nighthawk/bazel-out/k8-opt/bin/external/envoy/bazel/foreign_cc/ares
BAZEL_LINKOPTS=-lm
PWD=/root/.cache/bazel/_bazel_root/1244163c7aa16348645f91fe359f2a31/sandbox/linux-sandbox/1110/execroot/nighthawk
BUILD_TMPDIR=/tmp/tmp.j0d20CD7lq
TMPDIR=/tmp
EXT_BUILD_DEPS=/tmp/tmp.9TBXyTjRtD
SHLVL=2
@oschaaf
Copy link
Member

oschaaf commented Sep 12, 2020

Sorry about the late reply. CentOS isn't covered in CI, but I wouldn't anticipate fundamental blockers. But getting all the details right for the build time dependencies might take some time. I have not tried it yet myself, and I don't know if anyone else did earlier. So if you do manage to get this to work, sharing details could be helpful to others.

If you're up for an experiment with docker, there is this script that helps with building via docker.
By default it will use envoyproxy/envoy-build-centos, but there is also envoyproxy/envoy-build-centos.
So may running something like this would just work:

IMAGE_NAME="envoyproxy/envoy-build-centos" ./ci/run_envoy_docker.sh './ci/do_ci.sh build'

This would not get you an opt build, but if this works, we can easily modify ci/do_ci.sh to assist with that.
(the opt build flow is implicitly tested via another flag, which is of nu use for the case here).

oschaaf added a commit to oschaaf/nighthawk that referenced this issue Sep 15, 2020
This is helpful to assist with building Nighthawk's production
ready artifacts via docker build images.

For example:

```bash
DOCKER_IMAGE=envoyproxy/envoy-build-[centos|ubuntu] \
  ci/run_envoy_docker.sh ci/do_ci.sh opt_build
```

Related issue: envoyproxy#525

Signed-off-by: Otto van der Schaaf <[email protected]>
dubious90 pushed a commit that referenced this issue Sep 15, 2020
This is helpful to assist with building Nighthawk's production
ready artifacts via docker build images.

For example:

```bash
DOCKER_IMAGE=envoyproxy/envoy-build-[centos|ubuntu] \
  ci/run_envoy_docker.sh ci/do_ci.sh opt_build
```

Related issue: #525

Signed-off-by: Otto van der Schaaf <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants