[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #BUI-278362]: Netcdf-C-4.7.1 installs perfect but NOT netcdf-fortran, please help



Hello,

If you run the following command, what is the output you get?

    $ nm 
/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib/libnetcdf.so
 | grep nc_inq_var_chunking_ints

If you see this symbol defined, it would suggest that there is another 
libnetcdf library on your system somewhere that the compiler is picking up, 
instead of the more recently compiled one.  If it does not appear to be 
defined, can you send the config.log generated when you compile netcdf-c?

Thanks!

-Ward

> Hi there,
> I have been struggling for a long time in installing correctly the
> netcdf-fortran and netcdf-c libraries. The details are below.
> 
> 1. Finally, I am able to install netcdf-c-4.7.1 with all tests passed.
> 2. None of the fortran-netcdf's (tried with 4.4.5, 4.4.5, 4.5.0) are
> installing
> 
> Files for more information
> (I) My script used for installing the libraries is attached (named
> script.sh)
> (II) config.log from netcdf-fortran (config.log_fortran)
> (III) nohup.out( all outputs from executing script.sh)
> (Iv) readelf.out (the result of readelf -Ws libnetcdff.so in
> netcdf-fortran-4.5.0/fortran/.libs directory)
> 
> The 'make check'  gives:
> 
> Making check in libsrc
> make[1]: Entering directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/libsrc'
> make[1]: Nothing to be done for `check'.
> make[1]: Leaving directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/libsrc'
> Making check in fortran
> make[1]: Entering directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> make  check-am
> make[2]: Entering directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> make[2]: Nothing to be done for `check-am'.
> make[2]: Leaving directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> make[1]: Leaving directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/fortran'
> Making check in nf_test
> make[1]: Entering directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> make  check-am
> make[2]: Entering directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> make  nf_test tst_int64 tst_f77_v2 ftest nf03_test f03test tst03_f77_v2
> make[3]: Entering directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> /bin/sh ../libtool  --tag=F77   --mode=link
> /home/ytang/jjoshi/compilers/gcc9.1.0/bin/gfortran -I../fortran -O
> -L/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib
> -o nf_test f03lib_f_interfaces.o test_get.o test_put.o nf_error.o nf_test.o
> test_read.o test_write.o util.o f03lib.o ../fortran/libnetcdff.la -ldl -lm
> -lnetcdf
> libtool: link: /home/ytang/jjoshi/compilers/gcc9.1.0/bin/gfortran
> -I../fortran -O -o .libs/nf_test f03lib_f_interfaces.o test_get.o
> test_put.o nf_error.o nf_test.o test_read.o test_write.o util.o f03lib.o
> -L/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib
> ../fortran/.libs/libnetcdff.so -ldl
> /home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib/libnetcdf.so
> -lm -Wl,-rpath
> -Wl,/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0-gcc9.1.0/lib
> -Wl,-rpath
> -Wl,/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-c-4.7.1-gcc9.1.0/lib
> ../fortran/.libs/libnetcdff.so: undefined reference to
> `nc_set_chunk_cache_ints'
> ../fortran/.libs/libnetcdff.so: undefined reference to
> `nc_inq_var_chunking_ints'
> ../fortran/.libs/libnetcdff.so: undefined reference to
> `nc_get_chunk_cache_ints'
> ../fortran/.libs/libnetcdff.so: undefined reference to
> `nc_set_var_chunk_cache_ints'
> ../fortran/.libs/libnetcdff.so: undefined reference to
> `nc_get_var_chunk_cache_ints'
> ../fortran/.libs/libnetcdff.so: undefined reference to
> `nc_def_var_chunking_ints'
> collect2: error: ld returned 1 exit status
> make[3]: *** [nf_test] Error 1
> make[3]: Leaving directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> make[2]: *** [check-am] Error 2
> make[2]: Leaving directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> make[1]: *** [check] Error 2
> make[1]: Leaving directory
> `/home/ytang/jjoshi/softwares/cmaq_libsgcc9.1.0/netcdf-fortran-4.5.0/nf_test'
> make: *** [check-recursive] Error 1
> 
> Please, any help would be a great relief.
> 
> Thanks
> Regards
> Janak
> 
> 


Ticket Details
===================
Ticket ID: BUI-278362
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.