neuraltalk2 icon indicating copy to clipboard operation
neuraltalk2 copied to clipboard

/torch/install/share/lua/5.1/hdf5/ffi.lua:56: ')' expected near '_close' at line 1436

Open smartPiz opened this issue 8 years ago • 11 comments

/torch/install/share/lua/5.1/hdf5/ffi.lua:56: ')' expected near '_close' at line 1436

smartPiz avatar Oct 30 '16 09:10 smartPiz

Have the same issue. Anybody knows what's going on? Did have neuraltalk2 up and running on an old computer a while back and I don't remember this issue.

trych avatar Nov 06 '16 18:11 trych

https://github.com/karpathy/neuraltalk2/issues/149

tbornt avatar Nov 07 '16 09:11 tbornt

@tbornt That link does not work. Did you maybe past the wrong link?

trych avatar Nov 07 '16 10:11 trych

I also am having this problem (but with torch-rnn). Any help?

ItsThisGuyAgain avatar Nov 07 '16 22:11 ItsThisGuyAgain

Nevermind, here's a fix.

ItsThisGuyAgain avatar Nov 07 '16 22:11 ItsThisGuyAgain

Unfortunately the ffi.lua edit fix doesn't work for me. I went through much the same sequence which led others here and solved the HDF5 location issue but it then threw up a "')' expected near '_close' at line 1466" error. I edited the @tbornt fix into ffi.lua but then it gave me this: In file included from :330: :1:9: error: macro name must be an identifier #define ‘_Nullable ‘ Followed by the original ')' expected ... error.

There are various posts about this but I haven't found any answers that seem definitive. Can anybody help?

pudepiedj avatar Feb 27 '17 14:02 pudepiedj

Same issue. Help.

ProbonoBonobo avatar Mar 02 '17 15:03 ProbonoBonobo

Could anyone confirm or deny if the incorrect hdf5 version number below ("0-0") is significant? Could this be the source of the error? (The installed version, from brew, is 1.10.0-patch1. I am curious if the name might be breaking some regex somewhere.)


argcheck
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

cudnn
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

cunn
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

cutorch
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

cwrap
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

dok
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

env
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

gnuplot
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

graph
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

hdf5
   0-0 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

image
   1.1.alpha-0 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

lua-cjson
   2.1devel-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

luaffi
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

luafilesystem
   1.6.3-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

nn
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

nngraph
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

nnx
   0.1-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

optim
   1.0.5-0 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

paths
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

penlight
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

sundown
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

sys
   1.1-0 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

threads
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

torch
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

totem
   0-0 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

trepl
   scm-1 (installed) - /Users/kz/torch/install/lib/luarocks/rocks

xlua
   1.0-0 (installed) - /Users/kz/torch/install/lib/luarocks/rocks
 

ProbonoBonobo avatar Mar 02 '17 15:03 ProbonoBonobo

@pudepiedj Make sure you don't have any web formatting artifacts in the text you paste (such as 'smart quotes'). I had the same issue and from the text you've posted it looks like you have smart quotes around _Nullable. Here's my code for line 44 of ~/torch/install/share/lua/5.1/hdf5/ffi.lua which works for me: local process = io.popen("gcc -D '_Nullable=' -E " .. headerPath) -- TODO pass -I.

chidg avatar Apr 01 '17 14:04 chidg

I was having the same problem but none of the fixes worked for me. I'm on MacOS and I managed to fix it by downgrading my Command Line Tools to v7.2. Refer to this post: https://github.com/torch/cutorch/issues/522 for instructions.

robertshearing avatar May 14 '17 23:05 robertshearing

Hello,

Had the same issue and fix by @chidg has helped. Thanks for sharing! In deep learning world the most adoring part is manual fixing the library source code.

DmitryKey avatar Dec 19 '17 20:12 DmitryKey