Re: Use Postgres as meson wrap subproject

From: Niyaz Hazigaleyev <hazigaleevniaz(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Elliot Haisley <elliot(dot)haisley(at)outlook(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Use Postgres as meson wrap subproject
Date: 2026-01-04 19:32:50
Message-ID: E83EC4BD-6336-41CA-86A1-5FD0519EFF14@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

You right Eliot Haisley more complete patch because he replaced all occurrences of @SOURCE_DIR@ but I also added include_directories to dependency, so it will not fail to find headers which are included in libpq headers. So if I merge my patch with Eliot’s it should be fine. I can send complete patch after it’s done.
About meson wrap subproject. In my projects I really like to have fallback if there is no system lib available or system lib have not compatible version. Basically I use it as package manager for my C/C++ projects, I just put the link to git into wrap file, provide dependency and that’s it, meson does all the work. Ideally everything in my project should be build from scratch without any prebuilt binaries, so I can cross-compile to any platform that I want and build/packaging of project becomes much easier.
> 3 янв. 2026 г., в 04:54, Andreas Karlsson <andreas(at)proxel(dot)se> написал(а):
>
> On 12/23/25 4:21 PM, Niyaz Hazigaleyev wrote:
>> So to use Postgres as wrap subproject u need to change @SOURCE_DIR@ to meson.project_source_root() and check include_directories for all dependencies. Is there any plans to support it?
>
> Thanks for the patch!
>
> There was an earlier patch[1] for this from Elliot Haisley which looks more complete that Andres seemed a bit interested in but as far as I know no progress has been made on it recently. You could help out by testing it out and reviewing it.
>
> Out of curiosity since I am quite new to Meson: what is your personal use case for wrap subprojects?
>
> References
>
> 1. https://www.postgresql.org/message-id/PH0PR84MB1954C7D61C4882403B8258708605A%40PH0PR84MB1954.NAMPRD84.PROD.OUTLOOK.COM
>
> Andreas
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-01-04 20:13:15 Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers
Previous Message Tom Lane 2026-01-04 19:20:31 Re: Error position support for ComputeIndexAttrs