Unidata / netcdf-fortran

Official GitHub repository for netCDF-Fortran libraries, which depend on the netCDF C library. Install the netCDF C library first.
Other
229 stars 96 forks source link

configure issue of netcdf-fortran with intel compiler in Ubunutu 22.04 . #436

Open Nagasapa opened 4 months ago

Nagasapa commented 4 months ago

I am trying to compile netcdf-fortran-4.6.1 with intel-compilers(2024) in ubuntu-22.04 the following commands i have used in the build directory- "../configure --prefix=/opt/netcdf-ifx/4.6.0 CPPFLAGS="-DNDEBUG -DpgiFortran -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/opt/zlib/include -I/home/nagarjuna/Desktop/HDF5_Intel/myhdfstuff/build/HDF_Group/HDF5/1.14.3/include -I/opt/netcdf_c1/include" LDFLAGS="-L/opt/zlib/lib -Wl,-rpath=/opt/zlib/lib -L/home/nagarjuna/Desktop/HDF5_Intel/myhdfstuff/build/HDF_Group/HDF5/1.14.3/lib -Wl,-rpath=/home/nagarjuna/Desktop/HDF5_Intel/myhdfstuff/build/HDF_Group/HDF5/1.14.3/lib -L/opt/netcdf_c1/lib -Wl,-rpath=/opt/netcdf_c1/lib " --enable-large-file-tests --with-pic --enable-static --enable-shared " and used these compilers export CC=icx export FC=mpiifx export F90=mpiifx export F77=mpiifx export CXX=icpx export MKL_TARGET_ARCH=intel64..Got error like this - "configure: error: cannot compute sizeof (off_t) See `config.log' for more details". How this issue can be resolved?

Cheers !!

jshn9515 commented 3 months ago

This problem could occur if you used different compilers between other dependencies and NetCDF-Fortran. Did you use the same compiler for all the libs?

Nagasapa commented 3 months ago

yes i have built zlib ,hdf5, netcdf-c with intel compilers(2024).

HathewayWill commented 2 months ago

@Nagasapa @jshn9515

Do you have cflags exported with -lgfortran?

WardF commented 2 months ago

Can you provide the config.log? This sometimes occurs when there is a problem linking the test program autotools uses to determine sizeof various variable types.

HathewayWill commented 2 months ago

@WardF

https://github.com/Unidata/netcdf-fortran/issues/439

There's mine with a sucessful run and a failed run.