Re: questions about porting postgresql to older operating system - Mailing list pgsql-bugs

From Tom Lane
Subject Re: questions about porting postgresql to older operating system
Date
Msg-id 1419735.1610649859@sss.pgh.pa.us
Whole thread Raw
In response to Re: questions about porting postgresql to older operating system  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-bugs
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> As it happens, I tried to build a completely static postgres binary 
> yesterday. I was debugging the failure on sparc64, and I found out about 
> user-space qemu, which can run binaries in binaries in a foreign 
> architecture directly without a virtual machine. However, it requires 
> that the binary is compiled statically. Cross-compiling a static 
> postgres binary was surprisingly easy on Debian, but when I tried to run 
> it, initdb failed because some library functions like getpweid() and 
> gethostaddr() didn't work when linked statically.

That seems like an OS-level issue, not our fault.

> The cross-compiler 
> warned about those, which was nice. I stubbed out a few of those library 
> functions, but eventually it failed on a call to dlopen(). That's where 
> I gave up.

Yeah, initdb is going to try to open the shared libraries for plpgsql and
all of the encoding-conversion modules (and maybe other stuff, but
that's all I can think of offhand).  For an initial porting attempt,
it might be enough to cut out the parts of the bootstrap script that
create the default conversions and the plpgsql extension.  It's hard
to believe you won't want plpgsql before long though.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: questions about porting postgresql to older operating system
Next
From: Amit Kapila
Date:
Subject: Re: BUG #16812: Logical decoding error