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

[Fedora 28] hdf5 fails to load #105

Open
mightybigcar opened this issue Feb 22, 2019 · 0 comments
Open

[Fedora 28] hdf5 fails to load #105

mightybigcar opened this issue Feb 22, 2019 · 0 comments

Comments

@mightybigcar
Copy link
Contributor

mightybigcar commented Feb 22, 2019

HDF5 fails to load on Fedora 28 as follows:

$ luajit -e "local hdf5 = require('hdf5'); In file included from /usr/include/openmpi-x86_64/hdf5.h:22: /usr/include/openmpi-x86_64/H5public.h:59:13: fatal error: mpi.h: No such file or directory # include <mpi.h> ^~~~~~~ compilation terminated. /brewpub/tools/torch/bin/luajit: /brewpub/tools/torch/share/lua/5.1/trepl/init.lua:389: /brewpub/tools/torch/share/lua/5.1/hdf5/ffi.lua:63: missing declaration for symbol 'H5open' stack traceback: [C]: in function 'error' /brewpub/tools/torch/share/lua/5.1/trepl/init.lua:389: in function 'require' main_test_realsense.lua:13: in main chunk [C]: in function 'dofile' /brewpub/tools/torch/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x004059f0

This is because mpi.h is in the same place as hdf5.h, but that directory is not in the system include paths. As indicated by the comments in the code, the fix is to pass includePath to gcc using the -I switch in loadHDF5Header() in ffi.lua. I've made this change, which resolves the issue, and will submit a pull request shortly.

Thanks,
Chris

PS Sorry for the repeated edits. I'm not at all familiar with Markdown.

mightybigcar added a commit to mightybigcar/torch-hdf5 that referenced this issue Feb 22, 2019
iskra-vitaly added a commit to iskra-vitaly/torch-hdf5 that referenced this issue Mar 10, 2019
…tion

* origin/master:
  Added return code checking to header parsing.  Throw error if the operation failed.
  Pass includePath to gcc so it can find include files that might not be on system path. Issue google-deepmind#105.
  Fix undefined behavior by not casting -1 to unsigned int directly
  Remove test for threads as it requries threads to be installed and hdf5 compiled with --enable-threadsafety
  Add torch serialization so hdf5files can be read from multiple threads
  Prevent H5Dget_space from being called twice
iskra-vitaly added a commit to iskra-vitaly/torch-hdf5 that referenced this issue Mar 10, 2019
Merges master from upstream

* fix-nullable-annotation:
  Added return code checking to header parsing.  Throw error if the operation failed.
  Pass includePath to gcc so it can find include files that might not be on system path. Issue google-deepmind#105.
  Fix undefined behavior by not casting -1 to unsigned int directly
  Remove test for threads as it requries threads to be installed and hdf5 compiled with --enable-threadsafety
  Add torch serialization so hdf5files can be read from multiple threads
iskra-vitaly added a commit to iskra-vitaly/torch-hdf5 that referenced this issue Mar 10, 2019
* origin/master:
  Added return code checking to header parsing.  Throw error if the operation failed.
  Pass includePath to gcc so it can find include files that might not be on system path. Issue google-deepmind#105.
  Fix undefined behavior by not casting -1 to unsigned int directly
  Remove test for threads as it requries threads to be installed and hdf5 compiled with --enable-threadsafety
  Add torch serialization so hdf5files can be read from multiple threads
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

1 participant