问题描述
我正在按照SWI-Prolog网站上的安装说明进行操作。我在Linux机器上。
首先,我将存储库git-clone并克隆到swipl-devel中。
接下来,我运行命令:
git submodule update --init
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="${install_under}/swipl" -G Ninja ..
ninja
一切顺利。
接下来,当我运行ctest -j 4
时,我会回来:
98% tests passed,1 tests Failed out of 66
Total Test time (real) = 15.23 sec
The following tests Failed:
24 - swipl:xsb/nonmt_tests (Failed)
Errors while running CTest
然后我成为root并运行ninja install
。这是我回来的东西:
[12/13] Install the project...
-- Install configuration: "RelWithDebInfo"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux/libswipl.so.8.3.6" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
-- Set runtime path of "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/bin/x86_64-linux/swipl-ld" to "/home/nick/prolog/swipl-devel/build/install_under: command not found/swipl/lib/swipl/lib/x86_64-linux"
CMake Error at src/cmake_install.cmake:509 (EXECUTE_PROCESS):
EXECUTE_PROCESS given unkNown argument "command".
Call Stack (most recent call first):
cmake_install.cmake:70 (include)
Failed: CMakeFiles/install.util
cd /home/nick/prolog/swipl-devel/build && /usr/bin/cmake -P cmake_install.cmake
ninja: build stopped: subcommand Failed.
我不确定我缺少什么。
解决方法
确实有问题。
我从未经历过swipl:xsb/nonmt_tests
测试失败(无论它们是什么)。
运行上述命令时,shell变量install_under
是否设置正确?
例如,我总是安装在/usr/local/logic/swipl
之类的目录下,因此在这里您必须说
-DCMAKE_INSTALL_PREFIX=/usr/local/logic/swipl
或
export install_under=/usr/local/logic/
根据您的情况(不确定是否需要导出,它会设置环境变量)。