Known Problems with UDUNITS
This is where we document known problems and their solutions (where possible).
Some users have reported an error message from the m4 utility in building
on CRAY systems:
...
returning to directory /src
port/fortc/fortc -O unicos utlib.fc > utlib.c \
|| (rm -f utlib.c; exit 1)
m4:/tmp/fortc42212_2:322 can't open file
divert(1)
Make: "port/fortc/fortc -O unicos utlib.fc > utlib.c \
|| (rm -f utlib.c; exit 1)": Error code 1
Stop.
This problem is due to a bug in the UNICOS m4 utility. The workaround is
to build the necessary files, utlib.c and fortc.c, for UNICOS on
a different platform via the following commands
cd lib
../port/fortc/fortc -L ../port/fortc -O unicos utlib.fc > utlib.c
../port/fortc/fortc -L ../port/fortc -O unicos fortc.fc > fortc.c
The resulting files should then be copied back to the CRAY and a make should
be re-executed. Since the modification times on these *.c files should
be later than on their *.fc sources, the fortc that invokes the
Cray m4 won't be used.
There is a problem in the handling of time in all versions of the UDUNITS library
prior to version 1.10. The temporal algorithms in the pre-1.10 libraries are valid
only for times after October 15, 1582 (when the Gregorian calendar was adopted).
At some time prior to that point, the algorithms return incorrect results. This
has caused problems for at least one user who used a temporal unit of "hours since
1-1-1". The exact time at which the algorithms break down is unknown, but year
1 is definitely in the invalid region.
If this concerns you, then please contact the support address below.
On some systems, the building of the Perl extension module fails with an error
similar to the following:
making `dynamic' in directory /usr/local/udunits-1.10.2/src/perl
/usr/local/bin/perl -I/usr/local/lib/perl5/sun4-solaris -I/usr/local/lib/perl5 /
usr/local/lib/perl5/ExtUtils/xsubpp -typemap /usr/local/lib/perl5/ExtUtils/typem
ap -typemap typemap UDUNITS.xs >UDUNITS.tc && mv UDUNITS.tc UDUNITS.c
cc -c -O -Kpic -I/usr/local/lib/perl5/sun4-solaris/CORE -I../lib UDUNITS.c
Running Mkbootstrap for UDUNITS ()
chmod 644 UDUNITS.bs
sh: ./blib/auto/UDUNITS/.packlist: cannot create
*** Error code 1
make: Fatal error: Command failed for target `UDUNITS.bs'
Current working directory /usr/local/udunits-1.10.2/src/perl
*** Error code 1
make: Fatal error: Command failed for target `perl/dynamic'
I suspect that this error is due to a bug in the way perl builds extension modules.
The workaround is to create the relevant file, e.g.
% touch perl/blib/auto/UDUNITS/.packlist
and then re-execute the make command. It should succeed the second time.
This page was prepared by
Steve Emmerson.
Questions or comments can be sent to <plaza@unidata.ucar.edu>.