如何在 Windows10/11 上从源代码构建 ArangDB?

问题描述 投票:0回答:1

嗨,我正在做我的学士小组作业,我的任务是构建 ArangoDB 的分支,我们还没有对它进行任何更改,因为我需要先构建它。而且我从来没有构建过大型 C++ 项目,所以在测试并失败了 3 周之后,我现在正在寻求帮助。

我正在尝试从源代码构建 ArangoDB,但我无法克服构建错误。似乎我能找到的文档已经过时了,而且我也找不到可以帮助我解决问题的视频。我查阅了如何构建 C++ 项目并遵循了本指南:https://github.com/HO-COOH/CPPDevOnWindows。所以“Hello World”测试项目有效,但是当我尝试按照本指南构建具有额外依赖项的 ArangoDB 时:https://www.arangodb.com/docs/stable/installation-compiling-windows.html 我得到许多失败的测试和关于在我安装它时找不到 openssl 的错误(它在通过系统范围的检查时找到它)并且当我安装了最新版本时我安装了一个过时的 camke 版本。

我正在使用 ArangoDB 3.10、Visual Stuido 2019 Community,我尝试使用 chocolatey、MSYS2 和 vcpkg 安装依赖项。

安装依赖项后,我尝试在 ArangoDB 源目录中创建的名为“Build64”的目录中运行“$ cmake -G”Visual Studio 16 2019“..”。这是在我从我的计算机上卸载 openssl 以尝试查看它是否会使用我用 vcpkg 安装的 openssl 包之后。通常 cmake 命令会运行很长时间,但是当卸载 openssl 时,它会在我的系统中找不到 openssl 时停止。

这是输出:

