public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nathan Bossart <[email protected]>
To: Andres Freund <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Daniel Gustafsson <[email protected]>
Cc: Nazir Bilal Yavuz <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: meson: Non-feature feature options
Date: Mon, 13 Mar 2023 13:25:44 -0700
Message-ID: <20230313202544.GA373446@nathanxps13> (raw)
In-Reply-To: <[email protected]>
References: <CAN55FZ3JkWJRgBOvaB0VDYg1F+v3QMg4vwVae1gpQ+mnsYc-3g@mail.gmail.com>
<[email protected]>
<CAN55FZ1UFQfKifUV=oAf+WseCxD0Kq3g_AvWEEety9VneMvzvw@mail.gmail.com>
<[email protected]>
<CAN55FZ1=-jb38PujfcMWjAH8vDTYoxrgvz_oha_p+q0quMtzCw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<20230313180432.GA246741@nathanxps13>
<[email protected]>
On Mon, Mar 13, 2023 at 01:13:31PM -0700, Andres Freund wrote:
> On 2023-03-13 11:04:32 -0700, Nathan Bossart wrote:
>> I noticed that after 6a30027, if you don't have the OpenSSL headers
>> installed, 'meson setup' will fail:
>>
>> meson.build:1195:4: ERROR: C header 'openssl/ssl.h' not found
>>
>> Shouldn't "auto" cause Postgres to be built without OpenSSL if the required
>> headers are not present?
>
> Yea. I found another thing: When dependency() found something, but the headers
> weren't present, ssl_int wouldn't exist.
>
> Maybe something like the attached?
> ssl_lib = cc.find_library('ssl',
> dirs: test_lib_d,
> header_include_directories: postgres_inc,
> - has_headers: ['openssl/ssl.h', 'openssl/err.h'])
> + has_headers: ['openssl/ssl.h', 'openssl/err.h'],
> + required: openssl_required)
> crypto_lib = cc.find_library('crypto',
> dirs: test_lib_d,
> - header_include_directories: postgres_inc)
> - ssl_int = [ssl_lib, crypto_lib]
> -
> - ssl = declare_dependency(dependencies: ssl_int,
> - include_directories: postgres_inc)
> + required: openssl_required)
> + if ssl_lib.found() and crypto_lib.found()
> + ssl_int = [ssl_lib, crypto_lib]
> + ssl = declare_dependency(dependencies: ssl_int, include_directories: postgres_inc)
> + endif
I was just about to post a patch to set "required" like you have for
ssl_lib and crypto_lib. It seemed to work alright without the 'if
ssl_lib.found() and crypto_lib.found()' line, but I haven't worked with
these meson files very much, so what you have is probably better form.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
view thread (22+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: meson: Non-feature feature options
In-Reply-To: <20230313202544.GA373446@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox