[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #SVC-194320]: ifort link issue
- Subject: [netCDF #SVC-194320]: ifort link issue
- Date: Thu, 05 May 2011 16:46:31 -0600
> Dear netCDF support staff,
>
> My system is:
>
> Red Hat Enterprise Linux 5
> FC = ifort (version 11.1)
> CC = gcc (I do NOT have icc)
>
> netcdf-4.1.2 (or netcdf-4.1.1 the same) compiled with no effort:
>
> 1) ./configure --prefix=/home/me/mynetcdf
> automatically found the 'ifort' and 'gcc'
>
> 2) make check install
> passed all tests.
>
> ----------------------
>
> But when I compile an application (both attached and below),
> it gives a loadtime and runtime error each:
>
>
>
> %
> % ifort -I/home/me/mynetcdf/include -L/home/me/mynetcdf/lib \
> -lnetcdff -lnetcdf test.f90
> /opt/intel/Compiler/11.1/056/lib/intel64/libimf.so: warning: warning:
> feupdateenv is not implemented and will always fail
> %
> %
> % a.out
> a.out: error while loading shared libraries: libnetcdff.so.5: cannot open
> shared object file: No such file or directory
>
>
> %
> % ifort -I/home/me/mynetcdf/include -L/home/me/mynetcdf/lib \
> -lnetcdff -lnetcdf -limf test.f90
> % # NOW COMPILES !
> %
> % a.out
> a.out: error while loading shared libraries: libnetcdff.so.5: cannot open
> shared object file: No such file or directory
> % # BUT THE SAME RUNTIME ERROR !
>
>
>
> Could you please suggest what I can do?
>
>
> BTW, the contents of the /home/me/mynetcdf/lib are:
> %
> % dir /home/me/mynetcdf/lib
> libnetcdf.a libnetcdff.a libnetcdf.so@
> libnetcdf_c++.a libnetcdff.la* libnetcdf.so.7@
> libnetcdf_c++.la* libnetcdff.so@ libnetcdf.so.7.0.1*
> libnetcdf_c++.so@ libnetcdff.so.5@ pkgconfig/
> libnetcdf_c++.so.4@ libnetcdff.so.5.1.0*
> libnetcdf_c++.so.4.1.0* libnetcdf.la*
>
>
> Thanks in advance:
> Mike
>
> -----------------------------
Howdy Mike!
This is a consequence of using shared libraries. See our FAQ for a full
explanation.
http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#Shared%20Libraries
You can either set environmental variable LD_LIBRARY_PATH to point at the
directory where you installed the netCDF library, or else you can do a make
uninstall and start over, this time using --disable-shared to the configure.
Good luck,
Ed
Ticket Details
===================
Ticket ID: SVC-194320
Department: Support netCDF
Priority: Normal
Status: Closed