BUG #2651: 8.2 - beta 1 does now compile with Sun Studio 11

Started by Rémy Beaumontover 19 years ago4 messagesbugs
Jump to latest
#1Rémy Beaumont
remyb@medrium.com

The following bug has been logged online:

Bug reference: 2651
Logged by: Remy Beaumont
Email address: remyb@medrium.com
PostgreSQL version: 8.2 - beta 1
Operating system: Solaris 10 on T2000
Description: 8.2 - beta 1 does now compile with Sun Studio 11
Details:

When we try to compile 8.2 - beta 1 on a T2000 wth Sun Studio 11, the build
fails at the following file:

make[5]: Entering directory
`/usr/home/remy/postgresql-8.2beta1/src/backend/utils/adt'
/opt/SUNWspro/bin/cc -Xa -xtarget=ultraT1 -fast -I../../../../src/include
-c -o float.o float.c
"float.c", line 112: identifier redeclared: cbrt
current : static function(double) returning double
previous: function(double) returning double :
"/usr/include/iso/math_c99.h", line 126
cc: acomp failed for float.c
make[5]: *** [float.o] Error 2

The flags used for compiling are: CC=/opt/SUNWspro/bin/cc
'CFLAGS=-xtarget=ultraT1 -fast'

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rémy Beaumont (#1)
Re: BUG #2651: 8.2 - beta 1 does now compile with Sun Studio 11

"Remy Beaumont" <remyb@medrium.com> writes:

When we try to compile 8.2 - beta 1 on a T2000 wth Sun Studio 11, the build
fails at the following file:

make[5]: Entering directory
`/usr/home/remy/postgresql-8.2beta1/src/backend/utils/adt'
/opt/SUNWspro/bin/cc -Xa -xtarget=ultraT1 -fast -I../../../../src/include
-c -o float.o float.c
"float.c", line 112: identifier redeclared: cbrt
current : static function(double) returning double
previous: function(double) returning double :
"/usr/include/iso/math_c99.h", line 126
cc: acomp failed for float.c

You need to find out why configure failed to detect that cbrt() is
available.

regards, tom lane

#3Zdenek Kotala
Zdenek.Kotala@Sun.COM
In reply to: Rémy Beaumont (#1)
Re: BUG #2651: 8.2 - beta 1 does now compile with Sun Studio 11

Remy Beaumont napsal(a):

The following bug has been logged online:

Bug reference: 2651
Logged by: Remy Beaumont
Email address: remyb@medrium.com
PostgreSQL version: 8.2 - beta 1
Operating system: Solaris 10 on T2000
Description: 8.2 - beta 1 does now compile with Sun Studio 11
Details:

When we try to compile 8.2 - beta 1 on a T2000 wth Sun Studio 11, the build
fails at the following file:

make[5]: Entering directory
`/usr/home/remy/postgresql-8.2beta1/src/backend/utils/adt'
/opt/SUNWspro/bin/cc -Xa -xtarget=ultraT1 -fast -I../../../../src/include
-c -o float.o float.c
"float.c", line 112: identifier redeclared: cbrt
current : static function(double) returning double
previous: function(double) returning double :
"/usr/include/iso/math_c99.h", line 126
cc: acomp failed for float.c
make[5]: *** [float.o] Error 2

The flags used for compiling are: CC=/opt/SUNWspro/bin/cc
'CFLAGS=-xtarget=ultraT1 -fast'

The cbrt function is not part of libc. It is located in the libm. Try
export LDFLAGS='-lm'

Zdenek

#4Rémy Beaumont
remyb@medrium.com
In reply to: Tom Lane (#2)
Re: BUG #2651: 8.2 - beta 1 does now compile with Sun Studio 11

Yes, that is the next item on my list.
I'm just trying to compile it for now on a T2000 with the best
possible optimization.

With PG 8.1.X. I saw a 30% to 40% performance increase on sorts when
compiling with Sun Studio 11 and -fast.

Rémy
On 25-Sep-06, at 22:02, Tom Lane wrote:

Show quoted text

"Remy Beaumont" <remyb@medrium.com> writes:

When we try to compile 8.2 - beta 1 on a T2000 wth Sun Studio 11,
the build
fails at the following file:

make[5]: Entering directory
`/usr/home/remy/postgresql-8.2beta1/src/backend/utils/adt'
/opt/SUNWspro/bin/cc -Xa -xtarget=ultraT1 -fast -I../../../../src/
include
-c -o float.o float.c
"float.c", line 112: identifier redeclared: cbrt
current : static function(double) returning double
previous: function(double) returning double :
"/usr/include/iso/math_c99.h", line 126
cc: acomp failed for float.c

You need to find out why configure failed to detect that cbrt() is
available.

regards, tom lane