微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

CMake 错误:找不到 Boost缺少:系统文件系统线程日志语言环境正则表达式 chrono atomic date_time找到版本“1.75.0”

如何解决CMake 错误:找不到 Boost缺少:系统文件系统线程日志语言环境正则表达式 chrono atomic date_time找到版本“1.75.0”

我正在尝试从 GitHub 构建和运行一个 c++ 程序,尽管我一直遇到可能与 Cmake 和 boost 库有关的问题。这是我第一次尝试构建程序,所以可能有一些明显的缺失。

有问题的程序来自以下 GitHub 存储库:https://github.com/antimix/PrusaSlicer。我正在以管理员身份打开 Visual Studio Code 文件夹(以删除其他一些错误),并安装了 Cmake 和 Cmake 工具扩展。我已经从以下站点安装了 1.75.0 Boost:https://boost.teeks99.com/。从 Visual Code 终端,我收到以下错误

[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[cmake]   Could NOT find Boost (missing: system filesystem thread log locale regex
[cmake]   chrono atomic date_time) (found version "1.75.0")
[cmake] Call Stack (most recent call first):
[cmake]   C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
[cmake]   C:/Program Files/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2344 (find_package_handle_standard_args)
[cmake]   CMakeLists.txt:266 (find_package)

这里是完整的日志:

[variant] Loaded new set of variants
[kit] Successfully loaded 8 kits from C:\Users\*user*\AppData\Local\CMaketools\cmake-tools-kits.json
[main] Configuring folder: PrusaSlicer-dribbling_2.2.0 
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" "-Hc:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0" "-Bc:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build" -G "Visual Studio 16 2019" -T host=x64 -A win32
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE "-Hc:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0" "-Bc:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build" -G "Visual Studio 16 2019" -T host=x64 -A win32
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
[cmake] -- SLIC3R_ASAN: OFF
[cmake] -- SLIC3R_BUILD_SANDBoxES: OFF
[cmake] -- SLIC3R_BUILD_TESTS: ON
[cmake] -- SLIC3R_FHS: OFF
[cmake] -- SLIC3R_GTK: 2
[cmake] -- SLIC3R_GUI: ON
[cmake] -- SLIC3R_MSVC_COMPILE_ParaLLEL: ON
[cmake] -- SLIC3R_MSVC_PDB: ON
[cmake] -- SLIC3R_PCH: ON
[cmake] -- SLIC3R_PERL_XS: OFF
[cmake] Building without Win10 Netfabb STL fixing service support
[cmake] -- SLIC3R_PROFILE: OFF
[cmake] -- SLIC3R_STATIC: ON
[cmake] -- SLIC3R_WX_STABLE: ON
[cmake] -- SLIC3R_STATIC: ON
[cmake] -- CMAKE_PREFIX_PATH: (default)
[cmake] CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
[cmake]   Could NOT find Boost (missing: system filesystem thread log locale regex
[cmake]   chrono atomic date_time) (found version "1.75.0")
[cmake] Call Stack (most recent call first):
[cmake]   C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
[cmake]   C:/Program Files/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2344 (find_package_handle_standard_args)
[cmake]   CMakeLists.txt:266 (find_package)
[cmake] 
[cmake] 
[cmake] -- Configuring incomplete,errors occurred!
[cmake] See also "C:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "C:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build/CMakeFiles/CMakeError.log".

此外,如果感兴趣,这里是终端谈论的两个日志:

CMakeOutput.log

    The system is: Windows - 10.0.18363 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler:  
Build flags: 
Id flags:  

The output was:
0
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
copyright (C) Microsoft Corporation. All rights reserved.

Build started 21-02-2021 22:55:20.
Project "C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\3.20.0-rc1\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "Debug\".
  Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
  Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX64\x86\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TC /analyze- /FC /errorReport:queue CMakeCCompilerId.c
  CMakeCCompilerId.c
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX64\x86\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOlogo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYstem:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCCompilerId.obj
  CompilerIdC.vcxproj -> C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\3.20.0-rc1\CompilerIdC\CompilerIdC.exe
PostBuildEvent:
  for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i
  :VCEnd
  CMAKE_C_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x86\cl.exe
FinalizeBuildStatus:
  Deleting file "Debug\CompilerIdC.tlog\unsuccessfulbuild".
  Touching "Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate".
Done Building Project "C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\3.20.0-rc1\CompilerIdC\CompilerIdC.vcxproj" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.39


Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe"

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj"

The C compiler identification is MSVC,found in "C:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build/CMakeFiles/3.20.0-rc1/CompilerIdC/CompilerIdC.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler:  
Build flags: 
Id flags:  

The output was:
0
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
copyright (C) Microsoft Corporation. All rights reserved.

Build started 21-02-2021 22:55:21.
Project "C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\3.20.0-rc1\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "Debug\".
  Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
  Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX64\x86\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc142.pdb" /Gd /TP /analyze- /FC /errorReport:queue CMakeCXXCompilerId.cpp
  CMakeCXXCompilerId.cpp
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX64\x86\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOlogo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYstem:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCXXCompilerId.obj
  CompilerIdCXX.vcxproj -> C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\3.20.0-rc1\CompilerIdCXX\CompilerIdCXX.exe
PostBuildEvent:
  for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i
  :VCEnd
  CMAKE_CXX_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x86\cl.exe
FinalizeBuildStatus:
  Deleting file "Debug\CompilerIdCXX.tlog\unsuccessfulbuild".
  Touching "Debug\CompilerIdCXX.tlog\CompilerIdCXX.lastbuildstate".
Done Building Project "C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\3.20.0-rc1\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.11


Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe"

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.vcxproj"

The CXX compiler identification is MSVC,found in "C:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build/CMakeFiles/3.20.0-rc1/CompilerIdCXX/CompilerIdCXX.exe"

Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Current/Bin/MSBuild.exe cmTC_e9c90.vcxproj /p:Configuration=Debug /p:Platform=win32 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework

copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x86

  copyright (C) Microsoft Corporation.  All rights reserved.

  CMakeCCompilerABI.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_e9c90.dir\Debug\\" /Fd"cmTC_e9c90.dir\Debug\vc142.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Program Files\CMake\share\cmake-3.20\Modules\CMakeCCompilerABI.c"

  cmTC_e9c90.vcxproj -> C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\CMakeTmp\Debug\cmTC_e9c90.exe




Detecting CXX compiler ABI info compiled with the following output:
Change Dir: C:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Current/Bin/MSBuild.exe cmTC_65605.vcxproj /p:Configuration=Debug /p:Platform=win32 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework

copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x86

  copyright (C) Microsoft Corporation.  All rights reserved.

  CMakeCXXCompilerABI.cpp

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_65605.dir\Debug\\" /Fd"cmTC_65605.dir\Debug\vc142.pdb" /Gd /TP /analyze- /errorReport:queue "C:\Program Files\CMake\share\cmake-3.20\Modules\CMakeCXXCompilerABI.cpp"

  cmTC_65605.vcxproj -> C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\CMakeTmp\Debug\cmTC_65605.exe

CMakeError.log

Determining if the include file pthread.h exists Failed with the following output:
Change Dir: C:/Program Files/Prusa3D/PrusaSlicer-dribbling_2.2.0/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Current/Bin/MSBuild.exe cmTC_3680a.vcxproj /p:Configuration=Debug /p:Platform=win32 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework

copyright (C) Microsoft Corporation. All rights reserved.



  Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x86

  copyright (C) Microsoft Corporation.  All rights reserved.

  CheckIncludeFile.c

  cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_3680a.dir\Debug\\" /Fd"cmTC_3680a.dir\Debug\vc142.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c"

C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1,10): Fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Program Files\Prusa3D\PrusaSlicer-dribbling_2.2.0\build\CMakeFiles\CMakeTmp\cmTC_3680a.vcxproj]

我环顾了一些不同的线程以找到解决方案,但没有运气。他们中的大多数都是围绕为Boost设置系统环境变量,但似乎Cmake给出了一个消息,它忽略了这个变量。我还发现一个线程建议在 CMakeLists.txt 中添加一行以在加载库之前设置提升路径(据我所知),但不幸的是,这些事情都没有帮助。

希望你们中的一些人对这个令人头疼的问题有一个解决方案......

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?