[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


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.