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

Re: 20040203: Udunits install on Linux Suse 8.2 - Solution



Paul,

>Date: Tue, 3 Feb 2004 18:36:46 +0100 (MET)
>From: Paul Della-Marta <address@hidden>
>Organization: University of Bern
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20040203: Udunits install on Linux Suse 8.2 - Solution 
>Keywords: 200402030902.i1392Zp1024285 UDUNITS SuSE Linux

The above message contained the following:

> here you go...hopefully you have the right files

They're the right ones.  Thanks.

The "configure.log" file contained this:

    ...
    checking for C math library... 
    checking for (void)sin(0.0) in default library(s)... yes
    checking style for cfortran.h... Standard
    ...

And the "config.log" file contained this:

    ...
    configure:2083: checking for C math library
    configure:2093: checking for (void)sin(0.0) in default library(s)
    configure:2102: c89 -o conftest -O   conftest.c  1>&5
    configure:2186: checking style for cfortran.h
    ...

Apparently, the "-lm" math library was not needed in order to link
together a test program that referenced the sin(3) function.  The test 
program was, effectively,

    int main()
    {
        (void)sin(0.0);
        return 0;
    }

Because you said that the "-lm" library was necessary, I can only assume
that the compiler ignored the "sin()" call above because the return
value wasn't used and the compiler knew that the function had no side
effects.

Would you please verify that the above program links correctly without
reference to the "-lm" library (use the command "c89 -O conftest.c").

A slight variation of the above test might fix this problem.  Would you
please try to link the following program without referring to the "-lm"
library:

    int main()
    {
        return sin(0.0) != 0;
    }

Regards,
Steve Emmerson


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.