警告:此LuaRocks安装未跟踪file.lua [英] Warning: file.lua is not tracked by this installation of LuaRocks

查看:132
本文介绍了警告:此LuaRocks安装未跟踪file.lua的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装名为 stn 的luarocks软件包.官方的安装方法是运行:

I am trying to install a luarocks package called stn. The official way of installing it is by running:

luarocks install https://raw.githubusercontent.com/qassemoquab/stnbhwd/master/stnbhwd-scm-1.rockspec

但这给了我一个不幸的,加剧的错误:

But this gives me the unfortunate, exacerbating error:

nvcc fatal   : Value 'sm_20' is not defined for option 'gpu-architecture'

据我所知,解决此问题的唯一方法是手动更改 CMakeLists.txt 文件:

The only way to fix this, to my knowledge, is to manually change the CMakeLists.txt file from:

IF (CUDA_FOUND)
  LIST(APPEND CUDA_NVCC_FLAGS "-arch=sm_20")

收件人:

IF (CUDA_FOUND)
  LIST(APPEND CUDA_NVCC_FLAGS "-arch=sm_30")

所以这意味着我必须将存储库克隆到本地文件中,更改CMakeLists文件,然后luarock制作它. (作为免责声明,要执行此操作,由于目录写入权限的限制,我不得不chown我的整个用户似乎出于任何原因似乎都没有.我怎么搞砸了?).

So that meant I had to clone the repo into a local file, change the CMakeLists file, and then luarock make it. (As a disclaimer, to do this, I had to chown my entire user because of directory writing permissions luarocks just doesnt seem to have for whatever reason. How screwed am I?).

因此,我可以通过将其指向主目录并通过以下方式来安装.rockspec文件:

So, I was able to get it to install the .rockspec file by cding into the master directory and:

luarocks make stnbhwd-scm-1.rockspec

这给了我这个输出:

$ luarocks make stnbhwd-scm-1.rockspec 
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/tex/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1" && make

-- Found Torch7 in /home/tex/torch/install
-- Compiling with OpenMP support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tex/Downloads/stnbhwd-master/build
[ 50%] Built target stn
[ 75%] Building NVCC (Device) object CMakeFiles/custn.dir/custn_generated_init.cu.o
CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THStorageCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCStorage.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCStorageCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensor.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorRandom.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorMath.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorConv.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THTensorLapack.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensor.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorCopy.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorRandom.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMath.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathBlas.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathMagma.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathPairwise.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathPointwise.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathReduce.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathCompare.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathCompareT.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMathScan.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMasked.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorScatterGather.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorIndex.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorSort.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorMode.h


CMake Warning at /usr/share/cmake-3.5/Modules/FindCUDA/make2cmake.cmake:65 (message):
   Removing non-existent dependency file: generic/THCTensorTopK.h


[100%] Linking CXX shared module libcustn.so
[100%] Built target custn
cd build && make install
[ 50%] Built target stn
[100%] Built target custn
Install the project...
-- Install configuration: "Release"
-- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lib/libstn.so
-- Set runtime path of "/home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lib/libstn.so" to "$ORIGIN/../lib:/home/tex/torch/install/lib"
-- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lua/stn/test.lua
-- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lua/stn/AffineGridGeneratorBHWD.lua
-- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lua/stn/AffineTransformMatrixGenerator.lua
-- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lua/stn/init.lua
-- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lua/stn/BilinearSamplerBHWD.lua
-- Installing: /home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lib/libcustn.so
-- Set runtime path of "/home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lib/libcustn.so" to "$ORIGIN/../lib:/home/tex/torch/install/lib"
Warning: /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/init.lua is not tracked by this installation of LuaRocks. Moving it to /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/init.lua~~~~~~
Warning: /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/AffineTransformMatrixGenerator.lua is not tracked by this installation of LuaRocks. Moving it to /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/AffineTransformMatrixGenerator.lua~~~~~~
Warning: /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/BilinearSamplerBHWD.lua is not tracked by this installation of LuaRocks. Moving it to /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/BilinearSamplerBHWD.lua~~~~~~
Warning: /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/test.lua is not tracked by this installation of LuaRocks. Moving it to /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/test.lua~~~~~~
Warning: /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/AffineGridGeneratorBHWD.lua is not tracked by this installation of LuaRocks. Moving it to /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/AffineGridGeneratorBHWD.lua~~~~~~
Warning: /home/tex/torch/install/lib/lua/5.1/stnbhwd_scm_1-libstn.so is not tracked by this installation of LuaRocks. Moving it to /home/tex/torch/install/lib/lua/5.1/stnbhwd_scm_1-libstn.so~~~~~~
Warning: /home/tex/torch/install/lib/lua/5.1/stnbhwd_scm_1-libcustn.so is not tracked by this installation of LuaRocks. Moving it to /home/tex/torch/install/lib/lua/5.1/stnbhwd_scm_1-libcustn.so~~~~~
stnbhwd scm-1 is now installed in /home/tex/torch/install/ (license: MIT)

