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

Comments

@cassiesu
Copy link

@cassiesu 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

This comment has been minimized.

Copy link

@tbornt 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

This comment has been minimized.

Copy link
Author

@cassiesu cassiesu commented Oct 18, 2016

@tbornt Just test it. It works! Thxxxx!

@nylki

This comment has been minimized.

Copy link

@nylki nylki commented Oct 20, 2016

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

@ChrisCummins

This comment has been minimized.

Copy link

@ChrisCummins ChrisCummins commented Oct 30, 2016

Thanks @tbornt !

@robertshearing

This comment has been minimized.

Copy link

@robertshearing robertshearing commented 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.

@Jordan-Campbell

This comment has been minimized.

Copy link

@Jordan-Campbell Jordan-Campbell 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
Projects
None yet
6 participants
You can’t perform that action at this time.