首页 > 解决方案 > 如何在 Ubuntu 18.04 上编译 pmars-0.9.2?错误:Makefile:116:目标“全部”的配方失败

问题描述

我正在尝试编译 pmars-0.9.2 游戏,但在通过测试时偶然发现了一个错误,在命令之后make -j4

make[2]: *** [extractor/CMakeFiles/extractor.dir/backoff_sampler.cc.o] Error 1 CMakeFiles/Makefile2:2561: recipe for target 'extractor/CMakeFiles/extractor.dir/all' failed make[1]: *** [extractor/CMakeFiles/extractor.dir/all] Error 2 Makefile:116: recipe for target 'all' failed make: *** [all] Error 2

您能告诉我缺少哪些安装驱动程序才能成功完成编译吗?

标签: ubuntu-18.04

解决方案


要从解压缩的归档使用命令查看日志:

nano /home/user/Desktop/pmars-0.9.2/cdec/BUILDING


要构建 cdec,您需要:

  • boost headers & boost program_options (你可能需要安装像 libboost-dev 这样的包)

搭建说明

1)创建构建目录并使用CMake生成Makefiles

    mkdir my_build
    cd my_build
    cmake ..

If the cmake command completes successfully, you can proceed. If you have
libraries (such as Boost) installed in nonstandard locations, you may need
to run cmake with special options like -DBOOST_ROOT=/path/to/boost.

2) 构建

    make -j 2

3) 测试 make test ./tests/run-system-tests.pl



推荐阅读