Re: [RFC] building postgres with meson

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [RFC] building postgres with meson
Date: 2021-11-15 18:34:15
Message-ID: 20211115183415.gkcx4akz7vmsvgik@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

FWIW, I tried building postgres on a few other operating systems using
meson, after I got access to the gcc compile farm. Here's the results:

- openbsd: Compiled fine. Hit one issue running tests:

openbsd has *completely* broken $ORIGIN support. It uses CWD as $ORIGIN
rpaths, which obviously breaks for binaries invoked via PATH. So there
goes the idea to only use $ORIGIN to run tests. Still seems worth to use
on other platforms, particularly because it works with SIP on macos

I understand not supporting $ORIGIN at all. But implementing it this way
seems insane.

I also ran into some problems with the semaphore limits. I had to switch to
USE_NAMED_POSIX_SEMAPHORES to make the tests pass at all.

- netbsd: Compiled fine after some minor fix. There's a bit more to fix around
many libraries not being in the normal library directory, but in
/usr/pkg/lib, which is not in the library search path (i.e. we need to add
an rpath for that in a few more places).

- AIX: Compiled and basic postgres runs fine after a few fixes (big endian
test, converting exports.txt into the right format). Doesn't yet
successfully run more than trivial tests, because I didn't implement the
necessary generation of import files for postgres, but that's just a bit of
work.

This is hampered by the fact that the vanilla postgres crashes for me. I
haven't quite figured out what's the problem. Might be a system issue -
lots of other tools, e.g. perl, segfault frequently.

One important thing to call out: Meson has support for the AIX linker, but
*not* the xlc compiler. I.e. one has to use gcc (or clang, but I didn't
try). I don't know if we'd require adding support for xlc to meson - xlc is
pretty buggy and it doesn't seem particularly crucial to support such an old
crufty compiler on a platform that's not used to a significant degree?

Greetings,

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-11-15 18:42:41 Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation
Previous Message Tom Lane 2021-11-15 18:18:22 Re: Time to drop plpython2?