Giter VIP home page Giter VIP logo

paths's Introduction

THIS REPOSITORY IS DEPRECEATED.

Please use https://github.com/torch/torch7

For install scripts, please look at: https://github.com/torch/ezinstall

Torch7 Library.

Torch7 provides a Matlab-like environment for state-of-the-art machine learning algorithms. It is easy to use and provides a very efficient implementation, thanks to an easy and fast scripting language (Lua) and a underlying C implementation.

In order to install Torch7 you can follow these simple instructions, but we suggest reading the detailed manual at http://www.torch.ch/manual/install/index

Requirements

  • C/C++ compiler
  • cmake
  • gnuplot
  • git

Optional

  • Readline
  • QT (QT4.8 is now supported)
  • CBLAS
  • LAPACK

Installation

$ git clone git://github.com/andresy/torch.git
$ cd torch
$ mkdir build
$ cd build

$ cmake .. 
OR
$ cmake .. -DCMAKE_INSTALL_PREFIX=/my/install/path

$make install

Running

$torch
Type help() for more info
Torch 7.0  Copyright (C) 2001-2011 Idiap, NEC Labs, NYU
Lua 5.1  Copyright (C) 1994-2008 Lua.org, PUC-Rio
t7> 

3rd Party Packages

Torch7 comes with a package manager based on Luarocks. With it it's easy to install new packages:

$ torch-rocks install image
$ torch-rocks list
$ torch-rocks search --all

Documentation

The full documentation is installed in /my/install/path/share/torch/html/index.html

Also, http://www.torch.ch/manual/index points to the latest documentation of Torch7.

paths's People

Contributors

andresy avatar btnc avatar clementfarabet avatar heinrichhartmann avatar koraykv avatar leonbottou avatar linusu avatar nicholas-leonard avatar samehkhamis avatar soumith avatar zakattacktwitter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paths's Issues

Change LuaRocks spec url to https

Hi

I'm working behind a corporate firewall which restricts SSH traffic. Therefore

luarocks install --server=https://luarocks.org/dev paths

fails at git clone. I guess, it would be easy fixable by changing the git url to https. I believe that drawbacks of doing so would be neglectable, but people like me would greatly benefit from it.

I tried to run LuaRocks against a local spec file using https. git clone succeeded, but LuaRocks failed afterwards. Thus, I'm not sure whether it can really that easily be changed. Maybe it can't or maybe LuaRocks behaves slightly different with local spec files as opposed to "official ones" on the internet

luarocks bad interpreter: no such file or directory

I was trying to use DeepMind's Atari-Deep-Q-Learner project. Since it requires some other dependencies, so after I install them, I copied install dependencies into my torch install directory with
"cp -r ~/codes/torch/DeepMind-Atari-Deep-Q-Learner-master/torch/* ~/torch/install/".
After this, Deep-Q-Learning was fine to run, but when I tried to use command "luarocks", I got error like this:
"bash: /root/torch/install/bin/luarocks: /root/codes/DeepMind-Atari-Deep-Q-Learner-master/torch/bin/luajit: bad interpreter: No such file or directory."
As you can see, the first path is right, but I have no idea why the second path comes out, the path should be "/root/codes/torch/DeepMind-Atari-Deep-Q-Learner-master/torch/bin/luajit" rather than missing "/torch/" directory. But I don't know how to fix it. I don't know where to configure the "luarocks" path, I can't find it in ".bashrc", "/etc/profile" or other bash files. Could some one help? Thanks. I just wanna to remove the second path or fix it to the right path.

undefined symbol: lua_replace

Good morning, or other time of day.
There was simular problem in this issues. #17
But suggested methods wasn't helpful.
I use Mangaro and emacs.
If i try compile some file which require torch, i have this messege:

error loading module 'libpaths' from file '/home/kimal/torch/install/lib/lua/5.1/libpaths.so':
/home/kimal/torch/install/lib/lua/5.1/libpaths.so: undefined symbol: lua_replace
stack traceback:
[C]: in ?
[C]: in function 'require'
/home/kimal/torch/install/share/lua/5.1/paths/init.lua:1: in main chunk
[C]: in function 'require'
/home/kimal/torch/install/share/lua/5.1/torch/init.lua:12: in main chunk

