Problem compiling HDF components in NCL 6.0.0 on AIX

From: Peter Farrell <pfarrell_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 18 2012 - 16:42:53 MST

I am trying to build a 32-bit (code) version of NCL on an AIX system
s7801p41:/dt3/DOMAINS/katrina/postprd# uname -a
AIX s7801p41 1 6 00F627684C00
(In other words, a Power7 system running AIX 6.1. Note that I am building
a 32-bit application despite the fact that the operating system is 64
bits.)

When attempting to compile two files:
ncl*/ni/src/lib/nio/NclHDF.c
ncl*/ni/src/ncl/NclHDF.c

The compilation fails with an error message to the effect that NC_UOFFSET
is not defined. The problem would appear to be related to the following
code snippet:

#ifndef NC_USHORT
#define NC_UOFFSET 101
#define NC_USHORT DFNT_UINT16 + NC_UOFFSET
#define NC_UINT DFNT_UINT32 + NC_UOFFSET
#endif

NC_USHORT is defined unconditionally in netcdf.h. In addition there
appears to be an unconditional define
#define NC_64BIT_OFFSET 0x0200 /* Use large (64-bit) file offsets */
but no allowance for NC_UOFFSET. netcdf.h is included by virtue of
including mfhdf.h in the above two files.

I was able to work around the problem by deleting the complete #ifndev
sequence which resulted in working binaries. I have no idea whether this
is a valid work around.

Regards,
Peter Farrell
IBM Consulting I/T Specialist
Sydney, Australia

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 18 16:37:50 2012

This archive was generated by hypermail 2.1.8 : Mon Jan 23 2012 - 12:45:14 MST