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

Re: 20030128: problems with udunits on compaq system



Jason,

> To: <address@hidden>
> From: Jason Roberts <address@hidden>
> Subject: problems with udunits on compaq system
> Organization: TPAC

The above message contained the following:

> I am having trouble getting udunits compiled on a compaq alpha system
> (I am not trying to do an install, I just need my own copy of the
> libudunits library).
> 
> It looks like the stack being used by yyparse is incorrect (compared to a
> working version of the library I installed on a SGI system).
> 
> The package compiles, but for example if you run udunits/udunits you get
> You have: days
> You want: hours
>     <hours> = <days>*1
>     <hours> = <days>/1
> 
> 
> 
> 
> the output of uname -a is
> OSF1 sc1 V5.1 1885 alpha
> 
> which cc returns
> /bin/cc
> 
> and the files config.log, configure.log, make.log, test.log and VERSION
> are attached.
> 
> Any help would be greatly appreciated.
> 
> Thanks and cheers
> 
> Jason
> 
> 
> Dr Jason Roberts
> TPAC
> GPO Box 252-37, Hobart, Tasmania, 7001, AUSTRALIA
> 
> Ph: (03) 6226 2990    Int'l Ph: +61 3 6226 2990
> Fax:(03) 6226 2973    Int'l Fax:+61 3 6226 2973
> Email: address@hidden

I was unable to duplicate your problem on our OSF/1 system:

    $ uname -a
    OSF1 dana.unidata.ucar.edu V5.1 1885 alpha

I also used /bin/cc.  My make(1) was /usr/bin/posix/make.

I noticed that your C compiler issued a warning that mine didn't:

    making `all' in directory /short/e93/jlr581/udunits-1.11.7/src/lib

    ln -s ../port/misc/udalloc.c .
    ln -s ../port/misc/udalloc.h .
    cc -c -O -I../port/misc -I../port/cfortran 
-DUT_DEFAULT_PATH='"/short/e93/jlr581
    /udunits-1.11.7/etc/udunits.dat"'  -std utlib.c
    cc: Warning: utlib.c, line 1081: In this statement, "getenv(...)" of type 
"int",
     is being converted to "pointer to const char". (cvtdiftypes)
            path    = getenv("UDUNITS_PATH");
    --------^

This could be the problem because -- on my OSF/1 system at least -- an
"int" is 32 bits while a "char*" is 64 bits.

The getenv(3) function should be declared by the <stdlib.h> header-file.
Your "configure.log" file seems to verify this:

    checking C header file <stdlib.h> for function getenv()... declared
    checking for string.h... yes

Yet the above warning indicates that "getenv()" is not declared. Would
you please investigate this by making the file "utlib.i" and searching
it for "getenv", e.g.,

    $ cd lib
    $ make utlib.i
    cc -E -I../port/misc -I../port/cfortran 
-DUT_DEFAULT_PATH='"/cluster/members/member0/tmp/udunits-1.11.7/etc/udunits.dat"'
  -std utlib.c > utlib.i
    $ grep getenv utlib.i
    extern char     *getenv  ( const char * ) ;
            path    = getenv("UDUNITS_PATH");

What does the above show on your system?

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