Re: 8.2bet2 failed build on Solaris 10 / x86-64 / SUN Studio

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Lange <anlan(at)ida(dot)liu(dot)se>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: 8.2bet2 failed build on Solaris 10 / x86-64 / SUN Studio
Date: 2006-11-04 21:35:33
Message-ID: 454D07A5.8010204@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> Andreas Lange <anlan(at)ida(dot)liu(dot)se> writes:
>> Tom Lane wrote:
>>> I suppose there is something funny about pow() on your platform
>>> causing that probe to fail. What does config.log have at the
>>> "checking for library containing pow" step?
>>>
>> configure:5168: checking for library containing pow
>> configure:5198: /sw/sun-studio-11/SUNWspro/bin/cc -Xa -o conftest -fast
>> -fns=no -fsimple=1 -xtarget=opteron -xarch=amd64a conftest.c >&5
>> configure:5204: $? = 0
>> configure:5208: test -z
>> || test ! -s conftest.err
>> configure:5211: $? = 0
>> configure:5214: test -s conftest
>> configure:5217: $? = 0
>> configure:5287: result: none required
>
> Interesting. Could pow() actually be in libc on your machine?
> The other possible explanation is that it's a macro, but the
> AC_SEARCH_LIBS code seems to go out of its way to fail if that's
> the case.
>
> Anyway this illustrates the dilemma we face in trying to do a real probe
> for libm: the common functions (pow) are likely to be macro-ized, while
> uncommon ones might not be there at all (cbrt). Anyone have a better
> idea than reverting to the unconditional AC_CHECK_LIB(m, main) call?
>

Main problem is -fast switch. It modifies behavior of floating point
operation (it is reason why It is not good option for postgres) and use
another floating point libraries and some function are inlined. It is
reason why pow test passed with -fast switch without -lm switch.

Detail description of -fast you can found on
http://docs.sun.com/source/819-3688/cc_ops.app.html

Zdenek

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Balazs Nagy 2006-11-05 13:47:31 BUG #2737: hash indexing large table fails, while btree of same index works
Previous Message Thomas H. 2006-11-04 18:03:49 Re: BUG #2731: Cannot install PostgreSQL server on WinXP