Thread: Building Postgres 17.0 with meson
I’m trying to build Postgres 17.0 and have about learning meson as I go.
The build setup command I have so far is:
meson setup build --prefix=%prefix% --buildtype=release -Dssl=auto -Dzlib=auto -Dicu=auto
but I believe that cmd expects ssl, zlib, and icu to be installed in default locations.
How do I specify to meson that I want it to use the versions of those 3 software packages that I have built
e.g. the openssl I want it to use is located in D:\Postgres-Builds\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6
and similar locations for icu and zlib?
Thanks, Mark
I’m trying to build Postgres 17.0 and have about learning meson as I go.
The build setup command I have so far is:
meson setup build --prefix=%prefix% --buildtype=release -Dssl=auto -Dzlib=auto -Dicu=auto
but I believe that cmd expects ssl, zlib, and icu to be installed in default locations.
How do I specify to meson that I want it to use the versions of those 3 software packages that I have built
e.g. the openssl I want it to use is located in D:\Postgres-Builds\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6
and similar locations for icu and zlib?
Thanks, Mark
e.g. meson setup build --prefix=%prefix% --buildtype=release -Dextra_lib_dirs=D:\Postgres-Builds\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6
https://www.postgresql.org/docs/current/install-meson.html#CONFIGURE-EXTRA-LIB-DIRS-MESON
ZOHO
Srinath is in India I believe and not available currently. Does anybody have any idea why meson
is not finding the paths I’m specifying with the -Dextra_lib_dirs and -Dextra_include_dirs? See below.
Thanks, Mark
From: Mark Hill
Sent: Wednesday, November 6, 2024 10:33 AM
To: 'Srinath Reddy Sadipiralla' <srinath.reddy@zohocorp.com>
Subject: RE: Building Postgres 17.0 with meson
Hi Srinath,
Thanks for the tip.
I tried:
meson setup build --prefix=%prefix% --buildtype=release -Dextra_lib_dirs=%openssl_directory%,%zlib_directory%,%icu4c_directory% -Dextra_include_dirs=%openssl_directory%,%zlib_directory%,%icu4c_directory%
using both the -Dextra_lib_dirs and -Dextra_include_dirs and it’s still not finding openssl, icu, or zlib.
In the External libraries information toward the end of the output, it says:
External libraries
icu : NO
openssl : NO
zlib : NO
I removed the other libraries in the output for brevity.
I’ve checked my variables and they’re correct and those libraries are there.
Am I missing an option to meson setup build?
Thanks, Mark
From: Srinath Reddy Sadipiralla <srinath.reddy@zohocorp.com>
Sent: Wednesday, November 6, 2024 12:34 AM
To: Mark Hill <Mark.Hill@sas.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Building Postgres 17.0 with meson
EXTERNAL
---- On Wed, 06 Nov 2024 09:59:37 +0530 Mark Hill <Mark.Hill@sas.com> wrote ---
I’m trying to build Postgres 17.0 and have about learning meson as I go.
The build setup command I have so far is:
meson setup build --prefix=%prefix% --buildtype=release -Dssl=auto -Dzlib=auto -Dicu=auto
but I believe that cmd expects ssl, zlib, and icu to be installed in default locations.
How do I specify to meson that I want it to use the versions of those 3 software packages that I have built
e.g. the openssl I want it to use is located in D:\Postgres-Builds\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6
and similar locations for icu and zlib?
Thanks, Mark
Specify the lib's paths in "-Dextra_lib_dirs" during meson setup
e.g. meson setup build --prefix=%prefix% --buildtype=release -Dextra_lib_dirs=D:\Postgres-Builds\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6
https://www.postgresql.org/docs/current/install-meson.html#CONFIGURE-EXTRA-LIB-DIRS-MESON
Regards,
Srinath Reddy Sadipiralla
Member Technical Staff
ZOHO
On Wed, Nov 6, 2024 at 2:59 PM Mark Hill <Mark.Hill@sas.com> wrote: > Srinath is in India I believe and not available currently. Does anybody have any idea why meson > > is not finding the paths I’m specifying with the -Dextra_lib_dirs and -Dextra_include_dirs? See below. I am not an expert on this topic, but do use these options on macOS and they do work for me. A typical 'meson setup' invocation for me is: meson setup $HOME/pgsql $HOME/pgsql-meson -Dcassert=true -Ddebug=true -Dextra_include_dirs=/opt/local/include -Dextra_lib_dirs=/opt/local/lib -Dprefix=$HOME/install/dev In your example, you set extra_lib_dirs=%openssl_directory%,%zlib_directory%,%icu4c_directory%. Those aren't actually pathnames, so something (your shell, for instance) would have to be substituting the actual correct pathnames. Maybe that isn't happening, or maybe the pathnames that are being substituted are not the right ones, or maybe they don't contain the files that meson thinks they ought to contain. One thing that you could do is have a look at the meson log file. On my machine, that shows up inside the directory where I run 'meson setup' at meson-logs/meson-logs.txt. I am not sure if it's different on Windows. If you look in that file for strings like icu or openssl or zlib, you may be able to understand what is going wrong. As far as "Srinath is in India I believe and not available currently," while that is probably true, I'm not sure that's really the issue. Your original email didn't give the exact command you ran, the exact output you got, or any error messages or log files. Your follow-up email didn't include any of that either, except material quoted from another email that you apparently sent off-list, and even that wasn't nearly as detailed as many posts that you will see here. Also, see also the "Email etiquette mechanics" section of https://wiki.postgresql.org/wiki/Mailing_Lists which suggests keeping replies on-list and not top-posting. -- Robert Haas EDB: http://www.enterprisedb.com