Closed NINI1988 closed 6 years ago
I'll test on Windows with hdf5 1.10. It builds on windows with 1.8.15
It's under linux.
https://github.com/HDF-NI/hdf5.node/blob/master/src/reference.hpp#L100 is compiling with 1.10.1 and 1.10.0-patch1 on my ubuntu. My c++ compiler is v8.0.0
what could be making the difference. My hdf5 libs are compiled; not system installs. The travis-ci system installed hdf5 lib is defaulting to 1.8 I believe
I'll look tomorrow to see if I found a difference.
I tried it with g++-7 and g++-8 which doesn't fix the problem.
The problem is in /usr/include/hdf5/serial/H5version.h:
#if !defined(H5Rdereference_vers)
#define H5Rdereference_vers 1
#endif /* !defined(H5Rdereference_vers) */
When H5Rdereference_vers is undefined it uses H5Rdereference1 as default.
So a workaround is to use H5Rdereference2 directly:
#if H5_VERSION_GE(1,10,0)
H5Rdereference2(locId, H5P_DEFAULT, (H5R_type_t)args[1]->Int32Value(), (void *)obj->objectId);
#else
H5Rdereference(locId, (H5R_type_t)args[1]->Int32Value(), (void *)obj->objectId);
#endif
I use sudo apt install libhdf5-dev
to install hdf5.
But I don't know why it work elsewhere except me?
Yea it would be nice to know; I'll put in the work around if we don't find it.
Something that is bothering me is the extra defaults for the hdf5 native home: https://github.com/HDF-NI/hdf5.node/blob/master/binding.gyp#L20
and you have home as --hdf5_home_linux='/usr/lib/x86_64-linux-gnu/hdf5/serial' so the /usr/include/hdf5/serial/H5version.h shouldn't be picked up
are versions mixing?
include is a link:
/usr/lib/x86_64-linux-gnu/hdf5/serial/include -> /usr/include/hdf5/serial
ah is that how they install it! links always catch me
I didn't found a fix for this, and this crashes my ci builds. Could you add the workaround?
yep I'll add it
give it a test
When i want to compile I get the following error: