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

radx fails to build with hdf5 1.10.1 #8

Closed
iMichka opened this issue May 15, 2017 · 5 comments
Closed

radx fails to build with hdf5 1.10.1 #8

iMichka opened this issue May 15, 2017 · 5 comments

Comments

@iMichka
Copy link

iMichka commented May 15, 2017

Hi

I am one of the homebrew-science package managers. We just updated to the latest version of hdf5 (1.10.1). It seems that radx fails to build on Mac and on Linux with that version of hdf5.

Here is the error we are getting:

Gamic/GamicHdf5RadxFile.cc:1067:25: error: cannot initialize a parameter of type 'attr_operator_t' (aka 'void (*)(H5::H5Object &, const basic_string<char, char_traits<char>, allocator<char> >, void *)') with an lvalue of type 'void (H5::H5Location &, const std::string, void *)' (aka 'void (H5::H5Location &, const basic_string<char, char_traits<char>, allocator<char> >, void *)'): type mismatch at 1st parameter ('H5::H5Object &' vs 'H5::H5Location &')
  extended.iterateAttrs(Hdf5Utils::appendAttrNames, NULL, &attrNames);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/H5Object.h:76:42: note: passing argument to parameter 'user_op' here
        int iterateAttrs(attr_operator_t user_op, unsigned* idx = NULL, void* op_data = NULL);
                                         ^
1 error generated.
make[3]: *** [Gamic/GamicHdf5RadxFile.lo] Error 1

Here is the related pull request: https://github.com/Homebrew/homebrew-science/pull/5646.
As you can see I also updated radx to the latest version and adapted the formula, in the hope this would maybe already be fixed. Maybe you could have a look, before we need to revert to an older version of hdf5. Thanks in advance.

@iMichka
Copy link
Author

iMichka commented Aug 12, 2017

I was able to compile using the following patch:
https://raw.githubusercontent.com/Homebrew/formula-patches/3124ede999c9ffd700652d20f0455c97512f84a3/radx/radx-hdf5-20170315.diff?full_index=1

There are some macro redefinitions for H5Location and H5Object on top of the header files, but this does not seem to work correctly. I did not investigate any more but we have a workaround on our side; it would be great if you could have a look and make a proper fix for this. Thanks!

@rpelorosso
Copy link

Hello @iMichka, I'm sorry to bother you, but could you please tell me what version of gcc did you use? I'm having a hard time trying to compile this suite.

@iMichka
Copy link
Author

iMichka commented Sep 7, 2017

That was clang/llvm on mac (Xcode 8 I think), and gcc 4.8 on Linux. All the builds passed with this patch.

@ilovezfs
Copy link

@mike-dixon it seems a new version was released that still has this issue. Any chance you can take a look at fixing this so that radx works with the current version of HDF5? I'm rebasing the patch but that's not something we can do indefinitely.

@mike-dixon
Copy link
Collaborator

Fixed. Changed Ncxx and Radx libraries to use getNumAttr(), and H5Aopen_idx(), instead of iterateAttrs() to iterate through attributes. Removed usage of H5Location, now uses H5Object everywhere"

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

4 participants