Can you help me?

installation: error loading module 'libpaths'

I installed Torch and DP, but I am getting this error whenever I try to use DP (Torch works):

require 'dp'
error loading module 'libpaths' from file '.../torch/install/lib/lua/5.1/libpaths.so':
.../torch/install/lib/lua/5.1/libpaths.so: undefined symbol: lua_replace
stack traceback:
[C]: in ?
[C]: in function 'require'
.../torch/install/share/lua/5.1/paths/init.lua:1: in main chunk
[C]: in function 'require'
.../torch/install/share/lua/5.1/torch/init.lua:12: in main chunk
[C]: in function 'require'
.../torch/install/share/lua/5.1/nnx/init.lua:28: in main chunk
[C]: in function 'require'
.../torch/install/share/lua/5.1/dp/init.lua:1: in main chunk
[C]: in function 'require'
stdin:1: in main chunk
[C]: in ?

Since libpaths.so is a binary file, it is impossible to detect why lua_replace is an undefined symbol. Any idea how I could solve this?

Thank you in advance!

Non-standard symbols in path

Reproducible example (on *nix/MacOS):

mkdir test_dir
touch test_dir/good_file.txt
touch test_dir/bad_\\trash.txt
th
th> for f in paths.iterfiles('./test_dir') do
..> print(f)
..> end

Output: good_file.txt only.

ls works correctly:

ls test_dir
> bad_\trash.txt good_file.txt

Fails to build

Using Windows 8.1
cmake version 3.3.0-rc4
luarocks-2.2.2-win32
luajit 2.0.4

Log:

C:\Users\Testificate\Desktop\luarocks\2.2>luarocks --server=https://raw.github.com/torch/rocks/master install paths
Installing https://raw.github.com/torch/rocks/master/paths-scm-1.rockspec...
Using https://raw.github.com/torch/rocks/master/paths-scm-1.rockspec... switching to 'build' mode
Cloning into 'paths'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 10 (delta 0), reused 5 (delta 0), pack-reused 0
Receiving objects: 100% (10/10), 12.81 KiB | 0 bytes/s, done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUALIB=lua51.lib -DLUA_INCDIR="C:/Users/Testificate/Deskt
op/luarocks/luajit2.0.4/include/" -DLUA_LIBDIR="C:/Users/Testificate/Desktop/luarocks/luajit2.0.4/lib" -DLUADIR="C:\Users\Testificate\Deskto
p\luarocks\systree/lib/luarocks/rocks/paths/scm-1/lua" -DLIBDIR="C:\Users\Testificate\Desktop\luarocks\systree/lib/luarocks/rocks/paths/scm-
1/lib" -DCMAKE_INSTALL_PREFIX="C:\Users\Testificate\Desktop\luarocks\systree/lib/luarocks/rocks/paths/scm-1" && nmake

-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler using: Visual Studio 12 2013
-- Check for working C compiler using: Visual Studio 12 2013 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013
-- Check for working CXX compiler using: Visual Studio 12 2013 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_BUILD_TYPE


-- Build files have been written to: C:/Users/Testificate/AppData/Local/Temp/luarocks_paths-scm-1-246/paths/build

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

Error: Build error: Failed building.

Bug for filep and dirp function

My proposed to check image files exist in specific directory and probably in sub directory of the input directory.

However, both filep and dirp return falsewhen my code called them.
The only way for return true is that I change directory to destination directory and use th to call trepl and call filep and dirp.

I've checked the document in repo and it doesn't give me enough information to figure out this.

Anyone has any ideas or hints?

Thanks~

Hidden dependency on torch

Howdy,

I installed this module without torch, but got this error trying to user path.iterfiles():

init.lua:28: attempt to index global 'torch' (a nil value)

Also, torch is not an explicity dependency.

I find this module quite useful as stand-alone. Hope this is an intended use case.

Unable to install paths

Hi, I was trying to install torch, but turns out it fails to install paths package. I'm using OSX 10.9.3 and I have lua (5.2.3), luagit (2.0.3), luarocks (2.0.13) installed via macports. Here is a full output of the error:

