Skip to content

Issue install torch-hdf5 on Mac os Sierra #83

Closed
@cassiesu

Description

@cassiesu

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

Activity

tbornt

tbornt commented on Oct 18, 2016

@tbornt

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

cassiesu commented on Oct 18, 2016

@cassiesu
Author

@tbornt Just test it. It works! Thxxxx!

nylki

nylki commented on Oct 20, 2016

@nylki

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

ChrisCummins

ChrisCummins commented on Oct 30, 2016

@ChrisCummins

Thanks @tbornt !

robertshearing

robertshearing commented on May 14, 2017

@robertshearing

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

0x106 commented on Jul 13, 2017

@0x106

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @robertshearing@ChrisCummins@nylki@cassiesu@0x106

        Issue actions

          Issue install torch-hdf5 on Mac os Sierra · Issue #83 · google-deepmind/torch-hdf5