cbrt() broken in AIX
I´m trying to install postgres 8.3.6 at AIX 5.3, and I got a declaration
error that I presume its related to this [1]http://archives.postgresql.org/pgsql-patches/2003-05/msg00127.php thread.
Here´s some info:
- Bladecenter IBM JS22 - PowerPC_POWER6 quad 4GHZ 64 bits
- AIX 5.3.0
- Postgresql 8.3.6
- gcc version 4.2.0
- GNU Make 3.80
First I tryed to configure with no options, and then make throw this:
float.c:74: error: static declaration of 'cbrt' follows non-static declaration
After some googling, I find Bruce´s path back on 7.4, that removed my_cbrt trick.
So, I changed float.c to the old code (the whole HAVE_CBRT stuff),
and the declaration error was gone, but now I got this :
/usr/bin/ld -r -o SUBSYS.o access/SUBSYS.o bootstrap/SUBSYS.o
catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o
executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o
nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o
regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o
tsearch/SUBSYS.o utils/SUBSYS.o ../../src/timezone/SUBSYS.o
../../src/port/libpgport_srv.a
../../src/backend/port/aix/mkldexport.sh SUBSYS.o . > postgres.imp
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing
-fwrapv -L../../src/port -Wl,-blibpath:/usr/local/pgsql/lib:/usr/lib:/lib
access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o
commands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o
nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o
regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o tsearch/SUBSYS.o
utils/SUBSYS.o ../../src/timezone/SUBSYS.o ../../src/port/libpgport_srv.a
-Wl,-bE:../../src/backend/postgres.imp -lld -o postgres
ld: 0711-317 ERROR: Undefined symbol: .lrint
ld: 0711-317 ERROR: Undefined symbol: ._isnan
ld: 0711-317 ERROR: Undefined symbol: ._isinff
ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-317 ERROR: Undefined symbol: .tan
ld: 0711-317 ERROR: Undefined symbol: .sin
ld: 0711-317 ERROR: Undefined symbol: .cos
ld: 0711-317 ERROR: Undefined symbol: .atan2
ld: 0711-317 ERROR: Undefined symbol: .atan
ld: 0711-317 ERROR: Undefined symbol: .asin
ld: 0711-317 ERROR: Undefined symbol: .acos
ld: 0711-317 ERROR: Undefined symbol: .log10
ld: 0711-317 ERROR: Undefined symbol: .log
ld: 0711-317 ERROR: Undefined symbol: .exp
ld: 0711-317 ERROR: Undefined symbol: .floor
ld: 0711-317 ERROR: Undefined symbol: .pow
ld: 0711-317 ERROR: Undefined symbol: .ceil
ld: 0711-317 ERROR: Undefined symbol: ._isnanf
ld: 0711-317 ERROR: Undefined symbol: .rintf
ld: 0711-317 ERROR: Undefined symbol: .lrintf
ld: 0711-317 ERROR: Undefined symbol: .llrint
ld: 0711-317 ERROR: Undefined symbol: .llrintf
ld: 0711-317 ERROR: Undefined symbol: .sqrtf
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
gmake[2]: *** [postgres] Error 1
gmake[2]: Leaving directory `/usr/src/postgresql-8.3.6/src/backend'
gmake[1]http://archives.postgresql.org/pgsql-patches/2003-05/msg00127.php: *** [all] Error 2
gmake[1]http://archives.postgresql.org/pgsql-patches/2003-05/msg00127.php: Leaving directory `/usr/src/postgresql-8.3.6/src'
gmake: *** [all] Error 2
What can I do next ?
[1]: http://archives.postgresql.org/pgsql-patches/2003-05/msg00127.php
--
[]´s, ACV
Hi,
André Volpato schrieb:
I´m trying to install postgres 8.3.6 at AIX 5.3, and I got a declaration
error that I presume its related to this [1] thread.
[...]
After some googling, I find Bruce´s path back on 7.4, that removed
my_cbrt trick. So, I changed float.c to the old code (the whole
HAVE_CBRT stuff),
and the declaration error was gone, but now I got this :
[...]
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
[...]
utils/SUBSYS.o ../../src/timezone/SUBSYS.o ../../src/port/libpgport_srv.a
-Wl,-bE:../../src/backend/postgres.imp -lld -o postgres
ld: 0711-317 ERROR: Undefined symbol: .lrint
ld: 0711-317 ERROR: Undefined symbol: ._isnan
ld: 0711-317 ERROR: Undefined symbol: ._isinff
ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-317 ERROR: Undefined symbol: .tan
ld: 0711-317 ERROR: Undefined symbol: .sin
ld: 0711-317 ERROR: Undefined symbol: .cos
[...]
What can I do next ?
I don't have a clue about AIX, but that certainly looks like it's
missing a -lm now.
Ciao,
Thomas
=?ISO-8859-1?Q?Andr=E9_Volpato?= <andre.volpato@ecomtecnologia.com.br> writes:
First I tryed to configure with no options, and then make throw this:
float.c:74: error: static declaration of 'cbrt' follows non-static declaration
After some googling, I find Bruce�s path back on 7.4, that removed my_cbrt trick.
So, I changed float.c to the old code (the whole HAVE_CBRT stuff),
Instead, try putting back the "#define cbrt my_cbrt" line.
regards, tom lane
2009/3/4 André Volpato <andre.volpato@ecomtecnologia.com.br>:
I´m trying to install postgres 8.3.6 at AIX 5.3, and I got a declaration
error that I presume its related to this [1] thread.Here´s some info:
- Bladecenter IBM JS22 - PowerPC_POWER6 quad 4GHZ 64 bits
- AIX 5.3.0
- Postgresql 8.3.6
- gcc version 4.2.0
- GNU Make 3.80
(...)
Here:
postgres@db01 $ id
uid=204(postgres) gid=1(staff)
postgres@db01 $ export CC="gcc"
postgres@db01 $ export CFLAGS="-maix64"
postgres@db01 $ export LDFLAGS="-Wl,-bbigtoc"
postgres@db01 $ export OBJECT_MODE=64
postgres@db01 $ export AR="ar -X64"
postgres@db01 $ ./configure --enable-integer-datetimes
--prefix=/srv/postgresql/8.3.6
....
postgres@db01 $ make
...
...
And all is done fine. Course, all above is for 64 bits compilling.
How you are trying that?
[]s
Dickson S. Guedes
-
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://planeta.postgresql.org.br
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>Tom Lane escreveu:</pre>
<blockquote cite="mid:7315.1236202606@sss.pgh.pa.us" type="cite">
<pre wrap="">=?ISO-8859-1?Q?Andr=E9_Volpato?= <a class="moz-txt-link-rfc2396E" href="mailto:andre.volpato@ecomtecnologia.com.br"><andre.volpato@ecomtecnologia.com.br></a> writes:
</pre>
<blockquote type="cite">
<pre wrap="">First I tryed to configure with no options, and then make throw this:
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">float.c:74: error: static declaration of 'cbrt' follows non-static declaration
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
<blockquote type="cite">
<pre wrap="">After some googling, I find Bruce´s path back on 7.4, that removed my_cbrt trick.
So, I changed float.c to the old code (the whole HAVE_CBRT stuff),
</pre>
</blockquote>
<pre wrap=""><!---->
Instead, try putting back the "#define cbrt my_cbrt" line.
</pre>
</blockquote>
<pre>
You mean only this line ? What I have done is this :
(I cant access the box right now, so I dont have diff output)
float.c
From :
> #ifndef HAVE_CBRT
> static double cbrt(double x);
> #endif /* HAVE_CBRT */
To:
> #ifndef HAVE_CBRT
> #define cbrt my_cbrt
> static double cbrt(double x);
> #else
> #if !defined(nextstep)
> extern double cbrt(double x);
> #endif
> #endif /* HAVE_CBRT */
And that give the Undefined symbol errors.
Anyway, I´ll try putting back just the my_cbrt line.
</pre>
<pre class="moz-signature" cols="72">--
[]´s, ACV</pre>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>Dickson S. Guedes escreveu:</pre>
<blockquote
cite="mid:ae46fee10903041602x8d41379w5d724c9208c7396f@mail.gmail.com"
type="cite">
<pre wrap="">2009/3/4 André Volpato <a class="moz-txt-link-rfc2396E" href="mailto:andre.volpato@ecomtecnologia.com.br"><andre.volpato@ecomtecnologia.com.br></a>:
</pre>
<blockquote type="cite">
<pre wrap="">I´m trying to install postgres 8.3.6 at AIX 5.3, and I got a declaration
error that I presume its related to this [1] thread.
Here´s some info:
- Bladecenter IBM JS22 - PowerPC_POWER6 quad 4GHZ 64 bits
- AIX 5.3.0
- Postgresql 8.3.6
- gcc version 4.2.0
- GNU Make 3.80
(...)
</pre>
</blockquote>
<pre wrap=""><!---->
Here:
postgres@db01 $ id
uid=204(postgres) gid=1(staff)
postgres@db01 $ export CC="gcc"
postgres@db01 $ export CFLAGS="-maix64"
postgres@db01 $ export LDFLAGS="-Wl,-bbigtoc"
postgres@db01 $ export OBJECT_MODE=64
postgres@db01 $ export AR="ar -X64"
postgres@db01 $ ./configure --enable-integer-datetimes
--prefix=/srv/postgresql/8.3.6
....
postgres@db01 $ make
...
...
And all is done fine. Course, all above is for 64 bits compilling.
How you are trying that?
</pre>
</blockquote>
<pre>
I cant access the box now, so I´ll definetly try this later.
I try configuring with no options, and no flags where given at all.
That was my first try to compile on AIX, after a 7 month delay from IBM...
</pre>
<pre class="moz-signature" cols="72">--
[]´s, ACV</pre>
</body>
</html>
Thomas Pundt escreveu:
Hi,
André Volpato schrieb:
[...]
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
[...]
utils/SUBSYS.o ../../src/timezone/SUBSYS.o ../../src/port/libpgport_srv.a
-Wl,-bE:../../src/backend/postgres.imp -lld -o postgres
ld: 0711-317 ERROR: Undefined symbol: .lrint
ld: 0711-317 ERROR: Undefined symbol: ._isnan
ld: 0711-317 ERROR: Undefined symbol: ._isinff
ld: 0711-317 ERROR: Undefined symbol: .sqrt
ld: 0711-317 ERROR: Undefined symbol: .tan
ld: 0711-317 ERROR: Undefined symbol: .sin
ld: 0711-317 ERROR: Undefined symbol: .cos
[...]
What can I do next ?
I don't have a clue about AIX, but that certainly looks like it's
missing a -lm now.
I cant put -lm in LDFLAGS, the system cant find libm.
Well, I´m gonna install libm from the CD and try again.
Thanks.
--
[]´s, ACV
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre>Dickson S. Guedes escreveu:</pre>
<blockquote
cite="mid:ae46fee10903041602x8d41379w5d724c9208c7396f@mail.gmail.com"
type="cite">
<pre wrap="">2009/3/4 André Volpato <a class="moz-txt-link-rfc2396E" href="mailto:andre.volpato@ecomtecnologia.com.br"><andre.volpato@ecomtecnologia.com.br></a>:
</pre>
<blockquote type="cite">
<pre wrap="">I´m trying to install postgres 8.3.6 at AIX 5.3, and I got a declaration
error that I presume its related to this [1] thread.
Here´s some info:
- Bladecenter IBM JS22 - PowerPC_POWER6 quad 4GHZ 64 bits
- AIX 5.3.0
- Postgresql 8.3.6
- gcc version 4.2.0
- GNU Make 3.80
(...)
</pre>
</blockquote>
<pre wrap=""><!---->
Here:
postgres@db01 $ id
uid=204(postgres) gid=1(staff)
postgres@db01 $ export CC="gcc"
postgres@db01 $ export CFLAGS="-maix64"
postgres@db01 $ export LDFLAGS="-Wl,-bbigtoc"
postgres@db01 $ export OBJECT_MODE=64
postgres@db01 $ export AR="ar -X64"
postgres@db01 $ ./configure --enable-integer-datetimes
--prefix=/srv/postgresql/8.3.6
....
postgres@db01 $ make
...
...
And all is done fine. Course, all above is for 64 bits compilling.
How you are trying that?
</pre>
</blockquote>
<pre>
Guedes my friend, that doesnt work either.
First, I put back only the "define my_cbrt" line in float.c, and then tryed to configure with all the flags above.
The "Undefined symbols" errors keep coming.
As Thomas pointed out, I think my AIX is missing libm.
I will try to install it and post again when I have some news.
</pre>
<pre class="moz-signature" cols="72">--
[]´s, ACV</pre>
</body>
</html>
2009/3/5 André Volpato <andre.volpato@ecomtecnologia.com.br>:
Guedes my friend, that doesnt work either.
":(
First, I put back only the "define my_cbrt" line in float.c, and then tryed
to configure with all the flags above.The "Undefined symbols" errors keep coming.
As Thomas pointed out, I think my AIX is missing libm.
I will try to install it and post again when I have some news.
Please, install the linuxtoolbox for AIX, try compile again and tell
us. It means that somethings is missing in your box.
[]s
Dickson S. Guedes
-
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://planeta.postgresql.org.br
Dickson S. Guedes escreveu:
[...]
Please, install the linuxtoolbox for AIX, try compile again and tell
us. It means that somethings is missing in your box.
Well done.
It works fine now, after I solved some incompatibilities between 32/64 bits, as Tom pointed out here [1]http://markmail.org/message/pqkwu2zfaypzi62p.
So, the flags that make it:
CC="gcc -maix64"
CFLAGS="-maix64"
LDFLAGS="-Wl,-bbigtoc,-lm"
OBJECT_MODE=64
AR="ar -X64"
The math libraryes were installed as well: bos.adt.libm
Thank you all for help!
[1]: http://markmail.org/message/pqkwu2zfaypzi62p
--
[]´s, ACV