nebula icon indicating copy to clipboard operation
nebula copied to clipboard

Compile error: ‘hardware_destructive_interference_size’ was not declared in this scope

Open playgithub opened this issue 1 year ago • 1 comments

Env

  • nebula: 3.4.1
  • OS: Manjaro
  • g++ (GCC) 12.2.1 20230201
  • gcc (GCC) 12.2.1 20230201

Reproduce

  1. 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/

  2. 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.

playgithub avatar May 05 '23 16:05 playgithub

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.

Shinji-IkariG avatar Dec 06 '23 09:12 Shinji-IkariG