Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local install failing #27

Closed
n-batalha opened this issue Apr 7, 2014 · 10 comments
Closed

Local install failing #27

n-batalha opened this issue Apr 7, 2014 · 10 comments
Labels

Comments

@n-batalha
Copy link

I am replicating the install-luajit+torch script for my distro (Gentoo), but it seems to want to install in root regardless of using --local.

Not cmake literate so not sure if these lines mean it's an expected behaviour:

TorchConfig.cmake.in:

# This (ugly) setup assumes:
#  CMAKE_PREFIX_PATH = LUA_BINDIR
#  CMAKE_INSTALL_PREFIX = PREFIX

If not, sundown, cwrap and paths install fine, and here is my in/output:

export $(eval ``luarocks path``)
export CMAKE_LIBRARY_PATH=/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.3/

lua_modules=('sundown' 'cwrap' 'paths' 'torch')

for i in "${lua_modules[@]}"
do
   luarocks --local --server=https://raw.github.com/torch/rocks/master install $i || (echo "Error occurred"; break)
echo 
done
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/share/cmake/torch/TorchExports.cmake
CMake Error at cmake_install.cmake:48 (FILE):
  file INSTALL cannot copy file
  "/tmp/luarocks_torch-scm-1-9869/torch7/build/CMakeFiles/Export/share/cmake/torch/TorchExports.cmake"
  to "/usr/share/cmake/torch/TorchExports.cmake".
@andresy
Copy link
Member

andresy commented Apr 7, 2014

Hi,

Which version of luarocks do you have? Did you try with the luajit+luarocks provided in there:
https://github.com/torch/luajit-rocks
?

Cheers,
Ronan

@n-batalha
Copy link
Author

Hello,

Yeah, should had mentioned! luarocks 2.0.12 (and luajit 2.0.2).

I might try that, didn't find it on the install-deps and according to the wiki: "only requires LuaJIT (>= 2.0) and Luarocks (>= 2.0.12)", but could be outdated.

(Might take some time to try, by making a clean gentoo ebuild)

@n-batalha
Copy link
Author

Did as above, and is similar:

-- Install configuration: "Release"
CMake Error at cmake_install.cmake:48 (FILE):
  file cannot create directory: /usr/local/share/cmake/torch.  Maybe need
  administrative privileges.


make: *** [install] Error 1

Error: Build error: Failed installing.

Without --local also fails, but should be a separate issue (appears to use hardcoded/non-$LUA_PATH dirs, which on other distros might coincide).

@soumith
Copy link
Member

soumith commented Apr 8, 2014

hey, how did you install torch? It looks like it installs the repos relative to the torch dir. Did you try using the ezinstall script as is, except for changing the apt-get calls to gentoo-equivalents?

@n-batalha
Copy link
Author

Well the install-deps script has been replicated in Gentoo form as is, just replacing by gentoo equivalents.

As for the install-script, I also replicated it (see first post). It just sets CMAKE_LIBRARY_PATH, PREFIX and installs luajit-rocks.git before pulling torch etc. I ommited a couple of different PREFIX I tried, makes no difference.

I was just avoiding luajit-rocks and a system install, but now also tried those.

@andresy
Copy link
Member

andresy commented Apr 8, 2014

@koraykv @clementfarabet : do you remember some problems with --local?

@clementfarabet
Copy link
Member

I never use --local. I usually make a entirely local install, using PREFIX:

curl -s https://raw.github.com/torch/ezinstall/master/install-luajit+torch | PREFIX=~/local bash

There could be some problems with --local, I'd have to try that.

@danielhers
Copy link

@clementfarabet It still asks for a password for sudo this way.

@koraykv
Copy link
Member

koraykv commented Apr 22, 2014

I have to try, we use --local all the time, but we have our own script :)

@soumith soumith added the bug label Apr 22, 2014
@soumith
Copy link
Member

soumith commented Apr 6, 2015

the https://github.com/torch/distro approach is completely local install. closing the task.

@soumith soumith closed this as completed Apr 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants