Welcome to www.arepo-code.org › Forums › Arepo forum › The code is not working › Compilation Error
- This topic has 2 replies, 2 voices, and was last updated 1 year, 3 months ago by
Eesha Das Gupta.
-
AuthorPosts
-
November 6, 2019 at 12:32 pm #490
Eesha Das Gupta
ParticipantHi,
I’m trying to compile code for the polytrope_1D_spherical example code, but keep getting the following error. My suspicion is that it is not compatible with the HDF5 library on the system (I have tried both 1.8 and 1.10, same error with either), but I don’t know how to fix the issue.
Thanks,
Eesha
src/init/begrun.c: In function ‘begrun1’:
src/init/begrun.c:109:15: warning: passing argument 1 of ‘H5Eset_auto2’ makes integer from pointer without a cast [-Wint-conversion]
109 | H5Eset_auto(my_hdf5_error_handler, NULL);
| ^~~~~~~~~~~~~~~~~~~~~
| |
| herr_t (*)(void *) {aka int (*)(void *)}
In file included from /opt/hdf5/1.10.5-gcc-9.1.0/include/hdf5.h:26,
from src/init/../main/proto.h:50,
from src/init/begrun.c:51:
/opt/hdf5/1.10.5-gcc-9.1.0/include/H5Epublic.h:172:34: note: expected ‘hid_t’ {aka ‘long int’} but argument is of type ‘herr_t (*)(void *)’ {aka ‘int (*)(void *)’}
172 | H5_DLL herr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data);
| ~~~~~~^~~~~~~~~
In file included from /opt/hdf5/1.10.5-gcc-9.1.0/include/H5public.h:32,
from /opt/hdf5/1.10.5-gcc-9.1.0/include/hdf5.h:22,
from src/init/../main/proto.h:50,
from src/init/begrun.c:51:
/opt/hdf5/1.10.5-gcc-9.1.0/include/H5version.h:483:23: error: too few arguments to function ‘H5Eset_auto2’
483 | #define H5Eset_auto H5Eset_auto2
| ^~~~~~~~~~~~
src/init/begrun.c:109:3: note: in expansion of macro ‘H5Eset_auto’
109 | H5Eset_auto(my_hdf5_error_handler, NULL);
| ^~~~~~~~~~~
In file included from /opt/hdf5/1.10.5-gcc-9.1.0/include/hdf5.h:26,
from src/init/../main/proto.h:50,
from src/init/begrun.c:51:
/opt/hdf5/1.10.5-gcc-9.1.0/include/H5Epublic.h:172:15: note: declared here
172 | H5_DLL herr_t H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data);
| ^~~~~~~~~~~~
make: *** [build/init/begrun.o] Error 1November 6, 2019 at 11:41 pm #491Alankar Dutta
ParticipantCan you please share your Makefile?
Also please ensure compilation flag “-DH5_USE_16_API” is turned on-
This reply was modified 1 year, 3 months ago by
Alankar Dutta.
November 7, 2019 at 10:33 am #493Eesha Das Gupta
ParticipantThanks, I double-checked and fixed my Makefile and it compiles now
-
This reply was modified 1 year, 3 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.