sudo luarocks --server=https://raw.githubusercontent.com/torch/rocks/master install paths
Installing https://raw.githubusercontent.com/torch/rocks/master/paths-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/paths-scm-1.rockspec... switching to 'build' mode
Cloning into 'paths'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 10 (delta 0), reused 5 (delta 0)
Receiving objects: 100% (10/10), 12.11 KiB | 0 bytes/s, done.
Checking connectivity... done.
Warning: unmatched variable LUALIB
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUALIB= -DLUA_INCDIR="/opt/local/include" -DLUA_LIBDIR="/opt/local/lib" -DLUADIR="/opt/local/share/luarocks//lib/luarocks/rocks/paths/scm-1/lua" -DLIBDIR="/opt/local/share/luarocks//lib/luarocks/rocks/paths/scm-1/lib" -DCMAKE_INSTALL_PREFIX="/opt/local/share/luarocks//lib/luarocks/rocks/paths/scm-1" && make

-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is AppleClang 5.1.0.5030040
-- 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
-- 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
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file dirent.h
-- Looking for include file dirent.h - found
-- Looking for include file time.h
-- Looking for include file time.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/ndir.h
-- Looking for include file sys/ndir.h - not found
-- Looking for include file sys/utsname.h
-- Looking for include file sys/utsname.h - found
-- Looking for include file sys/dir.h
-- Looking for include file sys/dir.h - found
-- Looking for include file ndir.h
-- Looking for include file ndir.h - not found
-- Looking for getcwd
-- Looking for getcwd - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_paths-scm-1-9991/paths/build
Scanning dependencies of target paths
[100%] Building C object CMakeFiles/paths.dir/paths.c.o
/tmp/luarocks_paths-scm-1-9991/paths/paths.c:730:15: warning: 'tempnam' is deprecated: This function is provided for
      compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended
      that you use mkstemp(3) instead. [-Wdeprecated-declarations]
  char *tmp = tempnam(NULL, "luatmp");
              ^
/usr/include/stdio.h:389:7: note: 'tempnam' declared here
char    *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam);
         ^
/tmp/luarocks_paths-scm-1-9991/paths/paths.c:991:20: error: use of undeclared identifier 'LUA_PATHSEP'
  while (*path == *LUA_PATHSEP) path++;  /* skip separators */
                   ^
/tmp/luarocks_paths-scm-1-9991/paths/paths.c:993:21: error: use of undeclared identifier 'LUA_PATHSEP'
  l = strchr(path, *LUA_PATHSEP);  /* find next separator */
                    ^
/tmp/luarocks_paths-scm-1-9991/paths/paths.c:1003:19: error: use of undeclared identifier 'LUA_GLOBALSINDEX'
  lua_getfield(L, LUA_GLOBALSINDEX, "package");
                  ^
/tmp/luarocks_paths-scm-1-9991/paths/paths.c:1110:19: error: use of undeclared identifier 'LUA_GLOBALSINDEX'
  lua_setfield(L, LUA_GLOBALSINDEX, "paths");
                  ^
/tmp/luarocks_paths-scm-1-9991/paths/paths.c:1111:3: warning: implicit declaration of function 'luaL_register' is invalid
      in C99 [-Wimplicit-function-declaration]
  luaL_register(L, NULL, paths__);
  ^
2 warnings and 4 errors generated.
make[2]: *** [CMakeFiles/paths.dir/paths.c.o] Error 1
make[1]: *** [CMakeFiles/paths.dir/all] Error 2
make: *** [all] Error 2

Error: Build error: Failed building.

Can you tell from this error what's wrong on my system? Thanks, Valentin.

kills inline-C?

This code that used t run fine:

require 'inline'
parse = inline.load [[
....
return 0;
]]

now it is not working:

$ torch run.lua
Torch 7.0 Copyright (C) 2001-2011 Idiap, NEC Labs, NYU
torch-qlua: /usr/local/share/torch/lua/inline/init.lua:274: attempt to call field 'pwd' (a nil value)
stack traceback:
[C]: in function 'pwd'
/usr/local/share/torch/lua/inline/init.lua:274: in function 'load'
run.lua:69: in main chunk

installing this kills torch

if you try to install this on top pf Torch7, it break everything:
error: [string "?"]:100: bad argument #1 to 'concat' (string expected, got nil)

