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

[UDUNITS #RMZ-185423]: problems building udunits-1.12.4



Ellyn,

> Imagine that, a non-conforming compilation environment!  Ha!
> 
> The trick helped, but make in udunits doesn't seem to be finding some
> simple math functions...
> address@hidden udunits]# make
> make[1]: Entering directory `/usr/local/udunits-1.12.4/src/udunits'
> c89 -c -g -O2 -I../lib -I../port/misc -Df2cFortran -D_XOPEN_SOURCE=500
> udunits.c
> c89 -o udunits -g -O2 udunits.o -L/usr/local/udunits-1.12.4/src/lib
> -ludunits -L/usr/local/udunits-1.12.4/src/port/misc -ludport
> /usr/local/udunits-1.12.4/src/lib/libudunits.a(utlib.o)(.text+0x37d): In
> function `dectime':
> /usr/local/udunits-1.12.4/src/lib/utlib.c:432: undefined reference to
> `floor'
> /usr/local/udunits-1.12.4/src/lib/libudunits.a(utlib.o)(.text+0x418):/usr/local/udunits-1.12.4/src/lib/utlib.c:366:
> undefined reference to `fmod'
> /usr/local/udunits-1.12.4/src/lib/libudunits.a(utlib.o)(.text+0xb07): In
> function `utRaise':
> /usr/local/udunits-1.12.4/src/lib/utlib.c:807: undefined reference to `pow'
> /usr/local/udunits-1.12.4/src/lib/libudunits.a(utlib.o)(.text+0xf45): In
> function `utPrint':
> /usr/local/udunits-1.12.4/src/lib/utlib.c:1298: undefined reference to
> `log10'
> /usr/local/udunits-1.12.4/src/lib/libudunits.a(utlib.o)(.text+0xf4d):/usr/local/udunits-1.12.4/src/lib/utlib.c:1298:
> undefined reference to `ceil'
> collect2: ld returned 1 exit status
> make[1]: *** [udunits] Error 1
> make[1]: Leaving directory `/usr/local/udunits-1.12.4/src/udunits'
> make: *** [program] Error 2

Looks like you'll need to tell the build procedure to use a
particular math library.

Assuming that the missing functions are in the "m" library (e.g.,
/usr/lib/libm.a), then try the following:

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

2.  Execute the command "make distclean".

3.  Execute the "configure" script with at least the following
    arguments:

    ./configure CPPFLAGS=-D_XOPEN_SOURCE=500 LD_MATH=-lm

    If you don't want or need the Perl interface, the add the
    following argument:

        PERL=''

4.  Execute the command "make"

5.  Execute the command "make install".

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: RMZ-185423
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.