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

970814: NetCDF 3.3.1 build problem: HPUX



Roger,

> To: "support" <address@hidden>
> From: "GOLDSMITH, ROGER" <address@hidden>
> Organization: Woods Hole Oceanographic Institution (WHOI)
> Keywords: 199708141502.JAA20963

In the above message, you wrote:

> To: NetCDF support,
>    I've installed NetCDF 3.3.1 on a Ultrix and SunOS system but have 
> encountered a bit of a snag installing on a HP 4331A running HPUX.
> Problem #1 is the configure procedure crapping out at the test:
>     checking for C-equivalent to FORTRAN routine \"SUB\""
> This was circumvented by telling it I didn't have a FORTRAN compiler,
> hence the 'fdum' below.

Just FYI, a better way to ignore the Fortran interface is to set
the FC environment variable to the empty string prior to executing
the configure script.  This will cause the configure script and the
subsequent makefiles to ignore all the Fortran stuff.

'configure' then seems to work although I 
> am suspicious of the tests for
>     st_blksize in struct stat... (cached) no
> The other messages seem to be in the POSIX setups.  At one time I was
> encountering trouble with nc.c in that it could not find the EEXIST
> definition, another POSIX thing located in /usr/include/sys/errno.h.
> That seemed to right itself but it looks like there is a lack of 
> accounting for definitions of things like 
>      _INCLUDE_POSIX_SOURCE 
>      _FCNTL_INCLUDED
>      _SYS_FCNTL_INCLUDED
> in the generation of libsrc/ncconfig.h
> 
> Has this been ported on this type of HP machine?  This is sort of grinding 
> things along as it is needed for a new Matlab application.  Any help or
> ideas would be appreciated.
>                                              Roger Goldsmith
>                                              508/289-2770
>                                              address@hidden
> 
> VVVVVVVVVV VERSION:
> 3.3.1
> 
> 
> 
> VVVVVVVVVV Results of configure:
> loading cache ./config.cache
> checking for m4... (cached) m4
> checking for xlc... (cached) c89
> checking C compiler... works
> checking how to make dependencies... false
> checking for CC... (cached) c++
> checking C++ compiler "c++"... works
> checking how to run the C preprocessor... (cached) c89 -E
> checking for fdum... no
> checking for FORTRAN .F compiler... 
> checking for FORTRAN preprocessor... c89 -E
> checking for math library
> checking for -lc... (cached) no
> checking for -lm... (cached) yes
> checking for ar... (cached) ar
> checking for ranlib... (cached) ranlib
> checking for stdlib.h... (cached) yes
> checking for sys/types.h... (cached) yes
> checking for strerror... (cached) yes
> checking for ftruncate... (cached) yes
> checking for st_blksize in struct stat... (cached) no
> checking whether cross-compiling... (cached) no
> checking for IEEE floating point format... yes
> checking for ANSI C header files... (cached) yes
> checking for size_t... (cached) yes
> checking for off_t... (cached) no
> checking for ssize_t... (cached) no
> checking for ptrdiff_t... (cached) yes
> checking for uchar... (cached) no
> checking whether char is unsigned... (cached) no
> checking whether byte ordering is bigendian... (cached) yes
> checking size of short... (cached) 2
> checking size of int... (cached) 4
> checking size of long... (cached) 4
> checking size of float... (cached) 4
> checking size of double... (cached) 8
> checking size of off_t... (cached) 4
> checking size of size_t... (cached) 4
> checking for manual-page index command... 
> checking binary distribution directory... /home/ftp/pub/binary/dummy_system
> creating ./config.status
> creating macros.make
> udcreating fortran/nfconfig.inc
> fortran/nfconfig.inc is unchanged
> creating libsrc/ncconfig.h
> 
> 
> 
> VVVVVVVVVV Contents of configure.log:
> This file contains any messages produced by compilers while
> running configure, to aid debugging if configure makes a mistake.
> 
> configure:1017: c89 -c -O -DNDEBUG conftest.c 1>&5
> configure:1150: c++ -c  -DNDEBUG conftest.C 1>&5
> configure:2322: c89 -o conftest -O -DNDEBUG  conftest.c  1>&5
> 
> 
> 
> VVVVVVVVVV Current paths, definitions, etc.:
> argv  ()
> autologout    600
> cwd   /users/roger/netcdf/netcdf-3.3.1/src
> history       200
> home  /home/roger
> path  (. /home/roger/bin /bin /usr/local/gmt/bin /usr/bin /usr/local
>            /usr/ucb /usr/etc /usr/bin/X11 /usr/local/bin /usr/lang 
>            /usr/ioffice/bin /usr/include /usr/include/sys 
>            /usr/local/matlab5/bin /usr/local/tex/bin/sun4 
>            /usr/local/netcdf/bin /opt/fortran/bin /opt/ansic/bin 
>            /usr/local/HB-1.2/bin /usr/local/HB-1.2/src 
> /users/mae3.0/apple/bin)
> prompt        joshua !: 
> savehist      20
> shell /usr/bin/csh
> status        0
> system        joshua
> term  vt300
> 
> 
> 
> VVVVVVVVVV Results of make:
> Making `all' in directory /home/roger/netcdf/netcdf-3.3.1/src/libsrc
> 
>         c89 -c -O -I.  -DNDEBUG ncio.c
> cc: "posixio.c", line 103: error 1574: Unknown size for "sb".
> cc: "posixio.c", line 106: error 1530: Undefined struct or union.
> cc: "posixio.c", line 106: error 1563: Expression in if must be scalar.
> cc: "posixio.c", line 748: error 1588: "O_RDWR" undefined.
> cc: "posixio.c", line 748: error 1588: "O_CREAT" undefined.
> cc: "posixio.c", line 748: error 1588: "O_TRUNC" undefined.
> cc: "posixio.c", line 765: error 1588: "O_EXCL" undefined.
> cc: "posixio.c", line 841: error 1588: "O_RDWR" undefined.
> cc: "posixio.c", line 841: error 1588: "O_RDONLY" undefined.
> *** Error exit code 1
>                      
> Stop.                                   
> *** Error exit code 1
>      
> Stop.                                                   
> *** Error exit code 1
> 
> Stop.
> 
> 
> ------- End of Forwarded Message

I suspect that your operating system is HP-UX 10.  This problem has an
easy solution.  Try the following:

    1.  Go to the top-level source directory.

    2.  Execute the command "make distclean".

    3.  Remove the file "config.cache" if it exists.

    4.  Set your environment variables as before.  Additionally:
    
        If you don't want the Fortran interface, then set the
        environment variable FC to the empty string; otherwise, you
        could use the follwing settings to build the Fortran interface:

            FC=fort77           # assuming you have it
            FFLAGS='-O3 -w'

        Ensure that the environment variable CPPFLAGS contains the
        string "-D_HPUX_SOURCE".  This is the key that we just dicovered
        for HP-UX 10 systems.

    5.  (Re)execute the configure script.
        Redirect standard output and standard error to a file.
        If this step fails, then stop and send me the file and the file
        "config.log".

    6.  Execute the command "make".
        Redirect standard output and standard error to a file.
        If this step fails, then stop and send me the file.

    7.  Execute the command "make test".
        Redirect standard output and standard error to a file.
        If this step fails, then stop and send me the file.

    8.  Execute the command "make install".
        Redirect standard output and standard error to a file.
        If this step fails, then stop and send me the file.

    9.  Execute the command "make clean".

Please let me know if this helps so that I can close your trouble
ticket.

--------
Steve Emmerson   <http://www.unidata.ucar.edu>