Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

[UDUNITS #XBK-315364]: Problem Compiling udunits-1.12.4



Thomas,


> making `all' in directory /usr/local/src/udunits-1.12.4/src/udunits

> make[1]: Entering directory `/usr/local/src/udunits-1.12.4/src/udunits'
> make[2]: Entering directory `/usr/local/src/udunits-1.12.4/src/udunits'
> cc -c -g -O2 -I../lib -I../port/misc -Df2cFortran udunits.c
> udunits.c: In function 'main':
> udunits.c:113: warning: incompatible implicit declaration of built-in 
> function 'exit'
> cc -o udunits -g -O2 udunits.o -L/usr/local/src/udunits-1.12.4/src/lib 
> -ludunits -L/usr/local/src/udunits-1.12.4/src/port/misc -ludport
> /usr/local/src/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function 
> `dectime':
> /usr/local/src/udunits-1.12.4/src/lib/utlib.c:432: undefined reference to 
> `floor'
> /usr/local/src/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function 
> `decomp':
> /usr/local/src/udunits-1.12.4/src/lib/utlib.c:366: undefined reference to 
> `fmod'
> /usr/local/src/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function 
> `utPrint':
> /usr/local/src/udunits-1.12.4/src/lib/utlib.c:1298: undefined reference to 
> `log10'
> /usr/local/src/udunits-1.12.4/src/lib/utlib.c:1298: undefined reference to 
> `ceil'
> /usr/local/src/udunits-1.12.4/src/lib/libudunits.a(utlib.o): In function 
> `utRaise':
> /usr/local/src/udunits-1.12.4/src/lib/utlib.c:807: undefined reference to 
> `pow'
> collect2: ld returned 1 exit status
> make[2]: *** [udunits] Error 1

It looks like the C math functions aren't in the standard C runtime library.  
Try this:

1. Go to the top-level source-directory.

2. Execute the command "make distclean".

3. Set your environment variables as before.

4. Set the environment variable LD_MATH to "-lm".

5. Proceed with building the package as before starting with the execution of 
the configure(1) script.


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: XBK-315364
Department: Support UDUNITS
Priority: Normal
Status: Closed


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690