1

我正在尝试在我的 Mac 上安装Simple Encrypted Arithmetic Library (SEAL) v2.3.1(运行 MacOS High Sierra 版本 10.13.6)。

我按照 INSTALL.txt 中的说明进行操作,在尝试构建 SEALExamples 时,运行 cmake 时遇到错误。终端输出如下:

Rachels-MacBook-Pro:SEALExamples rachelplayer$ cmake .
-- SEAL detected (version 2.3.1)
-- SEAL build type: Release
-- SEAL debug mode: OFF
-- SEAL using Microsoft GSL: OFF
-- Configuring done
CMake Error at CMakeLists.txt:8 (add_executable):
Target "sealexamples" links to target "Threads::Threads" but the 
target was not found. Perhaps a find_package() call is missing 
for an IMPORTED target, or an ALIAS target is missing?

请问你能告诉我如何解决它吗?我不确定这是一般错误还是只是我的计算机。谢谢!

4

1 回答 1

1

这是 SEAL/cmake/SEALConfig.cmake.in 中的错误。要快速修复,请将以下内容添加到文件的开头:

include(CMakeFindDependencyMacro)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_dependency(Threads REQUIRED)

然后重新配置、构建和重新安装 SEAL 并重新构建 SEALExamples。

于 2018-08-24T15:46:51.900 回答