RE: FW: Building Postgres 17.0 with meson

From: Mark Hill <Mark(dot)Hill(at)sas(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: FW: Building Postgres 17.0 with meson
Date: 2024-11-13 15:17:20
Message-ID: DM6PR05MB50837425FDAD7A9BB0F1EAA6EE5A2@DM6PR05MB5083.namprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

EXTERNAL

On Wed, Nov 6, 2024 at 4:21 PM Robert Hass <robertmhass(at)gmail(dot)com> wrote:
> 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

Including more information this time hoping it will help in debugging the problem. I'm only building with openssl at the moment to keep things simple.
I've included the output of the meson setup command and also attached the log file that's generated.

I have built and installed OpenSSL 3.1.6 in the following location:
D:\Jenkins\workspace\workspace\Postgres-9.4\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6

I'm setting the following env variables:
set openssl_include_dir=D:\Jenkins\workspace\workspace\Postgres-9.4\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6\include\openssl
set openssl_lib_dir=D:\Jenkins\workspace\workspace\Postgres-9.4\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6\lib
set prefix=D:\Jenkins\workspace\workspace\Postgres-9.4\PostgreSQL\postgres-Install\pg_17.0_wx6

meson setup command and output:
D:\Jenkins\workspace\workspace\Postgres-9.4\PostgreSQL\postgres-Source\buildPostgreSQL_wx6_17.0\postgresql-17.0>meson setup build --prefix="%prefix%" --buildtype=release -Dssl=openssl -Dextra_lib_dirs=%openssl_lib_dir% -Dextra_include_dirs=%openssl_include_dir% -Dnls=disabled -Dplperl=disabled -Dplpython=disabled -Dpltcl=disabled -Dllvm=disabled -Dlz4=disabled -Dzstd=disabled -Dgssapi=disabled -Dldap=disabled -Dpam=disabled -Dbsd_auth=disabled -Dsystemd=disabled -Dbonjour=disabled -Duuid=none -Dlibxml=disabled -Dlibxslt=disabled -Dselinux=disabled -Dicu=disabled -Dzlib=disabled
The Meson build system
Version: 1.6.0
Source dir: D:\Jenkins\workspace\workspace\Postgres-9.4\PostgreSQL\postgres-Source\buildPostgreSQL_wx6_17.0\postgresql-17.0
Build dir: D:\Jenkins\workspace\workspace\Postgres-9.4\PostgreSQL\postgres-Source\buildPostgreSQL_wx6_17.0\postgresql-17.0\build
Build type: native build
Project name: postgresql
Project version: 17.0
C compiler for the host machine: cl (msvc 19.29.30154 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30154 for x64")
C linker for the host machine: link link 14.29.30154.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Run-time dependency threads found: YES
Library ws2_32 found: YES
Library secur32 found: YES
Program perl found: YES (C:\Strawberry\perl\bin\perl.EXE)
Program python3 found: YES (C:\Program Files\Python38\python3.EXE)
Program flex found: YES 2.5.35 2.5.35 (C:\GnuWin32\bin\flex.EXE)
Program bison found: YES 2.4.1 2.4.1 (C:\GnuWin32\bin\bison.EXE)
Program sed found: YES (C:\GnuWin32\bin\sed.EXE)
Program prove found: YES (C:\Strawberry\perl\bin\prove.BAT)
Program tar found: YES (C:\Windows\system32\tar.EXE)
Program gzip found: NO
Program lz4 found: NO
Program openssl found: NO
Program zstd found: NO
Program dtrace skipped: feature dtrace disabled
Program config/missing found: YES (sh D:\Jenkins\workspace\workspace\Postgres-9.4\PostgreSQL\postgres-Source\buildPostgreSQL_wx6_17.0\postgresql-17.0\config/missing)
Program cp found: NO
Program xmllint found: NO
Program xsltproc found: NO
Program wget found: NO
Program C:\Python\Python310\python.exe found: YES (C:\Python\Python310\python.exe)
Check usable header "bsd_auth.h" skipped: feature bsd_auth disabled
Check usable header "dns_sd.h" skipped: feature bonjour disabled
Program fop found: NO
Compiler for language cpp skipped: feature llvm disabled
Found pkg-config 'C:\\Strawberry\\perl\\bin\\pkg-config.BAT' but it is Strawberry Perl and thus broken. Ignoring...
Found pkg-config: NO
Found CMake: C:\Program Files\CMake\bin\cmake.EXE (3.29.0)
Run-time dependency readline found: NO (tried pkgconfig and cmake)
Library readline found: NO
Run-time dependency libedit found: NO (tried pkgconfig and cmake)
Library libedit found: NO
Dependency libselinux skipped: feature selinux disabled
Dependency libsystemd skipped: feature systemd disabled
Run-time dependency openssl found: NO (tried pkgconfig, system and cmake)

meson.build:1336:17: ERROR: C header 'openssl/ssl.h' not found

A full log can be found at D:\Jenkins\workspace\workspace\Postgres-9.4\PostgreSQL\postgres-Source\buildPostgreSQL_wx6_17.0\postgresql-17.0\build\meson-logs\meson-log.txt

The error above says meson can't find openssl/ssl.h but it's there:
D:\Jenkins\workspace\workspace\Postgres-9.4\PostgreSQL\postgres-Source\buildPostgreSQL_wx6_17.0\postgresql-17.0>dir D:\Jenkins\workspace\workspace\Postgres-9.4\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6\include\openssl\ssl.h
Volume in drive D is Data
Volume Serial Number is 58B5-7193

Directory of D:\Jenkins\workspace\workspace\Postgres-9.4\OpenSSL\OpenSSL-Install\OpenSSL-3.1.6-wx6\include\openssl

08/12/2024 04:22 PM 127,595 ssl.h
1 File(s) 127,595 bytes
0 Dir(s) 210,974,670,848 bytes free

I don't know why meson cannot find the OpenSSL installation I've specified via the options:
extra_lib_dirs
extra_include_dirs

Thanks, Mark

Attachment Content-Type Size
meson-log.txt text/plain 42.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tony Wayne 2024-11-13 15:18:33 pgsql-hackers@postgresql.org VS pgsql-hackers@lists.postgresql.org
Previous Message Pavel Stehule 2024-11-13 15:06:37 Re: proposal: schema variables