Re: [RFC] building postgres with meson - v13

From: Andres Freund <andres(at)anarazel(dot)de>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, samay sharma <smilingsamay(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] building postgres with meson - v13
Date: 2022-09-26 19:06:00
Message-ID: 20220926190600.dwq77yblf6kqeit2@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-09-26 15:18:29 +0700, John Naylor wrote:
> On Wed, Sep 21, 2022 at 7:11 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
> > I added installation instructions for meson for a bunch of platforms, but
>
> A couple more things for the wiki:
>
> 1) /opt/homebrew/ seems to be an "Apple silicon" path?

Yea, it's /usr/local on x86-64, based on what was required to make macos CI
work. I updated the wiki page, half-blindly - it'd be nice if you could
confirm that that works?

I needed something like the below to get (nearly?) all dependencies working:

brewpath="/usr/local"
PKG_CONFIG_PATH="${brewpath}/lib/pkgconfig:${PKG_CONFIG_PATH}"

for pkg in icu4c krb5 openldap openssl zstd ; do
pkgpath="${brewpath}/opt/${pkg}"
PKG_CONFIG_PATH="${pkgpath}/lib/pkgconfig:${PKG_CONFIG_PATH}"
PATH="${pkgpath}/bin:${pkgpath}/sbin:$PATH"
done

export PKG_CONFIG_PATH PATH

meson setup \
--buildtype=debug \
-Dextra_include_dirs=${brewpath}/include \
-Dextra_lib_dirs=${brewpath}/lib \
-Dcassert=true \
-Dssl=openssl -Duuid=e2fs -Ddtrace=auto \
-DPG_TEST_EXTRA="$PG_TEST_EXTRA" \
build

the per-package stuff is needed because some libraries aren't installed into
/usr/local (or /opt/homebrew), but only in a subdirectory within that.

> Either way it doesn't exist on this machine. I was able to get a working
> build with
>
> /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig

Hm - what did you need this path for - I don't think that should be needed.

> (My homebrew install doesn't seem to have anything relevant for
> extra_include_dirs or extra_lib_dirs.)

I think libintl.h / libintl.dylib are only in there. With meson that's the
only need for extra_include_dirs / extra_lib_dirs I found on arm apple.

> 2) Also, "ninja -v install" has the same line count as "ninja install" --
> are there versions that do something different?

Yea, that looks like a copy-and-pasto (not even from me :)). Think I fixed it.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Wolfgang Walther 2022-09-26 19:16:50 Re: has_privs_of_role vs. is_member_of_role, redux
Previous Message Tom Lane 2022-09-26 18:34:46 Re: First draft of the PG 15 release notes