2002-02-02 02:23:24 +08:00
|
|
|
From: Zeugswetter Andreas <ZeugswetterA@spardat.at>
|
2006-04-06 06:55:05 +08:00
|
|
|
$Date: 2006/04/05 22:55:05 $
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2002-11-12 04:04:05 +08:00
|
|
|
On AIX 4.3.2 PostgreSQL compiled with the native IBM compiler xlc
|
|
|
|
(vac.C 5.0.1) passes all regression tests. Other versions of OS and
|
|
|
|
compiler should also work. If you don't have a powerpc or use gcc you
|
|
|
|
might see rounding differences in the geometry regression test.
|
1999-09-14 23:34:49 +08:00
|
|
|
|
2000-11-09 12:17:53 +08:00
|
|
|
Use the following configure flags in addition to your own
|
|
|
|
if you have readline or libz there:
|
2000-04-18 02:05:00 +08:00
|
|
|
--with-includes=/usr/local/include --with-libraries=/usr/local/lib
|
1999-05-28 00:05:38 +08:00
|
|
|
|
2002-11-12 04:04:05 +08:00
|
|
|
There will probably be warnings about 0.0/0.0 division and duplicate
|
|
|
|
symbols which you can safely ignore.
|
2001-03-27 22:56:20 +08:00
|
|
|
|
2002-02-02 02:23:24 +08:00
|
|
|
Compiling PostgreSQL with gcc (2.95.3) on AIX also works.
|
2001-03-27 22:56:20 +08:00
|
|
|
|
2002-11-12 04:04:05 +08:00
|
|
|
You need libm.a that is in the fileset bos.adt.libm. (Try the
|
|
|
|
following command.)
|
2002-10-10 00:21:54 +08:00
|
|
|
$ lslpp -l bos.adt.libm
|
2005-07-30 11:39:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
From: Christopher Browne <cbbrowne@ca.afilias.info>
|
|
|
|
Date: 2005-07-15
|
|
|
|
|
|
|
|
On AIX 5.3, there have been some problems getting PostgreSQL to
|
|
|
|
compile and run using GCC.
|
|
|
|
|
|
|
|
1. You will want to use a version of GCC subsequent to 3.3.2,
|
|
|
|
particularly if you use a prepackaged version. We had good
|
|
|
|
success with 4.0.1.
|
|
|
|
|
|
|
|
Problems with earlier versions seem to have more to do with the
|
|
|
|
way IBM packaged GCC than with actual issues with GCC, so that if
|
|
|
|
you compile GCC yourself, you might well have success with an
|
|
|
|
earlier version of GCC.
|
|
|
|
|
|
|
|
2. AIX 5.3 has a problem where sockadr_storage is not defined to be
|
|
|
|
large enough. In version 5.3, IBM increased the size of
|
|
|
|
sockaddr_un, the address structure for UNIX Domain Sockets, but
|
|
|
|
did not correspondingly increase the size of sockadr_storage.
|
|
|
|
|
|
|
|
The result of this is that attempts to use UDS with PostgreSQL
|
|
|
|
lead to libpq overflowing the data structure. TCP/IP connections
|
|
|
|
work OK, but not UDS, which prevents the regression tests from
|
|
|
|
working.
|
|
|
|
|
|
|
|
The nonconformance may be readily demonstrated by compiling and
|
|
|
|
running the following C program which calculates and compares the
|
|
|
|
sizes of the various structures:
|
|
|
|
|
|
|
|
test_size.c
|
|
|
|
------------
|
|
|
|
|
|
|
|
---------- snip here - test_size.c ----------------------------
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/un.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
int main (int argc, char *argv[]) {
|
|
|
|
struct sockaddr_storage a;
|
|
|
|
struct sockaddr_un b;
|
|
|
|
printf("Size of sockadr_storage: %d\n", sizeof(a));
|
|
|
|
printf ("Size of sockaddr_un:%d\n", sizeof(b));
|
|
|
|
|
|
|
|
if (sizeof(a) >= sizeof(b))
|
|
|
|
printf ("Conformant to RFC 3493\n");
|
|
|
|
else
|
|
|
|
printf ("Non-conformant to RFC 3493\n");
|
|
|
|
}
|
|
|
|
---------- snip here - test_size.c ----------------------------
|
|
|
|
|
|
|
|
|
|
|
|
The problem was reported to IBM, and is recorded as bug report
|
|
|
|
PMR29657.
|
|
|
|
|
|
|
|
An immediate resolution is to alter _SS_MAXSIZE to = 1025 in
|
|
|
|
/usr/include/sys/socket.h, which will resolve the immediate problem.
|
|
|
|
|
|
|
|
It appears that the "final" resolution will be to alter _SS_MAXSIZE to
|
|
|
|
1280, making the size nicely align with page boundaries.
|
|
|
|
|
|
|
|
IBM will be providing a fix in the next maintenance release (expected
|
|
|
|
in October 2005) with an updated socket.h.
|
|
|
|
---
|
2005-10-25 06:30:35 +08:00
|
|
|
PMR29657 was resolved in APAR IY74147: INCOMPATIBILITY BETWEEN
|
|
|
|
SOCKADDR_UN AND SOCKADDR_STORAGE STRUCT
|
|
|
|
|
|
|
|
APAR information
|
|
|
|
APAR number IY74147
|
|
|
|
Reported component name AIX 5.3
|
|
|
|
Reported component ID 5765G0300
|
|
|
|
Reported release 530
|
|
|
|
Status CLOSED PER
|
|
|
|
PE NoPE
|
|
|
|
HIPER NoHIPER
|
|
|
|
Submitted date 2005-07-18
|
|
|
|
Closed date 2005-07-18
|
|
|
|
Last modified date 2005-09-06
|
|
|
|
|
|
|
|
If you upgrade to maintenance level 5300-03, that will include this
|
2005-11-05 02:16:50 +08:00
|
|
|
fix. Use the command "oslevel -r" to determine what maintenance level
|
2005-10-25 06:30:35 +08:00
|
|
|
you are at.
|
|
|
|
---
|
2005-07-30 11:39:27 +08:00
|
|
|
From: Christopher Browne <cbbrowne@ca.afilias.info>
|
|
|
|
Date: 2005-07-15
|
|
|
|
|
|
|
|
Some of the AIX tools may be "a little different" from what you may be
|
|
|
|
accustomed to on other platforms. If you are looking for a version of
|
|
|
|
ldd, useful for determining what object code depends on what
|
|
|
|
libraries, the following URLs may help you...
|
|
|
|
|
|
|
|
http://www.faqs.org/faqs/aix-faq/part4/section-22.html
|
|
|
|
|
2005-10-25 06:30:35 +08:00
|
|
|
http://www.han.de/~jum/aix/ldd.c
|
2005-11-05 02:16:50 +08:00
|
|
|
---
|
|
|
|
|
2005-12-09 05:36:50 +08:00
|
|
|
AIX, readline, and postgres 8.1.x:
|
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
If make check doesn't work on AIX with initdb going into an infinite
|
|
|
|
loop or failing with child processes terminated with signal 11, the
|
|
|
|
problem could be the installed copy of readline. Previously a patch to
|
|
|
|
dynahash.c was suggested to get around this, don't use it, better ways
|
|
|
|
to get postgres working exist.
|
|
|
|
|
|
|
|
See <http://archives.postgresql.org/pgsql-patches/2005-11/msg00139.php>
|
|
|
|
for details about the problem.
|
|
|
|
|
|
|
|
Working around the problem:
|
|
|
|
---------------------------
|
2006-04-06 06:55:05 +08:00
|
|
|
Try one of the following:
|
|
|
|
|
|
|
|
o Use the new 8.2devel backend Makefile:
|
|
|
|
|
2005-12-09 05:36:50 +08:00
|
|
|
After the matter of readline's export list and the problems that were
|
|
|
|
occurring on AIX because of it being linked to the backend, a filter
|
|
|
|
to exclude unneeded libraries from being linked against the backend was
|
|
|
|
added. Get revision 1.112 of src/backend/Makefile from CVS and replace
|
|
|
|
the copy that came with postgres with it. Build normally.
|
|
|
|
|
2006-04-06 06:55:05 +08:00
|
|
|
o Use libedit
|
|
|
|
|
2005-12-09 05:36:50 +08:00
|
|
|
There are a few libedit ports available online. Build and install the
|
|
|
|
desired port. If libreadline.a can be found in /lib, /usr/lib, or in
|
|
|
|
any location passed to postgres' configure via "--with-libraries=",
|
|
|
|
readline will be detected and used by postgres. IBM's rpm of readline
|
|
|
|
creates a symlink to /opt/freeware/lib/libreadline.a in /lib, so merely
|
|
|
|
excluding /opt/freeware/lib from the passed library path does not stop
|
|
|
|
readline from being used.
|
|
|
|
|
|
|
|
If the linker cannot avoid finding libreadline.a, use revision 1.433
|
|
|
|
configure.in and 1.19 config/programs.m4 from CVS, change 8.2devel to
|
|
|
|
the appropriate 8.1.x in configure.in and run autoconf. Add the
|
|
|
|
configure flag "--with-libedit-preferred".
|
|
|
|
|
|
|
|
If the version of libedit used calls its "history.h" something other
|
|
|
|
than history.h, place a symlink called history.h to it somewhere that
|
|
|
|
the C preprocessor will check.
|
|
|
|
|
2006-04-06 06:55:05 +08:00
|
|
|
o Configure with "--without-readline"
|
|
|
|
|
2005-12-09 05:36:50 +08:00
|
|
|
postgres can be configured with the option "--without-readline". When
|
|
|
|
this is enabled, postgres will not link against libreadline or libedit.
|
|
|
|
psql will not have history, tab completion, or any of the other niceties
|
|
|
|
that readline and libedit bring, but external readline wrappers exist
|
|
|
|
that add that functionality.
|
|
|
|
|
2006-04-06 06:55:05 +08:00
|
|
|
o Use readline 5.0
|
|
|
|
|
2005-12-09 05:36:50 +08:00
|
|
|
Readline 5.0 does not induce the problems, however it does export
|
|
|
|
memcpy and strncpy when built using the easy method of "-bexpall". Like
|
|
|
|
4.3, it is possible to do a build that does not export these symbols,
|
|
|
|
but it does take considerable manual effort and the creation of export
|
|
|
|
files.
|
|
|
|
|
|
|
|
References
|
|
|
|
----------
|
|
|
|
"AIX 5L Porting Guide"
|
|
|
|
IBM Redbook
|
|
|
|
http://www.redbooks.ibm.com/redbooks/pdfs/sg246034.pdf
|
|
|
|
http://www.redbooks.ibm.com/abstracts/sg246034.html?Open
|
|
|
|
|
|
|
|
"Developing and Porting C and C++ Applications on AIX"
|
|
|
|
IBM Redbook
|
|
|
|
http://www.redbooks.ibm.com/redbooks/pdfs/sg245674.pdf
|
|
|
|
http://www.redbooks.ibm.com/abstracts/sg245674.html?Open
|