This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Feng,
> Thanks for your response. I still could not compile it successfully after
> setting environment parameters as below.
> setenv CC gcc
> setenv CPPFLAGS -Df2cFortran
> ./configure
> .....
> .....
> I am using c shell and not super user.
> Please see attached log files. It is appreciate help me to fix the problem.
Your "make.log" contained this:
gcc -o udunits -g -O2 udunits.o
-L/home/fliu/TOOLS/PLOTS/NCVIEW/udunits-1.12.4/src/lib -ludunits
-L/home/fliu/TOOLS/PLOTS/NCVIEW/udunits-1.12.4/src/port/misc -ludport
/home/fliu/TOOLS/PLOTS/NCVIEW/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In
function `dectime':
/home/fliu/TOOLS/PLOTS/NCVIEW/udunits-1.12.4/src/lib/utlib.c:432: undefined
reference to `floor'
...
It looks like the C runtime math functions aren't in the default C runtime
library. I suspect, therefore, that you'll have to reference the math library
manually.
Try this:
1) Execute the command "make distclean";
2) Set the environment variable LD_MATH to "-lm";
3) Execute the configure(1) script as before and the make(1)s as before.
Regards,
Steve Emmerson
Ticket Details
===================
Ticket ID: UTP-934011
Department: Support UDUNITS
Priority: Normal
Status: Closed