allow meson to find ICU in non-standard localtion
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t47503psql -h localhost -U postgresBuilt from patchset v1 (message #1), July 28, 2026 at 01:03 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t47503_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t47503_1 && git checkout t47503_1Patchset v1 (message #1) is on t47503_1
I attached a simple patch that allows meson to find ICU in a non-
standard location if if you specify -Dextra_lib_dirs and
-Dextra_include_dirs.
I'm not sure it's the right thing to do though. One downside is that it
doesn't output the version that it finds, it only outputs "YES".
Hi,
Thanks for the patch.
On Wed, 22 Feb 2023 at 21:26, Jeff Davis <pgsql@j-davis.com> wrote:
I'm not sure it's the right thing to do though. One downside is that it
doesn't output the version that it finds, it only outputs "YES".
- icu = dependency('icu-uc', required: icuopt.enabled())
- icu_i18n = dependency('icu-i18n', required: icuopt.enabled())
I think you can do dependency checks with 'required: false' first and
if they weren't found by dependency checks; then you can do
cc.find_library() checks. This also solves only the outputting "YES"
problem if they were found by dependency checks.
Regards,
Nazir Bilal Yavuz
Microsoft
Hi,
On 2023-02-22 10:26:23 -0800, Jeff Davis wrote:
I attached a simple patch that allows meson to find ICU in a non-
standard location if if you specify -Dextra_lib_dirs and
-Dextra_include_dirs.
If you tell meson where to find the pkg-config file in those directories it'd
also work. -Dpkg_config_path=...
Does that suffice?
Greetings,
Andres Freund
On Sun, 2023-02-26 at 09:57 -0800, Andres Freund wrote:
If you tell meson where to find the pkg-config file in those
directories it'd
also work. -Dpkg_config_path=...
Setup is able to find it, which is good, but it seems like it's not
adding it to RPATH so it's not working.
I think we need some doc updates to clarify which features are affected
by -Dextra_lib_dirs/-Dpkg_config_path.
Regards,
Jeff Davis
On Sun, Feb 26, 2023 at 7:36 PM Jeff Davis <pgsql@j-davis.com> wrote:
On Sun, 2023-02-26 at 09:57 -0800, Andres Freund wrote:
If you tell meson where to find the pkg-config file in those
directories it'd
also work. -Dpkg_config_path=...Setup is able to find it, which is good, but it seems like it's not
adding it to RPATH so it's not working.
For my custom OpenSSL setups using -Dpkg_config_path, meson initially
adds the correct RPATH during build, then accidentally(?) strips it
during the `ninja install` step. This has been complained about [1]https://github.com/mesonbuild/meson/issues/6541,
and it seems like maybe they intended to fix it back in 0.55, but I'm
not convinced they did. :)
I work around it by manually setting -Dextra_lib_dirs. I just tried
doing that with ICU 72, and it worked without a patch. Hopefully that
helps some?
--Jacob
On Wed, 2023-03-01 at 11:43 -0800, Jacob Champion wrote:
I work around it by manually setting -Dextra_lib_dirs. I just tried
doing that with ICU 72, and it worked without a patch. Hopefully that
helps some?
Yes, works, thank you.
Obviously we'd like a little better solution so that others don't get
confused, but it's not really a problem for me any more.
Also there's the issue that libxml2.so pulls in the system's ICU
regardless. I don't think that causes a major problem, but I thought
I'd mention it.
Regards,
Jeff Davis
On 01.03.23 21:30, Jeff Davis wrote:
On Wed, 2023-03-01 at 11:43 -0800, Jacob Champion wrote:
I work around it by manually setting -Dextra_lib_dirs. I just tried
doing that with ICU 72, and it worked without a patch. Hopefully that
helps some?Yes, works, thank you.
Obviously we'd like a little better solution so that others don't get
confused, but it's not really a problem for me any more.
So should we withdraw the patch from the commit fest?