pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Kelly <gtkelly@dialectronics.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: questions about porting postgresql to older operating system
Date: Thu, 14 Jan 2021 20:34:51 +0200
Message-ID: <dbfc1cfa-1c15-ec22-d138-ddd12b9af5b9@iki.fi> (raw)
In-Reply-To: <1418718.1610648323@sss.pgh.pa.us>
References: <600073D8.8010604@dialectronics.com>
	<1418718.1610648323@sss.pgh.pa.us>

On 14/01/2021 20:18, Tom Lane wrote:
> Tim Kelly <gtkelly@dialectronics.com> writes >> 3) Can postgresql still work without dynamic loading support?
> 
> mmm ... in principle yes, but you'll lose one heck of a lot of
> functionality that's implemented in extension modules.  Possibly
> that could be worked around by deciding which extensions you need
> and statically binding them into the backend executable.  Again,
> that's not a case we've worried about for the last twenty years
> or so, so there's likely to be some pain there.

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. 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.

It would be cool if that worked.

- Heikki





view thread (4+ messages)  latest in thread

Message-ID: <dbfc1cfa-1c15-ec22-d138-ddd12b9af5b9@iki.fi>
Permalink:  ../dbfc1cfa-1c15-ec22-d138-ddd12b9af5b9@iki.fi/
Also on:    postgresql.org/message-id/dbfc1cfa-1c15-ec22-d138-ddd12b9af5b9@iki.fi

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: hlinnaka@iki.fi, tgl@sss.pgh.pa.us, gtkelly@dialectronics.com
  Subject: Re: questions about porting postgresql to older operating system
  In-Reply-To: <dbfc1cfa-1c15-ec22-d138-ddd12b9af5b9@iki.fi>
  References: <600073D8.8010604@dialectronics.com> <1418718.1610648323@sss.pgh.pa.us> <dbfc1cfa-1c15-ec22-d138-ddd12b9af5b9@iki.fi>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox