-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Build: bazel build failed in network filters #7082
Comments
There was a general build breakage that was fixed today, so closing for now. If you are still having an issue, can you give more details about your platform and the environment and re-open? |
I took the latest code today and facing same error. Hence reopening this issue. Let me know if you need further details. |
I am not able to re-open this issue . |
Can you attach the complete output of your bazel command? |
ERROR: /home/i309801/Desktop/envoy/source/extensions/filters/network/kafka/BUILD:92:1: C++ compilation of rule '//source/extensions/filters/network/kafka:serialization_lib' failed (Exit 1) envoy_cc_wrapper failed: error executing command /home/i309801/.cache/bazel/_bazel_i309801/b6d0838a6096d725b6cb04aa30aa8841/external/local_config_cc/extra_tools/envoy_cc_wrapper -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter ... (remaining 72 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox |
Thanks. I am wondering if this is specific to the Kafka extension or if you can't compile anything on your machine. Can you try
and see if that works? Note that all the developers seem to be able to build no problem, so I'm not sure what's different about your system or setup. clang 8 seems reasonable to me. |
As another data point, I get this while running |
@jmarantz it worked !! Now all 168 tests passed. |
@bplotnick i tried the command you shared, build failed for me. |
Sorry, did you try to clean it up and rebuild? like |
@dio now i got different error: /home/i309801/Desktop/envoy/source/extensions/clusters/redis/BUILD:11:1: C++ compilation of rule ' //source/extensions/clusters/redis:redis_cluster' failed (Exit 1) envoy_cc_wrapper failed: error executin g command /home/i309801/.cache/bazel/_bazel_i309801/b6d0838a6096d725b6cb04aa30aa8841/external/local_confi g_cc/extra_tools/envoy_cc_wrapper -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter .. . (remaining 397 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox |
@Satvindar seems like you can try to use clang and clang++ from llvm-8 to compile it. As you have mentioned that you have it in your machine (assumed it is installed at
|
@dio Thnaks a lot . Build is successful now. ERROR: /home/i309801/Desktop/envoy-filter-example/http-filter-example/BUILD:47:1: C++ compilation of rule '//http-filter-example:http_filter_integration_test_lib_internal_only' failed (Exit 1) envoy_cc_wrapper failed: error executing command /home/i309801/.cache/bazel/_bazel_i309801/01330d535f2da866e5c0a2eb67025593/external/local_config_cc/extra_tools/envoy_cc_wrapper -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign ... (remaining 858 argument(s) skipped) Use --sandbox_debug to see verbose messages from the sandbox |
@Satvindar Ah, that's true. Since this #6564 is merged we no longer have that
Do you think you can help us to submit a fix for that? It is in this line: https://github.com/envoyproxy/envoy-filter-example/blob/master/http-filter-example/http_filter_integration_test.cc#L39 And seems like this is not related to your first question. I'll close this 🙂. |
@dio Yes, I modified the code and its working. |
I meet the similar error about kafka networkfilter when building envoy-wasm: ERROR: /home/envoy-wasm/source/extensions/filters/network/kafka/BUILD:231:1: Executing genrule //source/extensions/filters/network/kafka:serialization_composite_generated_source failed (Exit 1) linux-sandbox failed: error executing command
(cd /root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/sandbox/linux-sandbox/202/execroot/envoy && \
exec env - \
BAZEL_COMPILER=clang \
BAZEL_CXXOPTS='-stdlib=libc++' \
BAZEL_LINKLIBS=-l%:libc++.a:-l%:libc++abi.a:-lm \
BAZEL_LINKOPTS=-lm \
CC=/root/package/llvm-project/build/bin/clang \
CXX=/root/package/llvm-project/build/bin/clang++ \
CXXFLAGS='-stdlib=libc++ -Wno-error' \
LDFLAGS='-stdlib=libc++' \
PATH=/root/package/llvm-project/build/bin:/root/package/z3-master/build:/root/package/gn/out:/root/package/llvm-project/build/bin:/usr/local/java/bin:/root/apache-ant-1.9.14/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin \
TMPDIR=/tmp \
/root/.cache/bazel/_bazel_root/install/c435ff35b78e9d78b94f06dd7301a644/linux-sandbox -t 15 -w /root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/sandbox/linux-sandbox/202/execroot/envoy -w /tmp -w /dev/shm -D -- /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh;
./bazel-out/host/bin/source/extensions/filters/network/kafka/serialization_composite_code_generator_bin bazel-out/aarch64-fastbuild/bin/source/extensions/filters/network/kafka/external/serialization_composite.h
')
...
Traceback (most recent call last):
File "./bazel-out/host/bin/source/extensions/filters/network/kafka/serialization_composite_code_generator_bin", line 349, in <module>
Main()
File "./bazel-out/host/bin/source/extensions/filters/network/kafka/serialization_composite_code_generator_bin", line 303, in Main
'Cannot exec() %r: file not found.' % main_filename
AssertionError: Cannot exec() '/root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/sandbox/linux-sandbox/202/execroot/envoy/./bazel-out/host/bin/source/extensions/filters/network/kafka/serialization_composite_code_generator_bin.runfiles/envoy/source/extensions/filters/network/kafka/serialization/launcher.py': file not found. It seems like launcher.py not found, however I found the file root@localhost envoy-wasm]# ll /root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/sandbox/linux-sandbox/202/execroot/envoy/./bazel-out/host/bin/source/extensions/filters/network/kafka/serialization_composite_code_generator_bin.runfiles/envoy/source/extensions/filters/network/kafka/serialization/launcher.py
lrwxrwxrwx. 1 root root 144 Mar 26 20:26 [/root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/sandbox/linux-sandbox/202/execroot/envoy/./bazel-out/host/bin/source/extensions/filters/network/kafka/serialization_composite_code_generator_bin.runfiles/envoy/source/extensions/filters/network/kafka/serialization/launcher.py -> /root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/execroot/envoy/source/extensions/filters/network/kafka/serialization/launcher.py
[root@localhost envoy-wasm]# ll /root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/execroot/envoy/source/extensions/filters/network/kafka/serialization/launcher.py
-rw-------. 1 l00424155 root 926 Mar 20 17:11 /root/.cache/bazel/_bazel_root/7943ff6a97d79b71366dffc326f50b10/execroot/envoy/source/extensions/filters/network/kafka/serialization/launcher.py Any idea to fix the building error? |
I am trying to build envoy latest code using bazel.
I have installed all the required dependencies and then executed
bazel build //source/exe:envoy-static
Got below error:
/home/i309801/Desktop/envoy/source/extensions/filters/network/kafka/BUILD:92:1: C++ compilation of rule '//source/extensions/filters/network/kafka:serialization_lib' failed (Exit 1) envoy_cc_wrapper failed:
The text was updated successfully, but these errors were encountered: