Skip site navigation (1) Skip section navigation (2)

Patchless postgres 8.x on AIX

From: Seneca Cunningham <scunning(at)ca(dot)afilias(dot)info>
To: dba(at)ca(dot)afilias(dot)info, pgsql-ports(at)postgresql(dot)org,Mark Gibson <gibsonm(at)cromwell(dot)co(dot)uk>, stefan(at)kaltenbrunner(dot)cc
Subject: Patchless postgres 8.x on AIX
Date: 2005-11-16 22:33:42
Message-ID: 437BB3C6.6050204@ca.afilias.info (view raw or flat)
Thread:
Lists: pgsql-ports
I have patchless postgres 8.x working to the extent that it's not 
segfaulting on AIX 5.3 here, ML3 and built with gcc 4.0.1.  There are 
two different ways that I've done it, adding "-lc" to the LDFLAGS passed 
to configure, and passing "--without-readline" to configure.  All 98 
regression tests pass with "--without-readline", but the inet test fails 
when LDFLAGS is set to "-lc".

What is happening with postgres certainly appears to be related to the 
linker; in dynahash.c, the keycopy functions that work with no new 
linker flags (strncpy, memmove worked as a memcpy replacement) are all 
exported by libreadline.a, while the segfaulting/infinite-looping memcpy 
is not.  When all the keycopy functions are from libc.a, by not linking 
against libreadline or by telling the linker to first check libc, all 
the keycopy functions, including memcpy, work.

LDFLAGS configuration
$ LDFLAGS="-lc" ./configure \
   --prefix=/opt/dbs/pgsql810-afilias-AIX53-2005-11-16 \
   --with-includes=/opt/freeware/include --enable-debug \
   --enable-thread-safety --with-libraries=/opt/freeware/lib \
   --enable-casert

no readline configuration
$ ./configure --prefix=/opt/dbs/pgsql810-afilias-AIX53-2005-11-16 \
   --with-includes=/opt/freeware/include --enable-debug \
   --enable-thread-safety --with-libraries=/opt/freeware/lib \
   --enable-casert --without-readline

-- 
Seneca Cunningham
scunning(at)ca(dot)afilias(dot)info

Attachment: regression.diffs
Description: text/plain (22.0 KB)

Responses

pgsql-ports by date

Next:From: Tom LaneDate: 2005-11-16 23:28:25
Subject: Re: Patchless postgres 8.x on AIX
Previous:From: Herman GildenhuysDate: 2005-11-16 08:05:42
Subject: Postgresql Installation on IBM aix 5.2

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group