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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Lange <anlan(at)ida(dot)liu(dot)se>
Cc: 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-03 15:15:47
Message-ID: 2280.1162566947@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andreas Lange <anlan(at)ida(dot)liu(dot)se> writes:
> configure:13462: checking for cbrt
> configure:13519: /sw/sun-studio-11/SUNWspro/bin/cc -Xa -o conftest -fast
> -fns=no -fsimple=1 -xtarget=opteron -xarch=amd64a conftest.c -lz
> -lrt -lsocket >&5
> "conftest.c", line 104: warning: statement not reached
> Undefined first referenced
> symbol in file
> cbrt conftest.o
> ld: fatal: Symbol referencing errors. No output written to conftest

Presumably the problem is that the cc call lacks "-lm".

Checking back against 8.1, I see that 8.1's configure has

AC_CHECK_LIB(m, main)

where 8.2 tries to do

AC_SEARCH_LIBS(pow, m)

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?

My inclination is to undo this particular change, and thus to
unconditionally include libm whenever it can be found. I can't imagine
there are any platforms where we don't need libm, given the fairly
extensive demands of utils/adt/float.c; furthermore, given the frequency
with with some of these functions are macro-ized or otherwise diddled
with, relying on an AC_SEARCH_LIBS test seems risky.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andreas Lange 2006-11-03 15:29:44 Re: 8.2bet2 failed build on Solaris 10 / x86-64 / SUN Studio
Previous Message Alvaro Herrera 2006-11-03 14:40:38 Re: 8.2bet2 failed build on Solaris 10 / x86-64 / SUN Studio