even if you then try to undo all steps!!!!
A disastrer!

How to install it?

How can I install it with luarocks?
luarocks install paths is not working

Does not build on Windows 8 / MSVC2010

When trying to build using a (working) luajit-rocks installation, the build fails with the following output:

c:\Users\Enrico\Desktop\luajit-rocks>luarocks install paths
c:\Users\Enrico\Desktop\luajit-rocks>rem=rem --[[
Installing https://raw.githubusercontent.com/torch/rocks/master/paths-scm-1.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/paths-scm-1.rockspec... switching to 'build' mode
Cloning into 'paths'...
remote: Counting objects: 10, done.
remote: Compressing objects: 100% (9/9), done.
Receiving objects:  60% (6/10)   ed 5 (delta 0), pack-reused 0
Receiving objects: 100% (10/10), 12.81 KiB | 0 bytes/s, done.
Checking connectivity... done.
cmake -E make_directory build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DLUALIB=libluajit.lib -DLUA_INCDIR="c:/Users/Enrico/Deskto
p/luajit-rocks/include" -DLUA_LIBDIR="c:/Users/Enrico/Desktop/luajit-rocks/." -DLUADIR="c:/Users/Enrico/Desktop/luajit-rocks/luarocks/paths/
scm-1/lua" -DLIBDIR="c:/Users/Enrico/Desktop/luajit-rocks/luarocks/paths/scm-1/lib" -DCMAKE_INSTALL_PREFIX="c:/Users/Enrico/Desktop/luajit-r
ocks/luarocks/paths/scm-1" && nmake

-- Building for: NMake Makefiles
-- The C compiler identification is MSVC 16.0.30319.1
-- The CXX compiler identification is MSVC 16.0.30319.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Enrico/AppData/Local/Temp/luarocks_paths-scm-1-5582/paths/build

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

Scanning dependencies of target paths
[100%] Building C object CMakeFiles/paths.dir/paths.c.obj
paths.c
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(72) : warning C4267: 'function' : conversion from 'size_t' to 'in
t', possible loss of data
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(139) : warning C4101: 'last' : unreferenced local variable
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(216) : warning C4267: '=' : conversion from 'size_t' to 'int', po
ssible loss of data
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(220) : warning C4244: '=' : conversion from '__int64' to 'int', p
ossible loss of data
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(374) : warning C4013: 'GetFullPathNameA' undefined; assuming exte
rn returning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(427) : warning C4267: 'function' : conversion from 'size_t' to 'i
nt', possible loss of data
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(441) : warning C4013: '_getdrive' undefined; assuming extern retu
rning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(499) : warning C4267: 'function' : conversion from 'size_t' to 'i
nt', possible loss of data
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(604) : error C2079: 'info' uses undefined struct '_finddata_t'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(612) : warning C4013: 'GetLogicalDrives' undefined; assuming exte
rn returning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(628) : warning C4267: 'function' : conversion from 'size_t' to 'i
nt', possible loss of data
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(633) : warning C4013: '_findfirst' undefined; assuming extern ret
urning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(636) : error C2224: left of '.name' must have struct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(636) : error C2168: 'strcmp' : too few actual parameters for intr
insic function
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(636) : error C2224: left of '.name' must have struct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(636) : error C2168: 'strcmp' : too few actual parameters for intr
insic function
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(637) : error C2224: left of '.name' must have struct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(637) : error C2198: 'lua_pushstring' : too few arguments for call

C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(640) : warning C4013: '_findnext' undefined; assuming extern retu
rning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(641) : warning C4013: '_findclose' undefined; assuming extern ret
urning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(728) : warning C4267: 'initializing' : conversion from 'size_t' t
o 'int', possible loss of data
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(795) : warning C4013: '_mkdir' undefined; assuming extern returni
ng int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(807) : warning C4013: '_rmdir' undefined; assuming extern returni
ng int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(824) : error C2065: 'SYSTEM_INFO' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(824) : error C2146: syntax error : missing ';' before identifier
'info'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(824) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(828) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(828) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(829) : warning C4013: 'GetSystemInfo' undefined; assuming extern
returning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(829) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(830) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(830) : error C2224: left of '.wProcessorArchitecture' must have s
truct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(830) : error C2065: 'PROCESSOR_ARCHITECTURE_AMD64' : undeclared i
dentifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(832) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(832) : error C2224: left of '.wProcessorArchitecture' must have s
truct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(832) : error C2065: 'PROCESSOR_ARCHITECTURE_INTEL' : undeclared i
dentifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(834) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(834) : error C2224: left of '.wProcessorArchitecture' must have s
truct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(834) : error C2065: 'PROCESSOR_ARCHITECTURE_ARM' : undeclared ide
ntifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(836) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(836) : error C2224: left of '.wProcessorArchitecture' must have s
truct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(836) : error C2065: 'PROCESSOR_ARCHITECTURE_IA64' : undeclared id
entifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(838) : error C2065: 'info' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(838) : error C2224: left of '.wProcessorArchitecture' must have s
truct/union type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(838) : error C2065: 'PROCESSOR_ARCHITECTURE_IA64' : undeclared id
entifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(868) : error C2146: syntax error : missing ';' before identifier
'keys'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(868) : error C2065: 'keys' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(868) : error C2059: syntax error : ']'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(876) : error C2146: syntax error : missing ';' before identifier
'rkey'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(876) : error C2065: 'rkey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(876) : error C2065: 'keys' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(876) : error C2109: subscript requires array or pointer type
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(877) : error C2143: syntax error : missing ';' before 'const'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(878) : error C2143: syntax error : missing ';' before 'const'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(879) : error C2146: syntax error : missing ';' before identifier
'skey'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(879) : error C2065: 'skey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(880) : error C2065: 'DWORD' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(880) : error C2146: syntax error : missing ';' before identifier
'type'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(880) : error C2065: 'type' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(881) : error C2065: 'DWORD' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(881) : error C2146: syntax error : missing ';' before identifier
'len'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(881) : error C2065: 'len' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(882) : error C2143: syntax error : missing ';' before 'type'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(883) : error C2065: 'LONG' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(883) : error C2146: syntax error : missing ';' before identifier
'res'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(883) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(884) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(884) : warning C4013: 'RegOpenKeyExA' undefined; assuming extern
returning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(884) : error C2065: 'rkey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(884) : error C2065: 'subkey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(884) : error C2065: 'KEY_READ' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(884) : error C2065: 'skey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(885) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(885) : error C2065: 'ERROR_SUCCESS' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(888) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(889) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(889) : error C2065: 'ERROR_FILE_NOT_FOUND' : undeclared identifie
r
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(891) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(891) : error C2065: 'ERROR_ACCESS_DENIED' : undeclared identifier

C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : warning C4013: 'RegQueryValueExA' undefined; assuming exte
rn returning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : error C2065: 'skey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : error C2065: 'value' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : error C2065: 'type' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : error C2065: 'LPBYTE' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : error C2146: syntax error : missing ')' before identifier
'data'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(897) : error C2059: syntax error : ')'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(898) : error C2065: 'len' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(900) : error C2065: 'len' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(901) : error C2065: 'data' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(901) : error C2065: 'len' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(901) : warning C4047: '=' : 'int' differs in levels of indirectio
n from 'char *'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(902) : error C2065: 'data' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(904) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(904) : error C2065: 'skey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(904) : error C2065: 'value' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(904) : error C2065: 'type' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(904) : error C2065: 'LPBYTE' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(904) : error C2146: syntax error : missing ')' before identifier
'data'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(904) : error C2059: syntax error : ')'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(906) : warning C4013: 'RegCloseKey' undefined; assuming extern re
turning int
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(906) : error C2065: 'skey' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(907) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(907) : error C2065: 'ERROR_SUCCESS' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(909) : error C2065: 'data' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(910) : error C2065: 'data' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(910) : warning C4022: 'free' : pointer mismatch for actual parame
ter 1
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(912) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(913) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(913) : error C2065: 'ERROR_FILE_NOT_FOUND' : undeclared identifie
r
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(915) : error C2065: 'res' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(915) : error C2065: 'ERROR_ACCESS_DENIED' : undeclared identifier

