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

compiler errors with hdf5 1.10.0 #53

Closed
slayoo opened this issue Apr 7, 2018 · 3 comments
Closed

compiler errors with hdf5 1.10.0 #53

slayoo opened this issue Apr 7, 2018 · 3 comments
Labels

Comments

@slayoo
Copy link
Member

slayoo commented Apr 7, 2018

As reported by Cody (https://sourceforge.net/u/roadkill-maker/) at SF.net (https://sourceforge.net/p/gnudatalanguage/bugs/699/):

I get a compiler error when using hdf5 1.10.0 It compiles fine with hdf 1.8.15. I'm on Arch linux, gcc 6.1.1.
The error is:

/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp: In function ‘BaseGDL* lib::h5a_read_fun(EnvT*)’:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:352:37: error: no matching function for call to ‘AssureLongScalarPar(int, hid_t&)’
     e->AssureLongScalarPar(0, h5a_id);
                                     ^
In file included from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.hpp:22:0,
                 from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:32:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:837:8: note: candidate: void EnvT::AssureLongScalarPar(SizeT, DLong&) <near match>
   void AssureLongScalarPar( SizeT ix, DLong& scalar);
        ^~~~~~~~~~~~~~~~~~~
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:837:8: note:   conversion of argument 2 would be ill-formed:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:352:37: error: invalid initialization of non-const reference of type ‘DLong& {aka int&}’ from an rvalue of type ‘DLong {aka int}’
     e->AssureLongScalarPar(0, h5a_id);
                                     ^
In file included from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.hpp:22:0,
                 from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:32:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:838:8: note: candidate: void EnvT::AssureLongScalarPar(SizeT, DLong64&) <near match>
   void AssureLongScalarPar( SizeT ix, DLong64& scalar);
        ^~~~~~~~~~~~~~~~~~~
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:838:8: note:   conversion of argument 2 would be ill-formed:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:352:37: error: invalid initialization of non-const reference of type ‘DLong64& {aka long long int&}’ from an rvalue of type ‘DLong64 {aka long long int}’
     e->AssureLongScalarPar(0, h5a_id);
                                     ^
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp: In function ‘BaseGDL* lib::h5d_read_fun(EnvT*)’:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:406:37: error: no matching function for call to ‘AssureLongScalarPar(int, hid_t&)’
     e->AssureLongScalarPar(0, h5d_id);
                                     ^
In file included from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.hpp:22:0,
                 from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:32:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:837:8: note: candidate: void EnvT::AssureLongScalarPar(SizeT, DLong&) <near match>
   void AssureLongScalarPar( SizeT ix, DLong& scalar);
        ^~~~~~~~~~~~~~~~~~~
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:837:8: note:   conversion of argument 2 would be ill-formed:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:406:37: error: invalid initialization of non-const reference of type ‘DLong& {aka int&}’ from an rvalue of type ‘DLong {aka int}’
     e->AssureLongScalarPar(0, h5d_id);
                                     ^
In file included from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.hpp:22:0,
                 from /data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:32:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:838:8: note: candidate: void EnvT::AssureLongScalarPar(SizeT, DLong64&) <near match>
   void AssureLongScalarPar( SizeT ix, DLong64& scalar);
        ^~~~~~~~~~~~~~~~~~~
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/envt.hpp:838:8: note:   conversion of argument 2 would be ill-formed:
/data/Apps/AUR/gnudatalanguage/src/gdl-0.9.6/src/hdf5_fun.cpp:406:37: error: invalid initialization of non-const reference of type ‘DLong64& {aka long long int&}’ from an rvalue of type ‘DLong64 {aka long long int}’
     e->AssureLongScalarPar(0, h5d_id);
                                     ^
src/CMakeFiles/gdl.dir/build.make:1526: recipe for target 'src/CMakeFiles/gdl.dir/hdf5_fun.cpp.o' failed
make[2]: *** [src/CMakeFiles/gdl.dir/hdf5_fun.cpp.o] Error 1
CMakeFiles/Makefile2:124: recipe for target 'src/CMakeFiles/gdl.dir/all' failed
make[1]: *** [src/CMakeFiles/gdl.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Further comment by @GillesDuvert:

According to https://www.hdfgroup.org/HDF5/doc/ADGuide/Changes.html, hid_t changed from 32 bits (aka int or DLong) to 64 bits (aka DLong64). Yet another dependency that we are to take into account! Rats!
In the meantime, you should install an older HDF version < 1.10 for GDL to compile.
@slayoo slayoo added the hdf5 label Apr 7, 2018
@opoplawski
Copy link
Contributor

I'm not seeing any compile errors with current gdl and hdf5 1.10.5

@alaingdl
Copy link
Contributor

should be related to #537 and PR #560

@slayoo
Copy link
Member Author

slayoo commented May 24, 2020

Closing as addressed by #560

@slayoo slayoo closed this as completed May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants