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

[netCDF #KCV-409947]: netcdf config problems



Everything looks ok, except this:
> LD_LIBRARY_PATH=$/opt/local/lib/netcdf/4.6.0/lib:$/usr/local/opt/hdf5/lib
I suspect that the paths here are not absolute and that is causing the
libtool error:
>  libtool: link: only absolute run-paths are allowed
So, after setting LD_LIBRARY_PATH, so this bash command:
> printenv $LD_LIBRARY_PATH
I believe it will show something like this:
> LD_LIBRARY_PATH=opt/local/lib/netcdf/4.6.0/lib:usr/local/opt/hdf5/lib
Try changing the line to this:
> LD_LIBRARY_PATH=/opt/local/lib/netcdf/4.6.0/lib:/usr/local/opt/hdf5/lib





> 
> *I am a beginner in fortran and netcdf, and I am struggling with the
> library paths. Could you kindly give me any suggestions? *
> 
> *I install netcdf in  *
> */opt/local/lib/netcdf/4.6.0 (there is no n=libnetcdf.so file) *
> *and hdf5 library in *
> */usr/local/opt/hdf5*
> 
> *and  I install the netcdf-fortran following the instructions under
> "building with static libraries":*
> 
> CPPFLAGS="-I /opt/local/lib/netcdf/4.6.0/include -I
> /usr/local/opt/hdf5/include"
> 
> LDFLAGS="-L /opt/local/lib/netcdf/4.6.0/lib -L /usr/local/opt/hdf5/lib"
> 
> LD_LIBRARY_PATH=$/opt/local/lib/netcdf/4.6.0/lib:$/usr/local/opt/hdf5/lib
> 
> LIBS="-lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl"
> 
> ./configure --disable-shared --prefix=$/opt/local/lib/netcdf/4.6.0
> 
> 
> 
> *And obtained following messages: *
> 
> *nf_lib.c:177:1: **warning: **control may reach end of non-void function*
> 
> *      [-Wreturn-type]*
> 
> }
> 
> *^*
> 
> *nf_lib.c:187:1: **warning: **control may reach end of non-void function*
> 
> *      [-Wreturn-type]*
> 
> }
> 
> *^*
> 
> 2 warnings generated.
> 
> /bin/sh ../libtool  --tag=FC   --mode=compile gfortran  -g -O2 -c -o
> nf_nc4.lo  nf_nc4.f90
> 
> libtool: compile:  gfortran -g -O2 -c nf_nc4.f90 -o nf_nc4.o
> 
> /bin/sh ../libtool  --tag=FC   --mode=compile gfortran  -g -O2 -c -o
> netcdf4.lo  netcdf4.f90
> 
> libtool: compile:  gfortran -g -O2 -c netcdf4.f90 -o netcdf4.o
> 
> depbase=`echo nf_v2compat.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
> 
> /bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
> -I../libsrc     -g -O2 -DLONGLONG_IS_LONG -MT nf_v2compat.lo -MD -MP -MF
> $depbase.Tpo -c -o nf_v2compat.lo nf_v2compat.c &&\
> 
> mv -f $depbase.Tpo $depbase.Plo
> 
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../libsrc -g -O2
> -DLONGLONG_IS_LONG -MT nf_v2compat.lo -MD -MP -MF .deps/nf_v2compat.Tpo -c
> nf_v2compat.c -o nf_v2compat.o
> 
> /bin/sh ../libtool  --tag=FC   --mode=compile gfortran  -g -O2 -c -o
> module_netcdf_fortv2_c_interfaces.lo  module_netcdf_fortv2_c_interfaces.f90
> 
> libtool: compile:  gfortran -g -O2 -c module_netcdf_fortv2_c_interfaces.f90
> -o module_netcdf_fortv2_c_interfaces.o
> 
> /bin/sh ../libtool  --tag=FC   --mode=compile gfortran  -g -O2 -c -o
> nf_fortv2.lo  nf_fortv2.f90
> 
> libtool: compile:  gfortran -g -O2 -c nf_fortv2.f90 -o nf_fortv2.o
> 
> /bin/sh ../libtool  --tag=FC   --mode=link gfortran  -g -O2
> -version-number 6:1:1  -o libnetcdff.la -rpath
> opt/local/lib/netcdf/4.6.0/lib typeSizes.lo module_netcdf_nc_data.lo
> module_netcdf_nc_interfaces.lo module_netcdf_nf_data.lo
> module_netcdf_nf_interfaces.lo module_netcdf_f03.lo nf_attio.lo
> nf_control.lo nf_dim.lo nf_misc.lo nf_genatt.lo nf_geninq.lo nf_genvar.lo
> nf_vario.lo nf_var1io.lo nf_varaio.lo nf_varmio.lo nf_varsio.lo
> module_netcdf4_nc_interfaces.lo module_netcdf4_nf_interfaces.lo
> module_netcdf4_f03.lo nf_lib.lo nf_nc4.lo  netcdf4.lo  nf_v2compat.lo
> module_netcdf_fortv2_c_interfaces.lo nf_fortv2.lo  -lnetcdf
> 
> libtool: link: only absolute run-paths are allowed
> 
> make[2]: *** [libnetcdff.la] Error 1
> 
> make[1]: *** [check] Error 2
> 
> make: *** [check-recursive] Error 1
> 
> m-c02kgngcdncv:netcdf-fortran-4.4.4 huayunz$
> 
> *There are more things that I do not understand about the unknown:*
> 
> /usr/bin/uname -p = i386
> /bin/uname -X     = unknown
> 
> /bin/arch              = unknown
> /usr/bin/arch -k       = unknown
> /usr/convex/getsysinfo = unknown
> /usr/bin/hostinfo      = Mach kernel version:
> Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018;
> root:xnu-3789.73.8~1/RELEASE_X86_64
> 
> 
> *What is the problem and what do you think I should do the next? (I
> attached the config.log) This is real important for me, because I need to
> run the model to finish my thesis and to graduate this summer! I am looking
> forward to your reply. *
> 
> 
> *Many thanks,*
> *Huayun*
> --
> *Huayun Zhou*
> Master of Science 2018 | Conservation Ecology
> University of Michigan School for Environment and Sustainability
> address@hidden <address@hidden> | (734)-709-0816 <(734)%20881-0497>
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: KCV-409947
Department: Support netCDF
Priority: Critical
Status: Open
===================
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.