大家好,我正在做我的本科生小组作业,我的任务是构建ArangoDB的fork,我们还没有对它做任何更改,因为我需要能够首先构建它。而且我从来没有构建过一个大的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社区,我已经尝试安装chocolatey以及MSYS 2和vcpkg的依赖项。
安装依赖项后,我尝试在ArangoDB源目录中创建的名为“Build 64”的目录中运行“$ 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是否更好(这对我来说是可以的,但对我的团队成员来说更糟)。
谢谢!
1条答案
按热度按时间4nkexdtk1#
下面是我在Windows上构建时使用的命令行:
对您来说最重要的选项是
OPENSSL_ROOT_DIR
,因为它告诉cmake在哪里可以找到OpenSSL安装,所以你需要在这里输入你的路径。你可能还想把USE_STRICT_OPENSSL_VERSION
设置为OFF
,就像这个例子一样。至于其他的选项,大部分都是可选的。如果您想处理代码,最相关的选项是USE_MAINTAINER_MODE
,它使用TRI_ASSERT
宏启用附加检查和Assert。