8000 build: "cannot assign to non-static data member" caused by obsolete version of "flatbuffer" · Issue #893 · timeplus-io/proton · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
build: "cannot assign to non-static data member" caused by obsolete version of "flatbuffer" #893
Open
@XiaochenCui

Description

@XiaochenCui

Describe what's wrong

Got error when build from scratch, using llvm-20.

How to reproduce

create file CMakePresets.json:

{
  "version": 3,
  "cmakeMinimumRequired": {
    "major": 3,
    "minor": 21,
    "patch": 0
  },
  "configurePresets": [
    {
      "name": "llvm17",
      "generator": "Ninja",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "/usr/lib/llvm-17/bin/clang",
        "CMAKE_CXX_COMPILER": "/usr/lib/llvm-17/bin/clang++"
      }
    },
    {
      "name": "llvm20",
      "generator": "Ninja",
      "cacheVariables": {
        "CMAKE_C_COMPILER": "/usr/lib/llvm-20/bin/clang",
        "CMAKE_CXX_COMPILER": "/usr/lib/llvm-20/bin/clang++"
      }
    }
  ]
}
# build using llvm-20
cmake . -B build --preset llvm20
ninja -C build

Error message and/or stacktrace

[build] /home/xiaochen/code/proton/contrib/flatbuffers/include/flatbuffers/stl_emulation.h:549:12: error: cannot assign to non-static data member 'count_' with const-qualified type 'const size_type' (aka 'const unsigned long')
[build]   549 |     count_ = other.count_;
[build]       |     ~~~~~~ ^
[build] /home/xiaochen/code/proton/contrib/flatbuffers/include/flatbuffers/stl_emulation.h:628:19: note: non-static data member 'count_' declared const here
[build]   628 |   const size_type count_;
[build]       |   ~~~~~~~~~~~~~~~~^~~~~~
[build] 1 error generated.

Additional context

This issue was also reported at:
CleverRaven/Cataclysm-DDA#77355
and is fixed at:
google/flatbuffers@20aad0c

I'm going to update its version to new and do some verification to ensure the correctness and performance.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0