pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: 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 13:44:19 -0500
Message-ID: <1419735.1610649859@sss.pgh.pa.us> (raw)
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>

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





view thread (4+ messages)

Message-ID: <1419735.1610649859@sss.pgh.pa.us>
Permalink:  ../1419735.1610649859@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1419735.1610649859@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hlinnaka@iki.fi, gtkelly@dialectronics.com
  Subject: Re: questions about porting postgresql to older operating system
  In-Reply-To: <1419735.1610649859@sss.pgh.pa.us>

* 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