pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedquestions about porting postgresql to older operating system
4+ messages / 3 participants
[nested] [flat]
* questions about porting postgresql to older operating system
@ 2021-01-14 16:39 Tim Kelly <gtkelly@dialectronics.com>
2021-01-14 18:18 ` Re: questions about porting postgresql to older operating system Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Tim Kelly @ 2021-01-14 16:39 UTC (permalink / raw)
To: pgsql-bugs
Hello,
I am working with an old version of an open source operating system. I
have long since forked from the main development and am not going back.
I have built my own toolchain, which does not include GNU's make or
any other gnutils (except nano). The OS is also not p-thread compliant
(or MP-aware). All libraries are statically linked. I am following the
adage "if you want something done a certain way, do it yourself," which
I heard all-too-often before I did.
I am attempting to port postgresql-9.6.20 to this environment. I've
made it through various pitfalls in configure, but as I get closer to
actually compiling, I'm wondering about the pitfalls ahead.
I had to run --disable-thread-safety, since there is not pthread
support. The configure process is failing at the time it needs to link
config.status: linking ./src/backend/port/dynloader/(removed).c to
src/backend/port/dynloader.c
config.status: error: ./src/backend/port/dynloader/(removed).c: file not
found
There is no dynamic linking or loading with this operating system.
There was no template for this operating system, so I added one. I am
emailing the address given in configure with my questions.
1) Starting with gmake, what specific functionality is required that can
not be duplicated with manually crafting Makefiles?
2a) Can postgresql run without pthread support?
2b) If no, is there an older version that would run? (I need some
functionality introduced in 8.x.)
3) Can postgresql still work without dynamic loading support?
Thank you,
tim
--
"I ain't gonna play Sun City."
-- (Little) Steven Van Vandt/Artists United Against Apartheid
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: questions about porting postgresql to older operating system
2021-01-14 16:39 questions about porting postgresql to older operating system Tim Kelly <gtkelly@dialectronics.com>
@ 2021-01-14 18:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-01-14 18:34 ` Re: questions about porting postgresql to older operating system Heikki Linnakangas <hlinnaka@iki.fi>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2021-01-14 18:18 UTC (permalink / raw)
To: Tim Kelly <gtkelly@dialectronics.com>; +Cc: pgsql-bugs
Tim Kelly <gtkelly@dialectronics.com> writes:
> 1) Starting with gmake, what specific functionality is required that can
> not be duplicated with manually crafting Makefiles?
We've never worried about building with non-GNU make. If you really want
to translate all of the Makefiles to old-style make syntax, it might be
possible, but it sure seems like a lot of make-work (pun intended).
> 2a) Can postgresql run without pthread support?
Definitely; we still have at least one buildfarm animal without that.
> 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.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: questions about porting postgresql to older operating system
2021-01-14 16:39 questions about porting postgresql to older operating system Tim Kelly <gtkelly@dialectronics.com>
2021-01-14 18:18 ` Re: questions about porting postgresql to older operating system Tom Lane <tgl@sss.pgh.pa.us>
@ 2021-01-14 18:34 ` Heikki Linnakangas <hlinnaka@iki.fi>
2021-01-14 18:44 ` Re: questions about porting postgresql to older operating system Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 4+ messages in thread
From: Heikki Linnakangas @ 2021-01-14 18:34 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Tim Kelly <gtkelly@dialectronics.com>; +Cc: pgsql-bugs
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: questions about porting postgresql to older operating system
2021-01-14 16:39 questions about porting postgresql to older operating system Tim Kelly <gtkelly@dialectronics.com>
2021-01-14 18:18 ` Re: questions about porting postgresql to older operating system Tom Lane <tgl@sss.pgh.pa.us>
2021-01-14 18:34 ` Re: questions about porting postgresql to older operating system Heikki Linnakangas <hlinnaka@iki.fi>
@ 2021-01-14 18:44 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Tom Lane @ 2021-01-14 18:44 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnaka@iki.fi>; +Cc: Tim Kelly <gtkelly@dialectronics.com>; 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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-01-14 18:44 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-14 16:39 questions about porting postgresql to older operating system Tim Kelly <gtkelly@dialectronics.com>
2021-01-14 18:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-01-14 18:34 ` Heikki Linnakangas <hlinnaka@iki.fi>
2021-01-14 18:44 ` Tom Lane <tgl@sss.pgh.pa.us>
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