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

Issue install torch-hdf5 on Mac os Sierra #83

Closed
cassiesu opened this issue Oct 4, 2016 · 6 comments
Closed

Issue install torch-hdf5 on Mac os Sierra #83

cassiesu opened this issue Oct 4, 2016 · 6 comments

Comments

@cassiesu
Copy link

cassiesu commented Oct 4, 2016

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
screen shot 2016-10-04 at 13 37 26

@tbornt
Copy link

tbornt commented 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
Copy link
Author

@tbornt Just test it. It works! Thxxxx!

@nylki
Copy link

nylki commented Oct 20, 2016

Should this change be also the repo? Maybe reopen the issue then? :)

@ChrisCummins
Copy link

Thanks @tbornt !

@robertshearing
Copy link

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
Copy link

0x106 commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants