envoyproxy / envoy-filter-example

Example of consuming Envoy and adding a custom filter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compile envoy failed error message is unknown type name 'STACK_UNINITIALIZED'

ggjjlldd opened this issue · comments

I use build command :

./envoy/ci/run_envoy_docker.sh './ci/do_ci.sh build'

but error happend here:

error description:

Use --sandbox_debug to see verbose messages from the sandbox
external/com_googlesource_googleurl/url/url_util.cc:187:3: error: unknown type name 'STACK_UNINITIALIZED'
  STACK_UNINITIALIZED RawCanonOutputT<CHAR> whitespace_buffer;
  ^
external/com_googlesource_googleurl/url/url_util.cc:187:23: error: template specialization requires 'template<>'
  STACK_UNINITIALIZED RawCanonOutputT<CHAR> whitespace_buffer;

compile command :

Use --sandbox_debug to see verbose messages from the sandbox clang failed: error executing command 
  (cd /build/.cache/bazel/_bazel_envoybuild/b570b5ccd0454dc9af9f65ab1833764d/sandbox/processwrapper-sandbox/4/execroot/envoy_filter_example && \
  exec env - \
    BAZEL_LINKLIBS=-l%:libstdc++.a \
    BAZEL_LINKOPTS=-lm \
    CC=clang \
    CXX=clang++ \
    PATH=/usr/lib/llvm-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \
    PWD=/proc/self/cwd \
  /usr/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/k8-fastbuild/bin/external/com_googlesource_googleurl/url/_objs/url/url_util.pic.d '-frandom-seed=bazel-out/k8-fastbuild/bin/external/com_googlesource_googleurl/url/_objs/url/url_util.pic.o' -fPIC -iquote external/com_googlesource_googleurl -iquote bazel-out/k8-fastbuild/bin/external/com_googlesource_googleurl -iquote external/org_unicode_icuuc -iquote bazel-out/k8-fastbuild/bin/external/org_unicode_icuuc -isystem external/org_unicode_icuuc/icu4c/source/common -isystem bazel-out/k8-fastbuild/bin/external/org_unicode_icuuc/icu4c/source/common -fPIC '-std=c++17' '-std=c++17' -fno-strict-aliasing -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/com_googlesource_googleurl/url/url_util.cc -o bazel-out/k8-fastbuild/bin/external/com_googlesource_googleurl/url/_objs/url/url_util.pic.o)
Execution platform: @local_config_platform//:host

compile environment:

Setting up libclang-common-6.0-dev (1:6.0-1ubuntu2) ...
Setting up libobjc4:amd64 (10.1.0-2ubuntu1~18.04) ...
Setting up libgcc-7-dev:amd64 (7.5.0-3ubuntu1~18.04) ...
Setting up llvm-6.0-runtime (1:6.0-1ubuntu2) ...
mount: /proc/sys/fs/binfmt_misc: permission denied.
update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
Setting up libstdc++-7-dev:amd64 (7.5.0-3ubuntu1~18.04) ...
Setting up libobjc-7-dev:amd64 (7.5.0-3ubuntu1~18.04) ...
Setting up clang-6.0 (1:6.0-1ubuntu2) ...
Setting up llvm-6.0 (1:6.0-1ubuntu2) ...
Setting up clang (1:6.0-41~exp5~ubuntu1) ...
Setting up llvm-6.0-dev (1:6.0-1ubuntu2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang/clang++ toolchain configured

@ggjjlldd could you help to try updating the ci/do_ci.sh file with the following diff?

diff --git a/ci/do_ci.sh b/ci/do_ci.sh
index 0603940..5d3f7e5 100755
--- a/ci/do_ci.sh
+++ b/ci/do_ci.sh
@@ -1,10 +1,6 @@
 #!/bin/bash -e

-export PATH=/usr/lib/llvm-8/bin:$PATH
-export CC=clang
-export CXX=clang++
-export ASAN_SYMBOLIZER_PATH=/usr/lib/llvm-7/bin/llvm-symbolizer
-echo "$CC/$CXX toolchain configured"
+./envoy/bazel/setup_clang.sh /opt/llvm

 if [[ -f "${HOME:-/root}/.gitconfig" ]]; then
     mv "${HOME:-/root}/.gitconfig" "${HOME:-/root}/.gitconfig_save"

Relevant: #115

i tried and it reslove my problems, thanks very much