Closed
Description
I followed all the instructions to install hdf5 on the latest mac os Sierra. However, I cannot require 'hdf5' in torch successfully.
The error message showed as below. Any help?
/Users/cassiesu/torch/install/share/lua/5.1/trepl/init.lua:384: /Users/cassiesu/torch/install/share/lua/5.1/hdf5/ffi.lua:56: ')' expected near '_close' at line 1436
Activity
tbornt commentedon Oct 18, 2016
I met the same issue when playing with https://github.com/karpathy/neuraltalk2.
You can find the details neovim/neovim#5455.
I will show you my solution.
Edit
ffi.lua
line 44,change
local process = io.popen("gcc -E " .. headerPath) -- TODO pass -I
to
local process = io.popen("gcc -D '_Nullable=' -E " .. headerPath) -- TODO pass -I
.Hope it works for you.
cassiesu commentedon Oct 18, 2016
@tbornt Just test it. It works! Thxxxx!
train.lua
: expected near ')' at line 579 jcjohnson/torch-rnn#58nylki commentedon Oct 20, 2016
Should this change be also the repo? Maybe reopen the issue then? :)
ChrisCummins commentedon Oct 30, 2016
Thanks @tbornt !
robertshearing commentedon May 14, 2017
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: torch/cutorch#522 for instructions.
0x106 commentedon Jul 13, 2017
I had exactly the same error as the original post, changing line 44 in ffi.lua as per @tbornt worked for me.