我正试图在linux上安装手电筒。但是,当我试图运行luarocks install fbtorch时,我会得到以下错误。
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/user/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/user/torch/install/lib/luarocks/rocks/fbtorch/scm-1"
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Torch7 in /home/user/torch/install
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
REQUIRED_ARGS (missing: FOLLY_INCLUDE_DIR FOLLY_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/FindFolly.cmake:23 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:12 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_fbtorch-scm-1-4920/fbtorch/build/CMakeFiles/CMakeOutput.log".现在,为了修复REQUIRED_ARGS (missing: FOLLY_INCLUDE_DIR FOLLY_LIBRARIES),我将cmake命令更改为:
cmake -E make_directory build && cd build && cmake .. -DFOLLY_LIBRARIES="/home/user/local/lib" -DFOLLY_INCLUDE_DIR="/home/user/local/include" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$(LUA_BINDIR)/.." -DCMAKE_INSTALL_PREFIX="$(PREFIX)"请注意,我已经在适当的目录中编译并在愚昧上安装了
/home/user/local/。
这修复了FOLLY_INCLUDE_DIR错误,但它仍然显示FOLLY_LIBRARIES的错误,如下所示:
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
REQUIRED_ARGS (missing: FOLLY_LIBRARIES)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/FindFolly.cmake:23 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:12 (FIND_PACKAGE)我在这里错过了什么?为什么cmake识别FOLLY_INCLUDE_DIR的缓存条目,而不识别FOLLY_LIBRARIES的缓存条目?
发布于 2017-11-22 08:11:53
find_package()调用中“遗漏”列表中列出的变量是,而不是缓存。因此,设置相同名称的缓存变量可能无法解决问题。
如果搜索包实际上安装到非标准位置,则最好是提示关于该位置的“查找”脚本,而不是盲目设置“缺失”变量。
许多“查找”脚本在代码开始时描述了参数化的可能方式。除此之外,还有一些常见的方法可以提示“查找”包的实际位置;这些方法适用于大多数脚本。例如,您可以将包的安装位置添加到CMAKE_PREFIX_PATH变量中(参见那个问题)。
发布于 2017-11-22 06:41:40
如果你看看FindFolly.cmake,你就能看到-
SET(FOLLY_LIBRARIES ${FOLLY_LIBRARY})这意味着正在设置FOLLY_LIBRARIES,但它需要FOLLY_LIBRARY。
因此,在命令行中,将-DFOLLY_LIBRARIES更改为-DFOLLY_LIBRARY
https://stackoverflow.com/questions/47427906
复制相似问题