Subject: Re: postgres 8.2.5 core dumps on 4.0 RC2 mipsel
To: Andy Ruhl <email@example.com>
From: Markus W Kilbinger <firstname.lastname@example.org>
Date: 10/18/2007 09:05:25
>>>>> "Andy" == Andy Ruhl <email@example.com> writes:
Andy> Sorry if I copied too many lists. I just built postgresql82
Andy> from pkgsrc, which builds 8.2.5 now. I used CFLAGS -mips2,
Andy> but I think this problem happens no matter if I do that or
Andy> not. The system is a Cobalt Qube2 which previously ran
Andy> 8.2.4 OK.
Hmm, strange I saw the same problem with 8.2.4...
Andy> Here's what I see. I'm not a good debugger, so if someone
Andy> wants to help me go through gdb I can get whatever is
Andy> /etc/rc.d # ./pgsql start
Andy> Starting pgsql.  Segmentation fault "/usr/pkg/bin/po...
Anyway, it seems to be a linker alignment problem on cobalt/mipsel
(see thread around
). During postgresqlNN-server builds several SUBSYS.o are linked via
'ld -r' which are re-linked finally to the postgres server binary. At
least for one object the correct alignment is 'lost' leading to your
mentioned Segmentation fault.
As menitioned in the thread reference you can circumvent this problem
by adding '-d' to the linkers 'ld -r' actions. I did this (in
Then edit the Makefile.global in the extracted postgres source, search
for the '-r' option for the linker and extend it to '-r -d'. Then do
... as usual. The resulting postgres binary should run fine.