nighthawk icon indicating copy to clipboard operation
nighthawk copied to clipboard

building failed,by guide of readme

Open ggjjlldd opened this issue 4 years ago • 1 comments

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

ggjjlldd avatar Sep 11 '20 07:09 ggjjlldd

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 avatar Sep 12 '20 21:09 oschaaf