C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(921) : error C2065: 'type' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(923) : error C2065: 'REG_DWORD' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(923) : error C2051: case expression not constant
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(924) : error C2146: syntax error : missing ')' before identifier
'DWORD'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(924) : error C2065: 'DWORD' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(924) : error C2100: illegal indirection
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(924) : error C2059: syntax error : ')'
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(925) : error C2065: 'data' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(926) : error C2065: 'data' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(926) : warning C4022: 'free' : pointer mismatch for actual parame
ter 1
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(928) : error C2065: 'REG_EXPAND_SZ' : undeclared identifier
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(928) : error C2051: case expression not constant
C:\Users\Enrico\AppData\Local\Temp\luarocks_paths-scm-1-5582\paths\paths.c(928) : fatal error C1003: error count exceeds 100; stopping compi
lation
NMAKE : fatal error U1077: 'C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\nmake.exe"' : return code '0x2'
Stop.

Error: Build error: Failed building.

Debian package of paths module

@soumith @borisfom

I'm working on on Torch Debian packaging, and now I have successfully built lua-torch-paths package locally. I'll upload it some time later.

This partially solves torch/distro#70

BTW, I wish torch upstream can make releases so I can write a file named watch, which automatically tracks upstream updates, so we can update corresponding modules in time.

https://bugs.debian.org/826529