\`C:\\Users\\BJ-X1\\source\\repos\\arangodb\\Build64\>cmake -G "Visual Studio 16 2019" ..
\-- CMake version: 3.25.3
\-- Building for processor
\-- Found Git: C:/Program Files/Git/cmd/git.exe (found suitable version "2.39.1.windows.1", minimum required is "1.5.3")
\-- ARANGODB PLAIN VERSION: 3.10.5
\-- ARANGODB VERSION: 3.10.5
\-- ARANGODB JS VERSION: js
\-- DEBIAN VERSION: 3.10.5 / 1
\-- RPM VERSION:    3.10.5 / 1.0
\-- DARWIN VERSION: 3.10.5 /
\-- WINDOWS VERSION: 3.10.5
\-- SNAP REVISION: 1
\-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
\-- The CXX compiler identification is MSVC 19.29.30148.0
\-- The C compiler identification is MSVC 19.29.30148.0
\-- Detecting CXX compiler ABI info
\-- Detecting CXX compiler ABI info - done
\-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
\-- Detecting CXX compile features
\-- Detecting CXX compile features - done
\-- Detecting C compiler ABI info
\-- Detecting C compiler ABI info - done
\-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
\-- Detecting C compile features
\-- Detecting C compile features - done
\-- Found PythonInterp: C:/ProgramData/chocolatey/bin/python3.exe (found suitable exact version "3.9.10")
\-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
\-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
\-- Looking for pthread_create in pthreads
\-- Looking for pthread_create in pthreads - not found
\-- Looking for pthread_create in pthread
\-- Looking for pthread_create in pthread - not found
\-- Found Threads: TRUE
\-- IPO_ENABLED: False
\-- Compiler type MSVC: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
Required OpenSSL version: 1.1.1\*
Use OPENSSL_ROOT_DIR: C:\\Program Files\\OpenSSL-Win64\\bin
Attempt to find ArangoDB CI compiled OpenSSL:
\-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
System-wide attempt to find OpenSSL:
CMake Error at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY) (found
version "3.0.8")
Call Stack (most recent call first):
C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (\_FPHSA_FAILURE_MESSAGE)
C:/msys64/mingw64/share/cmake/Modules/FindOpenSSL.cmake:613 (find_package_handle_standard_args)
CMakeLists.txt:1202 (find_package)

\-- Configuring incomplete, errors occurred!
See also "C:/Users/BJ-X1/source/repos/arangodb/Build64/CMakeFiles/CMakeOutput.log".
See also "C:/Users/BJ-X1/source/repos/arangodb/Build64/CMakeFiles/CMakeError.log".\`

我认为仅仅解决这些错误是不够的,因为当我安装了 openssl 之后我得到了更多。因此,我想知道是否有关于如何在 Windows 上构建 ArangoDb 的更新指南或文档。或者可以帮助解决这个问题的东西。切换到 Linux 是否更好(这对我来说没问题,但对我的团队成员来说更糟)。

谢谢!

[编辑]

我设法构建了一个 .sln 文件,现在 visual stuio 看起来像这样: Screenshot of

我使用了这个命令:

cmake -G "Visual Studio 16 2019" -T "v142,host=x64" -DUSE_MAINTAINER_MODE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTATIC_EXECUTABLES=ON -DUSE_STRICT_OPENSSL_VERSION=OFF "-DOPENSSL_ROOT_DIR=C:/msys64/usr_YONABLE/" "-ECECUTABLE :FILEPATH=C:/Python311/python.exe" ..

这是 cmake 命令输出:

-- CMake version: 3.25.3
-- Found Git: C:/Program Files/Git/cmd/git.exe (found suitable version "2.39.1.windows.1", minimum required is "1.5.3")
-- ARANGODB PLAIN VERSION: 3.11.0
-- ARANGODB VERSION: 3.11.0-devel
-- ARANGODB JS VERSION: js
-- WINDOWS VERSION: 3.11.0-devel
-- SNAP REVISION: 1
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
-- The CXX compiler identification is MSVC 19.29.30148.0
-- The C compiler identification is MSVC 19.29.30148.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PythonInterp: C:/Python311/python.exe (found suitable exact version "3.11")
CMake Warning at cmake/CheckCompilerVersion.cmake:22 (message):
  MSVC compiler version C(19.29.30148.0)/C++(19.29.30148.0) is too old.  Need
  at least 19.32.
Call Stack (most recent call first):
  CMakeLists.txt:496 (CheckCompilerVersion)


-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Building for processor AMD64
-- Could NOT find FLEX (missing: FLEX_EXECUTABLE)
-- Could NOT find BISON (missing: BISON_EXECUTABLE)
-- IPO_ENABLED: False
-- Compiler type MSVC: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
Required OpenSSL version: 1.1.1*
Use OPENSSL_ROOT_DIR: C:/msys64/usr/
Attempt to find ArangoDB CI compiled OpenSSL:
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing:  OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
System-wide attempt to find OpenSSL:
-- Found OpenSSL: C:/msys64/mingw64/lib/libcrypto.a (found version "3.0.8")
C:/msys64/mingw64/include
-- Could NOT find Python (missing: Python_EXECUTABLE Interpreter)
CMake Deprecation Warning at 3rdParty/zlib/zlib-1.2.13/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Performing Test C_COMPILER_SUPPORTS_-Wno-suggest-override
-- Performing Test C_COMPILER_SUPPORTS_-Wno-suggest-override - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wno-sign-compare
-- Performing Test C_COMPILER_SUPPORTS_-Wno-sign-compare - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-suggest-override
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-suggest-override - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-sign-compare
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-sign-compare - Failed
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for windows.h
-- Looking for windows.h - found
-- Looking for zlibVersion in z
-- Looking for zlibVersion in z - not found
-- Looking for lzo1x_1_15_compress in lzo2
-- Looking for lzo1x_1_15_compress in lzo2 - not found
-- Looking for LZ4_compress_default in lz4
-- Looking for LZ4_compress_default in lz4 - not found
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX - Success
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2 - Success
-- Performing Test HAVE_CLANG_MAVX
-- Performing Test HAVE_CLANG_MAVX - Failed
-- Performing Test HAVE_CLANG_MBMI2
-- Performing Test HAVE_CLANG_MBMI2 - Failed
-- Performing Test SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS
-- Performing Test SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS - Failed
-- Performing Test HAVE_BUILTIN_EXPECT
-- Performing Test HAVE_BUILTIN_EXPECT - Failed
-- Performing Test HAVE_BUILTIN_CTZ
-- Performing Test HAVE_BUILTIN_CTZ - Failed
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE - Failed
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for sysconf
-- Looking for sysconf - not found
CMake Deprecation Warning at 3rdParty/V8/CMakeLists.txt:7 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Building V8 for Windows with MSBUILD
-- setting GYP_MSVS_VERSION to 2019
V8_LIBRARY_DEBUG C:/Users/BJ-X1/source/repos/opgDBv02/Build64/3rdParty/V8/gypfiles/Debug CMAKE_CURRENT_BINARY_DIR C:/Users/BJ-X1/source/repos/opgDBv02/Build64/3rdParty/V8
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17
-- Performing Test ABSL_INTERNAL_AT_LEAST_CXX17 - Success
-- Performing Test C_COMPILER_SUPPORTS_-Wno-unused-const-variable
-- Performing Test C_COMPILER_SUPPORTS_-Wno-unused-const-variable - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wno-mismatched-tags
-- Performing Test C_COMPILER_SUPPORTS_-Wno-mismatched-tags - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Wno-unused-function
-- Performing Test C_COMPILER_SUPPORTS_-Wno-unused-function - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-unused-const-variable
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-unused-const-variable - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-mismatched-tags
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-mismatched-tags - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-unused-function
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-unused-function - Failed
-- The following REQUIRED packages have been found:

 * Git (required version >= 1.5.3)
 * PythonInterp (required version == 3)
 * OpenSSL
 * Threads

-- The following features have been disabled:

 * GFLAGS, allows changing command line flags.
 * GLOG, provides logging configurability.
 * SHARED_LIBS, builds shared libraries instead of static.
 * PYTHON, provides python interface to S2

-- The following OPTIONAL packages have not been found:

 * FLEX
 * BISON
 * Python

GTEST_ROOT:
-- using 3rdParty BOOST
-- Require C++20
-- VelocyPack build mode: RelWithDebInfo
-- VelocyPack interprocedural optimizations: False
-- VelocyPack install base directory: C:/Program Files (x86)/arangodb3
-- Hardware support for SSE4.2 on this machine:
-- Compiler type MSVC: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
-- Building with SSE 4.2 optimizations enabled: ON
-- VelocyPack Building with hash type: xxhash
-- VelocyPack building bench performance test suite: OFF
-- VelocyPack building support programs and tools: OFF
-- VelocyPack building examples: OFF
-- VelocyPack building test suite: OFF
-- VelocyPack building large tests: OFF
-- VelocyPack building assembler test suite: OFF
CMake Deprecation Warning at 3rdParty/iresearch/CMakeLists.txt:7 (cmake_policy):
  The OLD behavior for policy CMP0074 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- IPO_ENABLED: False
-- gprof generation NOT AVAILABLE - Not a GNU compiler
-- target changed from "" to "auto"
-- Detected CPU: kaby-lake
-- Performing Test check_cxx_compiler_flag__arch_AVX2
-- Performing Test check_cxx_compiler_flag__arch_AVX2 - Failed
-- Performing Test check_cxx_compiler_flag__arch_AVX
-- Performing Test check_cxx_compiler_flag__arch_AVX - Failed
-- Performing Test check_cxx_compiler_flag__arch_SSE2
-- Performing Test check_cxx_compiler_flag__arch_SSE2 - Failed
-- Could NOT find BFD (missing:  BFD_INCLUDE_DIR BFD_SHARED_LIBS BFD_STATIC_LIBS BFD_INCLUDE_DIR_ANSIDECL BFD_INCLUDE_DIR_BFD BFD_SHARED_LIB BFD_STATIC_LIB BFD_STATIC_LIB_IBERTY BFD_STATIC_LIB_Z)
BFD_INCLUDE_DIR:
BFD_LIBRARY_DIR:
BFD_SHARED_LIBS:
BFD_STATIC_LIBS:
BFD_SHARED_LIB_RESOURCES:
CMake Deprecation Warning at 3rdParty/lz4/build/cmake/CMakeLists.txt:37 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Performing Test CFLAG_Wall
-- Performing Test CFLAG_Wall - Failed
-- Performing Test CFLAG_Wextra
-- Performing Test CFLAG_Wextra - Failed
-- Performing Test CFLAG_Wundef
-- Performing Test CFLAG_Wundef - Failed
-- Performing Test CFLAG_Wcast_qual
-- Performing Test CFLAG_Wcast_qual - Failed
-- Performing Test CFLAG_Wcast_align
-- Performing Test CFLAG_Wcast_align - Failed
-- Performing Test CFLAG_Wshadow
-- Performing Test CFLAG_Wshadow - Failed
-- Performing Test CFLAG_Wswitch_enum
-- Performing Test CFLAG_Wswitch_enum - Failed
-- Performing Test CFLAG_Wdeclaration_after_statement
-- Performing Test CFLAG_Wdeclaration_after_statement - Failed
-- Performing Test CFLAG_Wstrict_prototypes
-- Performing Test CFLAG_Wstrict_prototypes - Failed
-- Performing Test CFLAG_Wpointer_arith
-- Performing Test CFLAG_Wpointer_arith - Failed
-- Performing Test CFLAG_W4
-- Performing Test CFLAG_W4 - Failed
CMake Deprecation Warning at 3rdParty/iresearch/external/snowball/CMakeLists.txt:3 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Warning (dev) at C:/msys64/mingw64/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (Perl) does
  not match the name of the calling package (Snowball).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  C:/msys64/mingw64/share/cmake/Modules/FindPerl.cmake:84 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  3rdParty/iresearch/external/snowball/CMakeLists.txt:17 (INCLUDE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Perl: echo (found version "-V:version")
-- Performing Test SUPPORT_WALL
-- Performing Test SUPPORT_WALL - Failed
-- Performing Test SUPPORT_W
-- Performing Test SUPPORT_W - Failed
-- Performing Test SUPPORT_WPOINTER
-- Performing Test SUPPORT_WPOINTER - Failed
-- Performing Test SUPPORT_WPARAM
-- Performing Test SUPPORT_WPARAM - Failed
-- Performing Test SUPPORT_WFUNCTION
-- Performing Test SUPPORT_WFUNCTION - Failed
-- Performing Test SUPPORT_WUNUSED_VAR
-- Performing Test SUPPORT_WUNUSED_VAR - Failed
-- Performing Test SUPPORT_WPOINTER_SIGN
-- Performing Test SUPPORT_WPOINTER_SIGN - Failed
-- Performing Test SUPPORT_WSTRICT_PROTOTYPES
-- Performing Test SUPPORT_WSTRICT_PROTOTYPES - Failed
-- Performing Test SUPPORT_PEDANTIC_FLAG
-- Performing Test SUPPORT_PEDANTIC_FLAG - Failed
-- Performing Test SUPPORT_STD_FLAG
-- Performing Test SUPPORT_STD_FLAG - Failed
-- Performing Test SUPPORT_FPIC
-- Performing Test SUPPORT_FPIC - Failed
-- Could NOT find Unwind (missing:  Unwind_INCLUDE_DIR Unwind_SHARED_LIBS Unwind_STATIC_LIBS UNWIND_SHARED_LIBRARY_CORE UNWIND_STATIC_LIBRARY_CORE UNWIND_SHARED_LIBRARY_PLATFORM UNWIND_STATIC_LIBRARY_PLATFORM)
Unwind_INCLUDE_DIR: Unwind_INCLUDE_DIR-NOTFOUND
Unwind_LIBRARY_DIR:
Unwind_SHARED_LIBS:
Unwind_STATIC_LIBS:
Unwind_SHARED_LIB_RESOURCES:
LZMA shared library not found. Required if during linking the following errors are seen: undefined reference to `lzma_...
LZMA static library not found. Required if during linking the following errors are seen: undefined reference to `lzma_...
-- Performing Test HWY_EMSCRIPTEN
-- Performing Test HWY_EMSCRIPTEN - Failed
-- Using -std=c++17
CMake Deprecation Warning at 3rdParty/iresearch/external/fastText/CMakeLists.txt:9 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


Submodule path 'rocksdb': checked out 'a3d085c9e20126d462f998bb67172d943779a2b4'
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe
-- GFLAGS library is disabled
-- SNAPPY library is enabled
-- LZ4 library is enabled
-- ZLIB library is disabled
-- XPRESS is disabled
-- ZSTD library is disabled
-- JEMALLOC library is disabled
-- Enabling RTTI in all builds
-- Performing Test HAVE_FALLOCATE
-- Performing Test HAVE_FALLOCATE - Failed
-- Performing Test HAVE_SYNC_FILE_RANGE_WRITE
-- Performing Test HAVE_SYNC_FILE_RANGE_WRITE - Failed
-- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP
-- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP - Failed
-- Looking for malloc_usable_size
-- Looking for malloc_usable_size - not found
-- Looking for sched_getcpu
-- Looking for sched_getcpu - not found
-- Looking for getauxval
-- Looking for getauxval - not found
-- Looking for F_FULLFSYNC
-- Looking for F_FULLFSYNC - not found
-- ROCKSDB_PLUGINS:
-- ROCKSDB PLUGINS TO BUILD
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.39.1.windows.1")
fatal: no tag exactly matches 'a3d085c9e20126d462f998bb67172d943779a2b4'
-- JNI library is disabled
-- Performing Test C_COMPILER_SUPPORTS_-Wno-implicit-function-declaration
-- Performing Test C_COMPILER_SUPPORTS_-Wno-implicit-function-declaration - Failed
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-implicit-function-declaration
-- Performing Test CXX_COMPILER_SUPPORTS_-Wno-implicit-function-declaration - Failed
-- Check size of ssize_t
-- Check size of ssize_t - failed
Submodule path 'immer': checked out 'a814bcd5929dc6730f5d713a870fcb1e23af0bf2'
-- Found PkgConfig: C:/msys64/mingw64/bin/pkg-config.exe (found version "1.8.0")
-- Found GC library: BOEHM_GC_LIBRARIES-NOTFOUND
-- Could NOT find Boehm_GC (missing:  BOEHM_GC_LIBRARIES BOEHM_GC_INCLUDE_DIR)
-- Could NOT find Boost
-- Could not find ccache
Submodule path 'fmt': checked out 'a33701196adfad74917046096bf5a2aa0ab0bb50'
-- Module support is disabled.
-- Version: 9.1.0
-- Build type: RelWithDebInfo
-- CXX_STANDARD: 20
-- Required features: cxx_variadic_templates
-- extINFO -- arango-validation tests disabled
-- RELATIVE_ARANGO_ICON: resources\\arangodb.ico
-- ARANGO_IMG:  C:\\Users\\BJ-X1\\source\\repos\\opgDBv02\\Installation\\Windows\\Icons\\arangodb.bmp
-- ARANGO_ICON: C:\\Users\\BJ-X1\\source\\repos\\opgDBv02\\Installation\\Windows\\Icons\\arangodb.ico
-- W_SBIN_DIR: bin bin
-- W_BIN_DIR: bin bin
-- building for git revision: heads/devel-0-g85e3350244-dirty
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/BJ-X1/source/repos/opgDBv02/Build64

如您所见,仍然有很多“未找到警告”和“失败警告”。

c++ windows arangodb building
1个回答
1
投票

这是我在 Windows 上构建时使用的命令行:

cmake -G "Visual Studio 16 2019" -T "v142,host=x64" -DUSE_MAINTAINER_MODE=ON -DUSE_GOOGLE_TESTS=ON -DUSE_ENTERPRISE=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSKIP_PACKAGING=ON -DUSE_FAILURE_TESTS=ON -DSTATIC_EXECUTABLES=ON -DUSE_STRICT_OPENSSL_VERSION=OFF "-DOPENSSL_ROOT_DIR=C:\Program Files\OpenSSL-Win64" ..

对你来说最重要的选项是

OPENSSL_ROOT_DIR
因为它告诉 cmake 在哪里可以找到你的 OpenSSL 安装,所以你需要在这里输入你的路径。您可能还想将
USE_STRICT_OPENSSL_VERSION
设置为
OFF
,如本例所示。关于其他选项,大多数都是可选的。如果您想处理代码,对您来说最相关的选项是
USE_MAINTAINER_MODE
,它使用
TRI_ASSERT
宏启用额外的检查和断言。

© www.soinside.com 2019 - 2024. All rights reserved.