bnoordhuis / v8-cmake

The V8 JavaScript engine, but built with CMake instead of GN - WIP
BSD 3-Clause "New" or "Revised" License
189 stars 54 forks source link

cmake build fail #53

Closed esrrhs closed 2 years ago

esrrhs commented 2 years ago

/datanew/project/v8-cmake/v8/src/base/platform/platform-posix.cc: 在静态成员函数‘static v8::PlatformSharedMemoryHandle v8::base::OS::CreateSharedMemoryHandleForTesting(size_t)’中: /datanew/project/v8-cmake/v8/src/base/platform/platform-posix.cc:591:44: 错误:‘MFD_CLOEXEC’ was not declared in this scope; did you mean ‘FD_CLOEXEC’? 591 | fd = memfd_create("V8MemFDForTesting", MFD_CLOEXEC); | ^~~ | FD_CLOEXEC

gcc -v

使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/12.1.0/lto-wrapper 目标:x86_64-pc-linux-gnu 配置为:./configure --enable-host-shared --enable-languages=jit,c,c++ --disable-bootstrap --enable-checking=release 线程模型:posix Supported LTO compression algorithms: zlib gcc 版本 12.1.0 (GCC)

bnoordhuis commented 2 years ago

You can try cherry-picking v8/v8@4e81f2584ee15cd6300e180585c26f16616210f3. If that doesn't work, you'll have to build on a newer system - your kernel headers are too old.