【问题标题】:Cmake doesn't find boost windowsCmake找不到提升窗口
【发布时间】:2019-12-18 00:50:26
【问题描述】:

我正在尝试运行此代码: https://github.com/snukky/news-translit-nmt

我已安装 boost 并收到以下消息:

The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

    C:\Program Files\boost\boost_1_67_0

The following directory should be added to linker library paths:

    C:\Program Files\boost\boost_1_67_0\stage\lib

根据@kenba 的评论,我添加了以下环境变量:

试试 1

当我尝试运行以下 cmd 时:

 cmake .. -DCMAKE_BUILD_TYPE=Release

我明白了:

-- Could NOT find Boost (missing: timer iostreams filesystem system chrono) (found version "1.67.0")
CMake Error at CMakeLists.txt:290 (message):
  Cannot find Boost libraries.  Terminating.


-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring incomplete, errors occurred!
See also "D:/ThesisResources/previous_works/news-translit-nmt-master/tools/marian-dev/build/CMakeFiles/CMakeOutput.log".

试试 2

当我尝试通过此 ref 进行自定义提升时
https://marian-nmt.github.io/docs/#custom-boost:

我运行以下命令:

 cmake .. -DBOOST_ROOT="C:\Program Files\boost\boost_1_67_0"

我得到同样的错误。

  • 我也尝试过使用 Linux WSL(但 CUDA 安装存在问题,他们的团队正在努力)、Linux VirtualBox(资源不足)和我安装的 Ubuntu 17.10(但 Cuda 需要 Ubuntu 16.04 / 18.04 )

我在这里缺少什么?我正在尝试任何建议,坚持了几天。谢谢!

编辑: 我重新安装了 Ubuntu 16.04,问题就解决了。仍然不知道如何在 Windows 中解决它,但我会继续使用 Ubuntu 16.04。

【问题讨论】:

  • 您需要设置BOOST_ROOTBOOST_LIBRARYDIR环境变量,以便cmake可以找到boost的头文件和库文件。
  • @kenba 请查看帖子编辑。我已经尝试了您的建议,但似乎无法解决我的问题
  • 您的 BOOST_LIBRARYDIRcmake 不正确。应该是 C:\Program Files\boost\boost_1_67_0\stage 而不是 C:\Program Files\boost\boost_1_67_0\stage\lib
  • 我重新安装了 Ubuntu 16.04,问题解决了。仍然不知道如何在 windows 中解决它,但我会继续使用 Ubuntu 16.04。

标签: c++ windows boost cmake deep-learning


【解决方案1】:

我之前在尝试构建 Windows 版本的 Marian NMT(与您遇到问题的组件相同)时遇到了这个问题。我不记得解决问题的确切步骤,但根本原因是 Windows 的 Marian NMT 构建不适用于较新版本的 Boost,因为源代码使用了一些已弃用的计时器和计时库调用约定(也许还有一些其他的)。

错误消息证实了这一点:它找不到 Boost,但另一方面它说它找到了您的版本 1.67.0。解决方案是使用旧版本的 boost,我已经确认它适用于 1.60.0。

如果您只需要在 Windows 中工作的 Marian NMT 解码器,我从事的一个项目发布了一个用于 Trados Studio 翻译工具的插件,其中包含一个已编译的适用于 Windows 的 marian-decoder 可执行文件:https://object.pouta.csc.fi/fiskmo/TradosStudio/FiskmoTranslationProvider.sdlplugin。您可以通过解压缩 sdlplugin 文件来访问可执行文件,StartMtPipe.bat 显示了如何使用解码器。

【讨论】:

    猜你喜欢
    • 2012-10-24
    • 1970-01-01
    • 1970-01-01
    • 2017-06-28
    • 1970-01-01
    • 2016-04-18
    • 1970-01-01
    • 2021-02-05
    • 1970-01-01
    相关资源
    最近更新 更多