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

970220: some HPUX10 problems with netcdf



Mark,

> To: address@hidden
> From: Mark MacLennan <address@hidden>
> Subject: some HPUX10 problems with netcdf
> Organization: Center for Global and Regional Environmental Research
> Keywords: 199702202358.QAA28346

In the above message, you wrote:

> Here are some problems that I have encountered compiling 
> netcdf-2.4.3 under HPUX10.10 - they could all be easily fixed
> and the tests (make test) were all successful.
> 
> I also tried netcdf-3.3a and overcoming its problems are less
> obvious to me offhand - I have included that information at the
> end of this note.
> 
> I didn't see anything about this on the Unidata netcdf page so
> I thought I'd pass them along ...
> 
> cheers,
> MARK
> 
> - - ------------------------------------------------------------------------
> Mark J. MacLennan, Data Systems Coordinator
> Center for Global & Regional Environmental Research (CGRER)
> The University of Iowa
> 260 Iowa Advanced Technology Laboratories
> Iowa City, IA   52242-1297
> 319-335-3334 (-3337 FAX)
> 
> Email: address@hidden / address@hidden
> URL: http://www.cgrer.uiowa.edu/
> - - ------------------------------------------------------------------------
> 
> 
> I get the following error when using the configure file for netcdf-2.4.3
>  - the error does not occur when I switch to the "cc" rather than
> "c89" compiler ...
> - - -----
> atmos 126: ./configure --prefix=/opt/unidata
> creating cache ./config.cache
> checking for catman... no
> checking for fill-value usage... new usage
> checking the installation prefix... /opt/unidata
> checking the installation exec-prefix... /opt/unidata
> checking for C compiler... c89
> checking type of operating system... hpux10
> checking for ranlib... ranlib
> checking how to run the C preprocessor... c89 -E
> checking the C preprocessor... works
> checking for fort77... fort77
> checking for CC... CC
> checking for yacc... yacc
> checking for neqn... neqn
> checking for tbl... tbl
> checking for ar... ar
> checking for makeinfo... makeinfo
> checking for tar flags... -chof
> checking for dependency generation mechanism... c89 -M
> checking for C position-independent-code compile-option... 
> checking whether cross-compiling... yes
> checking size of int... configure: error: can not run test program while 
>                                           cross compiling

The above line indicates that the c89(1) compiler couldn't compile a
simple test file.  This is verified by the error messages below:

> - - ----
> last several lines of config.log:  (fixed by using cc instead of c89)
> 
> configure:1156: c89 -E  conftest.c >/dev/null 2>conftest.out
> configure:1197: c89 -E  conftest.c >/dev/null 2>conftest.out
> configure:1684: c89 -c -O +z  conftest.c 1>&5
> cc: error 2201: The -Oq02,al,ag,cn,Lm,sz,Ic,vo,lc,Mf,Po,es,rs,sp,in,vc,Pi,fa,
>    pe,Rr,Fl,pv,pa,nf,cp,lx! option to ccom is malformed; 
>    possible cc/ccom mismatch.
> configure:1712: c89 -o conftest -O   conftest.c  1>&5
> cc: error 2201: The -Oq02,al,ag,cn,Lm,sz,Ic,vo,lc,Mf,Po,es,rs,sp,in,vc,Pi,fa,
>    pe,Rr,Fl,pv,pa,nf,cp,lx! option to ccom is malformed; 
>    possible cc/ccom mismatch.

What's wrong with your c89(1) compiler?  Could the option `-O' (all by
itself: no argument) be invalid?

> 
> - - -----
> 
> This error was simple to fix ...
> 
> making `all' in directory /opt/unidata/netcdf-2.4.3/src/fortran
> 
> Make: Don't know how to make hpux10.m4.  Stop.
> 
> - - -----

I take it you just copied file `hpux9.m4' to file `hpux10.m4'.

> The following errors appear to due to a problem with the fort77
> compiler command not automatically adding the /opt/fortran/lib
> directory to its search path - it can be fixed by editing the Makefile
> (I've forwarded this problem along to HP to possibly check out ...)
> 
> making `test' in directory /opt/unidata/netcdf-2.4.3/src/fortran
> 
> fort77 -o ftest +U77 ftest.o -L../libsrc -lnetcdf
> /usr/ccs/bin/ld: Can't find library for -lU77
> *** Error exit code 1
> 
> making `test' in directory /opt/unidata/netcdf-2.4.3/src/ncgen
> 
> test0.f:
>    MAIN fgennc:
> /usr/ccs/bin/ld: Can't find library for -lU77
> *** Error exit code 1
> 
> - - ----------------------------------------------------------------------
> 
> While configure seems to work fine for netcdf-3.3a
> I get the following compilation error when runing make:
> 
> Making `all' in directory /opt/unidata/netcdf-3.3a/src/libsrc
> 
>         cc -c     attr.c
> cc: "netcdf.h", line 178: warning 5: "const" will become a keyword.
> cc: "netcdf.h", line 178: error 1000: Unexpected symbol: "char".
> cc: "netcdf.h", line 181: warning 5: "const" will become a keyword.
> cc: "netcdf.h", line 181: error 1000: Unexpected symbol: "char".
> cc: "netcdf.h", line 185: warning 5: "const" will become a keyword.
> cc: "netcdf.h", line 185: error 1000: Unexpected symbol: "char".
> cc: error 2017: Cannot recover from earlier errors, terminating.
> *** Error exit code 1

The only thing I can think of is that the C compiler isn't correctly
expanding the EXTERN macro in the file libsrc/netcdf.h.  Would you do
me a favor and run that file through the preprocessor and see what the
declaration for nc_inq_libvers() winds up being?  Thanks.

--------
Steve Emmerson   <address@hidden>