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

20030506: UDUNITS make problem: missing pow() & log10()


> To: address@hidden
> cc: address@hidden
> From: Ayal Anis <address@hidden>
> Subject: unidata make problem
> Organization: Texas A&M, Galveston
> Keywords: 200305061726.h46HQl7U029566

The above message contained the following:

> I am trying to comiple unidata on a SuSE 8.2 Linux box. 
> Seems like the ./configure goes fine but when issueing 
> the make all command it barfs with two errors: 
> make[1]: Entering directory `/home/ayal/temp/udunits-1.11.7/src/udunits'
> make[2]: Entering directory `/home/ayal/temp/udunits-1.11.7/src/udunits'
> /usr/bin/gcc -c -O -I../lib -I../port/misc -DNDEBUG -Df2cFortran udunits.c
> /usr/bin/gcc -o udunits -O udunits.o -L/home/ayal/temp/udunits-1.11.7/src/lib 
> -ludunits -L/home/ayal/temp/udunits-1.11.7/src/port/misc -ludport
> /home/ayal/temp/udunits-1.11.7/src/lib/libudunits.a(utlib.o)(.text+0xbff): In 
> function `utRaise':
> : undefined reference to `pow'
> /home/ayal/temp/udunits-1.11.7/src/lib/libudunits.a(utlib.o)(.text+0x160f): 
> In 
> function `utPrint':
> : undefined reference to `log10'
> collect2: ld returned 1 exit status
> make[2]: *** [udunits] Error 1
> make[2]: Leaving directory `/home/ayal/temp/udunits-1.11.7/src/udunits'
> make[1]: *** [program] Error 2
> make[1]: Leaving directory `/home/ayal/temp/udunits-1.11.7/src/udunits'
> make: *** [udunits/all] Error 1
> What should I do to get the pow and log10 functions? 

I appears that the functions pow(3M) and log10(3M) are not in your
default C runtime library.  From the output of the configure script:

    checking for (void)sin(0.0) in default library(s)... yes

I see that the sin(3M) function is, however, in the default C runtime 
library.  This is very odd: the same library should contain all the math

Find the C library that contains the pow(3M) and log10(3M) functions via
commands like the following:

    nm -g /usr/lib/libc.* | grep pow
    nm -g /usr/lib/libm.* | grep log10

Note that your GNU C implementation might locate the C runtime libraries
someplace other than in /usr/lib.

If you can't find the functions pow(3M) and log10(3M), then you have a
serious problem and should talk to your system administrator.

If you do find the functions and they exist in, for example, the C math
library (libm.*), then do the following:

    1.  Go to the top-level source directory.

    2.  Perform steps 3 through 5 described near the end of the file

    3.  Ensure that the environment variable LIBS references the
        relevant library, e.g.,

            export LIBS=-lm


            setenv LIBS -lm

        depending on your user shell.

    4.  Perform steps 6 through 9 described near the end of the file

Please let me know if this helps.

> Thanks for the help,
> Ayal Anis

Steve Emmerson