nebula
nebula copied to clipboard
Compile error: ‘hardware_destructive_interference_size’ was not declared in this scope
Env
- nebula: 3.4.1
- OS: Manjaro
- g++ (GCC) 12.2.1 20230201
- gcc (GCC) 12.2.1 20230201
Reproduce
-
Follow the doc at https://docs.nebula-graph.io/3.4.1/4.deployment-and-installation/2.compile-and-install-nebula-graph/1.install-nebula-graph-by-compiling-the-source-code/
-
Step 5 (Compile NebulaGraph) fails:
nebula/src/common/memory/MemoryTracker.h:32:23: error: ‘hardware_destructive_interference_size’ was not declared in this scope 32 | CACHE_LINE_SIZE = hardware_destructive_interference_size;
BTW, Step 2 (i.e. run install-third-party.sh) fails, because it need root to write in
/opt
.
More Info
By defining "CMAKE_CXX_STANDARD=C++17" for cmake, it still fails the same way.
On atypical distributions, you need to build nebula-thrid-party for the current platform before compiling nebula. In addition, this issue may be due to huge differences in memory management between different distributions.