Skip to content

build: can not build quiche at latest commit #15620

@qinggniq

Description

@qinggniq

Title: can not build quiche at commit 531c6ac

Description:

When I run bazel build //source/exe:envoy-static at my local machine, it report below errors:

Repro steps:

Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.

  • clang/clang++ version 11.0.1
  • system Linux rancher01 5.4.0-48-generic http rl filter: add actions #52~18.04.1-Ubuntu SMP Thu Sep 10 12:50:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • code at main branch, commit 531c6ac

Config:

N/A

Logs:

Include the access logs and the Envoy logs.

ERROR: /data/.cache/_bazel_wangcong01/b938f25908549f924e43a4413d4b5096/external/com_googlesource_quiche/BUILD.bazel:733:17: C++ compilation of rule '@com_googlesource_quiche//:http2_hpack_varint_hpack_varint_decoder_lib' failed (Exit 1): clang failed: error executing command /usr/lib/llvm-11/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 98 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox clang failed: error executing command /usr/lib/llvm-11/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 98 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
In file included from bazel-out/k8-fastbuild/bin/external/com_googlesource_quiche/quiche/http2/hpack/varint/hpack_varint_decoder.cc:5:
In file included from bazel-out/k8-fastbuild/bin/external/com_googlesource_quiche/quiche/http2/hpack/varint/hpack_varint_decoder.h:34:
bazel-out/k8-fastbuild/bin/external/com_googlesource_quiche/quiche/http2/decoder/decode_buffer.h:71:5: error: use of overloaded operator '<<' is ambiguous (with operand types 'basic_ostream<char, std::char_traits<char>>' and 'nullptr_t')
    QUICHE_DCHECK_EQ(subset_, nullptr)
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/external/com_googlesource_quiche/quiche/common/platform/api/quiche_logging.h:51:38: note: expanded from macro 'QUICHE_DCHECK_EQ'
#define QUICHE_DCHECK_EQ(val1, val2) QUICHE_DCHECK_EQ_IMPL(val1, val2)
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/source/extensions/quic_listeners/quiche/platform/_virtual_includes/quic_platform_logging_impl_lib/extensions/quic_listeners/quiche/platform/quic_logging_impl.h:120:37: note: expanded from macro 'QUICHE_DCHECK_EQ_IMPL'
#define QUICHE_DCHECK_EQ_IMPL(a, b) QUICHE_CHECK_EQ_IMPL(a, b)
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/source/extensions/quic_listeners/quiche/platform/_virtual_includes/quic_platform_logging_impl_lib/extensions/quic_listeners/quiche/platform/quic_logging_impl.h:85:36: note: expanded from macro 'QUICHE_CHECK_EQ_IMPL'
#define QUICHE_CHECK_EQ_IMPL(a, b) QUICHE_CHECK_INNER_IMPL_OP(==, a, b)
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/source/extensions/quic_listeners/quiche/platform/_virtual_includes/quic_platform_logging_impl_lib/extensions/quic_listeners/quiche/platform/quic_logging_impl.h:78:85: note: expanded from macro 'QUICHE_CHECK_INNER_IMPL_OP'
                          "CHECK failed: " #a " (=" << (a) << ") " #op " " #b " (=" << (b) << ")")
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
bazel-out/k8-fastbuild/bin/source/extensions/quic_listeners/quiche/platform/_virtual_includes/quic_platform_logging_impl_lib/extensions/quic_listeners/quiche/platform/quic_logging_impl.h:72:66: note: expanded from macro 'QUICHE_CHECK_INNER_IMPL'
  QUICHE_LOG_IF_IMPL(FATAL, ABSL_PREDICT_FALSE(!(condition))) << details << ". "
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ostream:108:7: note: candidate function
      operator<<(__ostream_type& (*__pf)(__ostream_type&))
      ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ostream:117:7: note: candidate function
      operator<<(__ios_type& (*__pf)(__ios_type&))
      ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ostream:127:7: note: candidate function
      operator<<(ios_base& (*__pf) (ios_base&))
      ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ostream:245:7: note: candidate function
      operator<<(const void* __p)
      ^
/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/ostream:270:7: note: candidate function
      operator<<(__streambuf_type* __sb);

Note
After git reset --hard commit && bazel build ... few times, I think it's caused by this pr #15549, it adds stream output at

#define QUICHE_CHECK_INNER_IMPL_OP(op, a, b) \
QUICHE_CHECK_INNER_IMPL((a)op(b), \
"CHECK failed: " #a " (=" << (a) << ") " #op " " #b " (=" << (b) << ")")

and this macro is referred by QUICHE_CHECK_INNER_IMPL -> QUICHE_CHECK_EQ_IMPL -> QUICHE_DCHECK_EQ_IMPL and QUICHE_DCHECK_EQ_IMPL is used by com_googlesource_quiche, in https://quiche.googlesource.com/quiche/+/refs/heads/master/http2/platform/api/http2_logging.h#4, it imports source/extensions/quic_listeners/quiche/platform/quic_logging_impl.h in envoy, and used by https://quiche.googlesource.com/quiche/+/refs/heads/master/http2/decoder/decode_buffer.h#71,

void AdvanceCursor(size_t amount) {
   QUICHE_DCHECK_LE(amount,
   Remaining());  // Need at least that much remaining.
   QUICHE_DCHECK_EQ(subset_, nullptr)
   << "Access via subset only when present.";
   cursor_ += amount;
   }

In QUICHE_DCHECK_EQ(subset_, nullptr) it uses nullptr, but nullptr cannot be put at ostream.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions