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

Re: Patchless postgres 8.x on AIX

From: Seneca Cunningham <scunning(at)ca(dot)afilias(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: 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: Re: Patchless postgres 8.x on AIX
Date: 2005-11-17 16:20:15
Message-ID: 437CADBF.80904@ca.afilias.info (view raw or flat)
Thread:
Lists: pgsql-ports
Tom Lane wrote:
> Seneca Cunningham <scunning(at)ca(dot)afilias(dot)info> writes:
> 
>>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.
> 
> 
> libreadline exports these??  I'd say you have a seriously braindead copy
> of libreadline ... can you recompile a fresh copy off the net?

That was just IBM's rpm of readline 4.3, my fresh build of readline 5.0 
exports memcpy in addition to the aforementioned functions.  As a 
result, LDFLAGS-less postgres doesn't segfault but it gets its memcpy 
linked through libreadline.  libreadline's build scripts, at least for 
5.0, don't seem to give a build that can be properly linked against on 
AIX, and it's entirely possible that my build used different linker 
flags than IBM's to get a libreadline that actually exports what it 
provides.

> The inet failures look like there is consistently no support for IPv6.
> I wonder if the linker is somehow replacing our own inet-parsing
> subroutines with a non-IPv6-aware set.  It's conceivable that there
> could be a name collision with subroutines from an old version of
> libbind.

The linker appears to be grabbing the inet functions from the AIX libc, 
not the postgres set.  LDFLAGS is placed before all the SUBSYS.o, and by 
my understanding of the AIX linker, adding "-lc" to LDFLAGS would cause 
it to search libc.a before utils/SUBSYS.o and use the functions like 
inet_net_pton from libc.

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

In response to

pgsql-ports by date

Next:From: Seneca CunninghamDate: 2005-11-18 20:40:01
Subject: Re: Postgresql Installation on IBM aix 5.2
Previous:From: Tom LaneDate: 2005-11-16 23:28:25
Subject: Re: Patchless postgres 8.x on AIX

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