fatal error: memory: No such file or directory while compiling node js in clion

  build, c++, clion, cmake, compilation

I’m trying to run node js via cmake with the help of clion, and I get the following error while pressing the green arrow (in clion gui):

make[3]: *** [CMakeFiles/node.dir/build.make:160: CMakeFiles/node.dir/deps/brotli/c/common/constants.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /home/eran/CLionProjects/node/benchmark/napi/function_args/napi_binding.c:5:
/home/eran/CLionProjects/node/deps/v8/src/objects/string.h:8:10: fatal error: memory: No such file or directory
    8 | #include <memory>

I believe to be a standard library of c++11?
And probably I misconfigured the cmakelists? as just make works (probably node js project has correctly configure it?).

here is the beginning of my cmakelists.txt

cmake_minimum_required(VERSION 3.19)
project(node)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_BUILD_TYPE debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

include_directories(deps/brotli/c/common)
include_directories(deps/brotli/c/dec)
include_directories(deps/brotli/c/enc)
include_directories(deps/brotli/c/include)
include_directories(deps/brotli/c/include/brotli)
include_directories(deps/cares/config)
include_directories(deps/cares/config/aix)
include_directories(deps/cares/config/android)
include_directories(deps/cares/config/cygwin)
include_directories(deps/cares/config/darwin)
include_directories(deps/cares/config/freebsd)
include_directories(deps/cares/config/linux)
include_directories(deps/cares/config/netbsd)
include_directories(deps/cares/config/openbsd)
include_directories(deps/cares/config/sunos)
include_directories(deps/cares/include)
include_directories(deps/cares/src)
include_directories(deps/histogram/src)
include_directories(deps/icu-small/source/common)
include_directories(deps/icu-small/source/common/unicode)
include_directories(deps/icu-small/source/i18n)
include_directories(deps/icu-small/source/i18n/unicode)
include_directories(deps/icu-small/source/tools/escapesrc)
include_directories(deps/icu-small/source/tools/genrb)
include_directories(deps/icu-small/source/tools/pkgdata)
include_directories(deps/icu-small/source/tools/toolutil)
include_directories(deps/llhttp/include)
include_directories(deps/nghttp2/lib)
include_directories(deps/nghttp2/lib/includes)
include_directories(deps/nghttp2/lib/includes/nghttp2)
include_directories(deps/ngtcp2)
include_directories(deps/ngtcp2/nghttp3/lib)
include_directories(deps/ngtcp2/nghttp3/lib/includes)
include_directories(deps/ngtcp2/nghttp3/lib/includes/nghttp3)
include_directories(deps/ngtcp2/ngtcp2/crypto)
include_directories(deps/ngtcp2/ngtcp2/crypto/includes)
include_directories(deps/ngtcp2/ngtcp2/crypto/includes/ngtcp2)
include_directories(deps/ngtcp2/ngtcp2/lib)
include_directories(deps/ngtcp2/ngtcp2/lib/includes)
include_directories(deps/ngtcp2/ngtcp2/lib/includes/ngtcp2)
include_directories(deps/openssl/config)
include_directories(deps/openssl/config/archs)
include_directories(deps/openssl/config/archs/aix-gcc)
include_directories(deps/openssl/config/archs/aix-gcc/asm)
include_directories(deps/openssl/config/archs/aix-gcc/asm/crypto)
include_directories(deps/openssl/config/archs/aix-gcc/asm/crypto/include)
include_directories(deps/openssl/config/archs/aix-gcc/asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/aix-gcc/asm/include)
include_directories(deps/openssl/config/archs/aix-gcc/asm/include/openssl)
include_directories(deps/openssl/config/archs/aix-gcc/asm_avx2)
include_directories(deps/openssl/config/archs/aix-gcc/asm_avx2/crypto)
include_directories(deps/openssl/config/archs/aix-gcc/asm_avx2/crypto/include)
include_directories(deps/openssl/config/archs/aix-gcc/asm_avx2/crypto/include/internal)
include_directories(deps/openssl/config/archs/aix-gcc/asm_avx2/include)
include_directories(deps/openssl/config/archs/aix-gcc/asm_avx2/include/openssl)
include_directories(deps/openssl/config/archs/aix-gcc/no-asm)
include_directories(deps/openssl/config/archs/aix-gcc/no-asm/crypto)
include_directories(deps/openssl/config/archs/aix-gcc/no-asm/crypto/include)
include_directories(deps/openssl/config/archs/aix-gcc/no-asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/aix-gcc/no-asm/include)
include_directories(deps/openssl/config/archs/aix-gcc/no-asm/include/openssl)
include_directories(deps/openssl/config/archs/aix64-gcc)
include_directories(deps/openssl/config/archs/aix64-gcc/asm)
include_directories(deps/openssl/config/archs/aix64-gcc/asm/crypto)
include_directories(deps/openssl/config/archs/aix64-gcc/asm/crypto/include)
include_directories(deps/openssl/config/archs/aix64-gcc/asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/aix64-gcc/asm/include)
include_directories(deps/openssl/config/archs/aix64-gcc/asm/include/openssl)
include_directories(deps/openssl/config/archs/aix64-gcc/asm_avx2)
include_directories(deps/openssl/config/archs/aix64-gcc/asm_avx2/crypto)
include_directories(deps/openssl/config/archs/aix64-gcc/asm_avx2/crypto/include)
include_directories(deps/openssl/config/archs/aix64-gcc/asm_avx2/crypto/include/internal)
include_directories(deps/openssl/config/archs/aix64-gcc/asm_avx2/include)
include_directories(deps/openssl/config/archs/aix64-gcc/asm_avx2/include/openssl)
include_directories(deps/openssl/config/archs/aix64-gcc/no-asm)
include_directories(deps/openssl/config/archs/aix64-gcc/no-asm/crypto)
include_directories(deps/openssl/config/archs/aix64-gcc/no-asm/crypto/include)
include_directories(deps/openssl/config/archs/aix64-gcc/no-asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/aix64-gcc/no-asm/include)
include_directories(deps/openssl/config/archs/aix64-gcc/no-asm/include/openssl)
include_directories(deps/openssl/config/archs/BSD-x86)
include_directories(deps/openssl/config/archs/BSD-x86/asm)
include_directories(deps/openssl/config/archs/BSD-x86/asm/crypto)
include_directories(deps/openssl/config/archs/BSD-x86/asm/crypto/include)
include_directories(deps/openssl/config/archs/BSD-x86/asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/BSD-x86/asm/include)
include_directories(deps/openssl/config/archs/BSD-x86/asm/include/openssl)
include_directories(deps/openssl/config/archs/BSD-x86/asm_avx2)
include_directories(deps/openssl/config/archs/BSD-x86/asm_avx2/crypto)
include_directories(deps/openssl/config/archs/BSD-x86/asm_avx2/crypto/include)
include_directories(deps/openssl/config/archs/BSD-x86/asm_avx2/crypto/include/internal)
include_directories(deps/openssl/config/archs/BSD-x86/asm_avx2/include)
include_directories(deps/openssl/config/archs/BSD-x86/asm_avx2/include/openssl)
include_directories(deps/openssl/config/archs/BSD-x86/no-asm)
include_directories(deps/openssl/config/archs/BSD-x86/no-asm/crypto)
include_directories(deps/openssl/config/archs/BSD-x86/no-asm/crypto/include)
include_directories(deps/openssl/config/archs/BSD-x86/no-asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/BSD-x86/no-asm/include)
include_directories(deps/openssl/config/archs/BSD-x86/no-asm/include/openssl)
include_directories(deps/openssl/config/archs/BSD-x86_64)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm/crypto)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm/crypto/include)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm/include)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm/include/openssl)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm_avx2)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm_avx2/crypto)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm_avx2/crypto/include)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm_avx2/crypto/include/internal)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm_avx2/include)
include_directories(deps/openssl/config/archs/BSD-x86_64/asm_avx2/include/openssl)
include_directories(deps/openssl/config/archs/BSD-x86_64/no-asm)
include_directories(deps/openssl/config/archs/BSD-x86_64/no-asm/crypto)
include_directories(deps/openssl/config/archs/BSD-x86_64/no-asm/crypto/include)
include_directories(deps/openssl/config/archs/BSD-x86_64/no-asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/BSD-x86_64/no-asm/include)
include_directories(deps/openssl/config/archs/BSD-x86_64/no-asm/include/openssl)
include_directories(deps/openssl/config/archs/darwin-i386-cc)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm/crypto)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm/crypto/include)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm/crypto/include/internal)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm/include)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm/include/openssl)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm_avx2)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm_avx2/crypto)
include_directories(deps/openssl/config/archs/darwin-i386-cc/asm_avx2/crypto/include)

Source: Windows Questions C++

LEAVE A COMMENT