Skip to content

Multiple build errors with clang 19 #6171

@wittrock

Description

@wittrock

With clang 19, running bazel build //... results in the following error. This matches an issue reported to souffle here:

souffle-lang/souffle#2530

This error prevents me running a release of kythe with setup_release.sh.

wittrock@wittrock-kythe ~/kythe
 % bazel build --verbose_failures //kythe/cxx/verifier:souffle_interpreter
INFO: Analyzed target //kythe/cxx/verifier:souffle_interpreter (0 packages loaded, 0 targets configured).
ERROR: /usr/local/google/home/wittrock/kythe/kythe/cxx/verifier/BUILD:54:11: Compiling kythe/cxx/verifier/souffle_interpreter.cc failed: (Exit 1): clang failed: error executing CppCompile command (from target //kythe/cxx/verifier:souffle_interpreter) 
  (cd /usr/local/google/home/wittrock/.cache/bazel/_bazel_wittrock/615f281c01d727f3e26d2b713b01ae63/sandbox/linux-sandbox/4740/execroot/io_kythe && \
  exec env - \
    PATH=/bin:/usr/bin:/usr/local/bin \
    PWD=/proc/self/cwd \
  /usr/lib/llvm-19/bin/clang -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer '-std=c++17' -MD -MF bazel-out/k8-fastbuild/bin/kythe/cxx/verifier/_objs/souffle_interpreter/souffle_interpreter.pic.d '-frandom-seed=bazel-out/k8-fastbuild/bin/kythe/cxx/verifier/_objs/souffle_interpreter/souffle_interpreter.pic.o' -fPIC -iquote . -iquote bazel-out/k8-fastbuild/bin -iquote external/com_google_absl -iquote bazel-out/k8-fastbuild/bin/external/com_google_absl -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-fastbuild/bin/external/com_googlesource_code_re2 -iquote external/souffle -iquote bazel-out/k8-fastbuild/bin/external/souffle -isystem external/souffle/src -isystem bazel-out/k8-fastbuild/bin/external/souffle/src -isystem external/souffle/src/include -isystem bazel-out/k8-fastbuild/bin/external/souffle/src/include -isystem bazel-out/k8-fastbuild/bin/external/org_sourceware_libffi/libffi/include '-std=c++17' -Wmissing-prototypes -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' '-fmodule-name=//kythe/cxx/verifier:souffle_interpreter' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/kythe/cxx/verifier/souffle_interpreter.cppmap' -fmodules-strict-decluse -Wprivate-header '-fmodule-map-file=external/local_config_cc/module.modulemap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/kythe/cxx/verifier/assertions_to_souffle.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/kythe/cxx/verifier/lexparse.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/third_party/souffle/parse_transform.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/base/no_destructor.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/container/flat_hash_map.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/container/flat_hash_set.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/log/log.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/log/check.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/external/com_google_absl/absl/strings/strings.cppmap' '-fmodule-map-file=bazel-out/k8-fastbuild/bin/external/souffle/souffle.cppmap' -c kythe/cxx/verifier/souffle_interpreter.cc -o bazel-out/k8-fastbuild/bin/kythe/cxx/verifier/_objs/souffle_interpreter/souffle_interpreter.pic.o)
# Configuration: 98e5bf4d6632f111c2added18f430c9231cd6c4e9363023da9bcb7b7a3ef8fb1
# Execution platform: @@local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from kythe/cxx/verifier/souffle_interpreter.cc:33:
In file included from external/souffle/src/interpreter/Engine.h:20:
In file included from external/souffle/src/interpreter/Context.h:19:
external/souffle/src/interpreter/Index.h:417:14: error: overload resolution selected deleted operator '='
  417 |         data = src.data;
      |         ~~~~ ^ ~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/atomic:78:13: note: candidate function has been explicitly deleted
   78 |     atomic& operator=(const atomic&) = delete;
      |             ^
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/atomic:79:13: note: candidate function has been explicitly deleted
   79 |     atomic& operator=(const atomic&) volatile = delete;
      |             ^
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/atomic:84:5: note: candidate function
   84 |     operator=(bool __i) noexcept
      |     ^
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/atomic:88:5: note: candidate function
   88 |     operator=(bool __i) volatile noexcept
      |     ^

Additionally, rapidjson has an error:

In file included from kythe/cxx/common/net_client_test.cc:17:
In file included from ./kythe/cxx/common/net_client.h:28:
external/com_github_tencent_rapidjson/include/rapidjson/document.h:319:82: error: cannot assign to non-static data member 'length' with const-qualified type 'const SizeType' (aka 'const unsigned int')
  319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
      |                                                                           ~~~~~~ ^
external/com_github_tencent_rapidjson/include/rapidjson/document.h:325:20: note: non-static data member 'length' declared const here
  325 |     const SizeType length; //!< length of the string (excluding the trailing NULL terminator)
      |     ~~~~~~~~~~~~~~~^~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions