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

[netCDF #ZTF-912128]: Netcdf fortran 4.2 Compilation error



Hello,

> Hello sir
> 
> I am trying to compile the netcdf-fortran 4.2, I have succesfully compiled
> and installed the netcdf 4.2 c library, but when i try to compile
> netcdf-fortran 4.2 i get the following error. I have given the
> LD_LIBRARY_PATH and CPPFLAG and LDFLAG path correctly, even though i could
> not compile the code. The compile log and configure file is attached with
> this mail.
> 
> Please help me on this problem.

(...)

> checking netcdf.h usability... yes
> checking netcdf.h presence... yes
> checking for netcdf.h... yes
> checking for library containing nc_open... -lnetcdf

(...)

It appears that configure is finding a netcdf.h file properly, however it is 
not being included when fortran library is compiling.  Can you provide the 
'config.log' generated when you run configure for netcdf-fortran-4.2?  Also, if 
possible, can you check your netcdf.h file and see if it does in fact contain a 
definition for NC_CLASSIC_MODEL? It is possible that there is an older netcdf.h 
file on your system, and it is this file being found by configure.  If you have 
multiple netcdf.h files on your system, you will probably want to remove all 
but the version you have installed.

Incidentally, there are newer versions of netcdf-c available; netcdf-c 4.2 is 
fairly old.  You may want to install the latest release, netcdf-4.3.2.  It is 
available from http://github.com/Unidata/netcdf-c/releases.  

I will take a look at the config.log file when you send it and see if I can 
make sense of what is occurring.  Thank you, have a great day,

-Ward


> fort-v2compat.c: In function 'c_ncopn':
> fort-v2compat.c:274:33: error: 'NC_CLASSIC_MODEL' undeclared (first use in
> this function)
> rwmode > NC_WRITE + NC_SHARE + NC_CLASSIC_MODEL + NC_LOCK)
> ^
> fort-v2compat.c:274:33: note: each undeclared identifier is reported only
> once for each function it appears in
> make[2]: *** [fort-v2compat.lo] Error 1
> make[2]: Leaving directory
> `/home/amit/Softwares/netcdf-fortran-4.2/fortran'
> make[1]: *** [check] Error 2
> make[1]: Leaving directory
> `/home/amit/Softwares/netcdf-fortran-4.2/fortran'
> make: *** [check-recursive] Error 1
> 
> 
> --
> Best Regards
> 
> Amit Kumar Dubey
> Scientist-C
> Space Applications Centre,ISRO
> Ahmedabad- 380015
> Office Contact - 4333
> Contact - 09978979059
> 
> 
> 
> 
> 

Ticket Details
===================
Ticket ID: ZTF-912128
Department: Support netCDF
Priority: Normal
Status: Closed