Re: Build error: math library not linked

From: Federico Di Gregorio <federico(dot)digregorio(at)dndg(dot)it>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Build error: math library not linked
Date: 2011-03-16 11:41:31
Message-ID: 4D80A1EB.6040601@dndg.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 16/03/11 12:29, Daniele Varrazzo wrote:
> On Mon, Mar 14, 2011 at 2:09 PM, Federico Di Gregorio
> <federico(dot)digregorio(at)dndg(dot)it> wrote:
>
>> > In fact compiling with --no-undefined throws a lot of errors. Can I ask
>> > you why you use it? If it is the correct thing to do we should add
>> > --no-undefined to all builds and pull in the right libraries.
> "man floor(3)" says that link should be done with -lm, so I think it's
> probably just thanks to a tolerant linker that the problem has not
> emerged before (I don't know then if this level of tolerance is the
> least we can expect or if gcc is a very patient guy).
>
> Is it safe enough to add -lm to the linker flags for all the other
> distro? I think so - but I'm no authority on linking at all. I don't
> think instead we should be as strict as add --no-undefined: maybe
> having a mandriva builder in the build farm to check for regressions
> would be enough (it would be great if Christeas could provide it).

At least on Debian (Ubuntu), RedHat and OpenSUSE should be fine.
Adding --no-undefined also seems a good idea to catch future errors.

federico

--
Federico Di Gregorio federico(dot)digregorio(at)dndg(dot)it
Studio Associato Di Nunzio e Di Gregorio http://dndg.it
Those who do not study Lisp are doomed to reimplement it. Poorly.
-- from Karl M. Hegbloom .signature

In response to

Browse psycopg by date

  From Date Subject
Next Message Gavin M. Roy 2011-03-18 18:31:23 double free issue in 2.4 (and previous versions)
Previous Message Daniele Varrazzo 2011-03-16 11:29:28 Re: Build error: math library not linked