Error in SMOKE compilation

Hello everyone,
I have some troubles about comiling SMOKE. It seems that there’s something wrong with netcdf/hdf5. l tested the links and libs but they all works. Following is the error, what could l do to solve it?
/public/home/users/fdu012a/thy/soft/SMOKE/SMOKEINST/subsys/smoke/src/…/Linux2_x86_64ifort/libnetcdf.a(libnchdf5_la-nc4memcb.o): In function NC4_image_init': nc4memcb.c:(.text+0x3d4): undefined reference to H5open’
nc4memcb.c:(.text+0x3db): undefined reference to H5P_CLS_FILE_ACCESS_ID_g' nc4memcb.c:(.text+0x3e2): undefined reference to H5Pcreate’
nc4memcb.c:(.text+0x477): undefined reference to H5Pset_fapl_core' nc4memcb.c:(.text+0x506): undefined reference to H5Pset_file_image_callbacks’
nc4memcb.c:(.text+0x51a): undefined reference to H5Pset_file_image' nc4memcb.c:(.text+0x57c): undefined reference to H5check_version’
nc4memcb.c:(.text+0x598): undefined reference to H5check_version' nc4memcb.c:(.text+0x5bc): undefined reference to H5check_version’
nc4memcb.c:(.text+0x5f0): undefined reference to H5Eauto_is_v2' nc4memcb.c:(.text+0x60e): undefined reference to H5Eget_auto2’
nc4memcb.c:(.text+0x619): undefined reference to H5Eset_auto2' nc4memcb.c:(.text+0x62d): undefined reference to H5Eget_auto1’
nc4memcb.c:(.text+0x636): undefined reference to H5Eset_auto1' nc4memcb.c:(.text+0x641): undefined reference to H5Pclose’
nc4memcb.c:(.text+0x65f): undefined reference to H5Eset_auto2' nc4memcb.c:(.text+0x673): undefined reference to H5Eset_auto1’
/public/home/users/fdu012a/thy/soft/SMOKE/SMOKEINST/subsys/smoke/src/…/Linux2_x86_64ifort/libnetcdf.a(libnchdf5_la-hdf5attr.o): In function NC4_HDF5_rename_att': hdf5attr.c:(.text+0x29b): undefined reference to H5Adelete’
hdf5attr.c:(.text+0x338): undefined reference to H5Adelete' /public/home/users/fdu012a/thy/soft/SMOKE/SMOKEINST/subsys/smoke/src/../Linux2_x86_64ifort/libnetcdf.a(libnchdf5_la-hdf5attr.o): In function NC4_HDF5_del_att’:
hdf5attr.c:(.text+0x592): undefined reference to H5Adelete' /public/home/users/fdu012a/thy/soft/SMOKE/SMOKEINST/subsys/smoke/src/../Linux2_x86_64ifort/libnetcdf.a(libnchdf5_la-hdf5create.o): In function nc4_H5Fcreate’:
hdf5create.c:(.text+0x4f): undefined reference to H5Fcreate' /public/home/users/fdu012a/thy/soft/SMOKE/SMOKEINST/subsys/smoke/src/../Linux2_x86_64ifort/libnetcdf.a(libnchdf5_la-hdf5create.o): In function NC4_create’:
hdf5create.c:(.text+0xf6): undefined reference to H5Pclose' hdf5create.c:(.text+0x241): undefined reference to H5check_version’
hdf5create.c:(.text+0x267): undefined reference to H5check_version' hdf5create.c:(.text+0x2c4): undefined reference to H5open’
hdf5create.c:(.text+0x2cb): undefined reference to H5P_CLS_FILE_ACCESS_ID_g' hdf5create.c:(.text+0x2d2): undefined reference to H5Pcreate’
hdf5create.c:(.text+0x2fc): undefined reference to H5Pset_fclose_degree' hdf5create.c:(.text+0x357): undefined reference to H5Pset_cache’
hdf5create.c:(.text+0x374): undefined reference to H5Pset_libver_bounds' hdf5create.c:(.text+0x387): undefined reference to H5open’
hdf5create.c:(.text+0x38e): undefined reference to H5P_CLS_FILE_CREATE_ID_g' hdf5create.c:(.text+0x395): undefined reference to H5Pcreate’
hdf5create.c:(.text+0x3b2): undefined reference to H5Pset_obj_track_times' hdf5create.c:(.text+0x3d0): undefined reference to H5Pset_link_creation_order’
hdf5create.c:(.text+0x3ee): undefined reference to H5Pset_attr_creation_order' hdf5create.c:(.text+0x4b2): undefined reference to H5Pset_fapl_core’
hdf5create.c:(.text+0x521): undefined reference to H5Gopen2' hdf5create.c:(.text+0x540): undefined reference to H5Pclose’
hdf5create.c:(.text+0x54f): undefined reference to `H5Pclose’
make: *** [normbeis3] Error 1

See https://cjcoats.github.io/ioapi/AVAIL.html#ncf4:

It is recommended that you configure netCDF with

–disable-netcdf-4 --disable-dap

You didn’t. You will need to follow the instructions found there:

If you build netCDF-4 without the --disable-netcdf4 , you will also need to add -DIOAPI_NCF4=1 to the ARCHFLAGS in your Makeinclude.${BIN}
You will need additional libraries that may be discovered by running the netCDF commands

nc-config --libs
nf-config --libs

or you need to start over, by re-configuring and re-building netCDF according to the recommendations.

2 Likes

I think they changed --libs to --flibs in netcdf command

Thank you for your solution. I added -DIOAPI_NCF4=1 when compiling I/OAPI3.2 according to your solution in other post but it still doesn’t work for this error. Then l used --disable-netcdf4 to rebulid netCDF and successfully compiled SMOKE… :laughing:

1 Like