FYI, I currently use such version for paths package: 0~20160203-g68d579a, where the HEAD commit hash is following -g, and the date is the latest commit date.

Thanks.

Fails to build with Lua 5.3

Don't know if this is a priority at all, but paths fails to build against Lua 5.3


-- The C compiler identification is AppleClang 7.0.2.7000181
-- The CXX compiler identification is AppleClang 7.0.2.7000181
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for include file fcntl.h
-- Looking for include file fcntl.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file dirent.h
-- Looking for include file dirent.h - found
-- Looking for include file time.h
-- Looking for include file time.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/ndir.h
-- Looking for include file sys/ndir.h - not found
-- Looking for include file sys/utsname.h
-- Looking for include file sys/utsname.h - found
-- Looking for include file sys/dir.h
-- Looking for include file sys/dir.h - found
-- Looking for include file ndir.h
-- Looking for include file ndir.h - not found
-- Looking for getcwd
-- Looking for getcwd - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/luarocks_paths-scm-1-9371/paths/build
Scanning dependencies of target paths
[ 50%] Building C object CMakeFiles/paths.dir/paths.c.o
/tmp/luarocks_paths-scm-1-9371/paths/paths.c:747:15: warning: 'tempnam' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of
      tempnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
  char *tmp = tempnam(NULL, "luatmp");
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/stdio.h:391:7: note: 'tempnam' has been explicitly marked deprecated here
char    *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam);
         ^
/tmp/luarocks_paths-scm-1-9371/paths/paths.c:1012:20: error: use of undeclared identifier 'LUA_PATHSEP'
  while (*path == *LUA_PATHSEP) path++;  /* skip separators */
                   ^
/tmp/luarocks_paths-scm-1-9371/paths/paths.c:1014:21: error: use of undeclared identifier 'LUA_PATHSEP'
  l = strchr(path, *LUA_PATHSEP);  /* find next separator */
                    ^
/tmp/luarocks_paths-scm-1-9371/paths/paths.c:1139:3: warning: implicit declaration of function 'luaL_register' is invalid in C99 [-Wimplicit-function-declaration]
  luaL_register(L, NULL, paths__);
  ^
2 warnings and 2 errors generated.
make[2]: *** [CMakeFiles/paths.dir/paths.c.o] Error 1
make[1]: *** [CMakeFiles/paths.dir/all] Error 2
make: *** [all] Error 2

Some new warnings at compilation time

/tmp/luarocks_paths-scm-1-4305/paths/paths.c: In function 'lua_tmpname':
/tmp/luarocks_paths-scm-1-4305/paths/paths.c:747:3: warning: 'tempnam' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
   char *tmp = tempnam(NULL, "luatmp");
   ^
In file included from /usr/local/include/lauxlib.h:13:0,
                 from /tmp/luarocks_paths-scm-1-4305/paths/build/paths.h:4,
                 from /tmp/luarocks_paths-scm-1-4305/paths/paths.c:4:
/usr/include/stdio.h:391:7: note: declared here
 char *tempnam(const char *, const char *) __DARWIN_ALIAS(tempnam);
       ^

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.