cbrt() broken in AIX

Поиск
Список
Период
Сортировка
Искать

cbrt() broken in AIX

От:
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

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:/libaccess/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.ocommands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.onodes/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.outils/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]: *** [all] Error 2
gmake[1]: 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



Re: cbrt() broken in AIX

От:
Thomas Pundt <mlists@rp-online.de>
Дата:
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


Re: cbrt() broken in AIX

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
André Volpato  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

Re: cbrt() broken in AIX

От:
"Dickson S. Guedes" <listas@guedesoft.net>
Дата:
2009/3/4 André Volpato :
> 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

Re: cbrt() broken in AIX

От:
André Volpato<andre.volpato@ecomtecnologia.com.br>
Дата:
Tom Lane escreveu:
André 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.
 
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.

-- 

[]´s, ACV

Re: cbrt() broken in AIX

От:
André Volpato<andre.volpato@ecomtecnologia.com.br>
Дата:
Dickson S. Guedes escreveu:
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? 
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...

-- 

[]´s, ACV

Re: cbrt() broken in AIX

От:
André Volpato<andre.volpato@ecomtecnologia.com.br>
Дата:
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



Re: cbrt() broken in AIX

От:
André Volpato<andre.volpato@ecomtecnologia.com.br>
Дата:
Dickson S. Guedes escreveu:
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?
 
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.

-- 

[]´s, ACV

Re: cbrt() broken in AIX

От:
"Dickson S. Guedes" <listas@guedesoft.net>
Дата:
2009/3/5 André Volpato :
> 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

Re: cbrt() broken in AIX

От:
André Volpato<andre.volpato@ecomtecnologia.com.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].


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



FAQ