请注意警告"标志.我不知道为什么会这样做,但是我认为它对安装有明显的影响,因为当我加载stn ...时:

Pay attention to the "warning" flags. I don't know why it does that, but I think it has some clear effect on the install, because when I load stn...:

Failed loading module stn in LuaRocks rock stnbhwd scm-1
    no field package.preload['stn']
    no file '/home/tex/.luarocks/share/lua/5.1/stn.lua'
    no file '/home/tex/.luarocks/share/lua/5.1/stn/init.lua'
    no file '/home/tex/torch/install/share/lua/5.1/stn.lua'
    no file '/home/tex/torch/install/share/lua/5.1/stn/init.lua'
    no file './stn.lua'
    no file '/home/tex/torch/install/share/luajit-2.1.0-beta1/stn.lua'
    no file '/usr/local/share/lua/5.1/stn.lua'
    no file '/usr/local/share/lua/5.1/stn/init.lua'
    no file '/home/tex/.luarocks/lib/lua/5.1/stn.so'
    no file '/home/tex/torch/install/lib/lua/5.1/stn.so'
    no file '/home/tex/torch/install/lib/stn.so'
    no file './stn.so'
    no file '/usr/local/lib/lua/5.1/stn.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
    [C]: in function 'error'
    /home/tex/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
    run_model.lua:6: in main chunk
    [C]: in function 'dofile'
    .../tex/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
    [C]: at 0x00405d50

叹气?有人知道解决方法吗?有解决方法吗? LuaRocks仍可用于安装软件包,但也许我在安装本地软件包时做错了.有没有办法在安装前更改cmake文件的同时安装stn软件包(而不是下载软件包并以这种方式手动更改)?我对此表示怀疑,但是...:(

sigh Does anyone know a fix? Is there a workaround? LuaRocks still works for installing packages, but maybe I am doing something wrong for installing local packages. Is there a way to install the stn package while changing the cmake file before it installs (instead of downloading the package and manually changing it that way)? I doubt it, but... :(

任何阅读此内容的人,请参考此页面.我本质上说了这件事,然后将编辑后的仓库上传到我自己的github页面上.现在,我面临另一个错误.

anyone reading this, please refer to this page. I essentialy said screw this and uploaded the edited repo onto my own github page. Now, I face a different error.

推荐答案

我可以看到路径不匹配.在安装stnbhwd时,请使用前缀:

I can see some mismatch in the paths. When you are installing stnbhwd you use prefix:

-DCMAKE_INSTALL_PREFIX="/home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1"

但请注意您收到的警告:

but looking to the warnings you get:

Warning: /home/tex/torch/install/share/lua/5.1/stnbhwd_scm_1-stn/init.lua is not tracked by this installation of LuaRocks

显示您的LUA_PATH,LUA_CPATH设置为

Shows that your LUA_PATH, LUA_CPATH is set to

/home/tex/torch/install/share/lua/5.1

首先,尝试在前缀中使用的路径添加到 LUA_PATH,LUA_CPATH

Firstly, try the path that you used in prefix to add into LUA_PATH, LUA_CPATH

如果这样做没有帮助,请尝试在Lua脚本中指定路径:

If that doesn't help try to specify the path in the Lua script:

-- add a new directory to the path
package.path = package.path .. ";/home/tex/torch/install/lib/luarocks/rocks/stnbhwd/scm-1/lua/stn/?.lua" 

Alos,选中一个

这篇关于警告:此LuaRocks安装未跟踪file.lua的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