Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #490
    Eesha Das Gupta
    Participant

    Hi,

    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 1

    #491
    Alankar Dutta
    Participant

    Can you please share your Makefile?
    Also please ensure compilation flag “-DH5_USE_16_API” is turned on

    #493
    Eesha Das Gupta
    Participant

    Thanks, I double-checked and fixed my Makefile and it compiles now

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.