public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: unicode test programs don't build with meson
Date: Fri, 18 Oct 2024 12:11:00 +0200
Message-ID: <[email protected]> (raw)
The test programs in src/common/unicode/ (case_test, category_test,
norm_test), don't build with meson if the nls option is enabled, because
a libintl dependency is missing.
(pg_strerror_r() in src/port/strerror.c makes a gettext call, so in that
sense libpgport has a dependency on libintl.)
The makefiles are ok, because they just link all programs against all
libraries that configure finds, more or less, but meson needs explicit
dependencies declared.
I can see a few ways to fix that, so I'm looking for feedback on which
way is best.
1) Add libintl directly to the affected programs, like
case_test = executable('case_test',
['case_test.c'],
- dependencies: [frontend_port_code, icu],
+ dependencies: [frontend_port_code, icu, libintl],
include_directories: inc,
link_with: [common_static, pgport_static],
build_by_default: false,
etc.
2) Add libintl as a dependency of frontend_port_code:
--- a/meson.build
+++ b/meson.build
@@ -2986,7 +2986,7 @@ subdir('config')
frontend_port_code = declare_dependency(
compile_args: ['-DFRONTEND'],
include_directories: [postgres_inc],
- dependencies: os_deps,
+ dependencies: [os_deps, libintl],
)
3) Add libintl to os_deps directly?
4) Change the dependencies of the test programs to something like
--- a/src/common/unicode/meson.build
+++ b/src/common/unicode/meson.build
@@ -75,7 +75,7 @@ inc = include_directories('.')
norm_test = executable('norm_test',
['norm_test.c', norm_test_table],
- dependencies: [frontend_port_code],
+ dependencies: [frontend_code],
include_directories: inc,
link_with: [common_static, pgport_static],
build_by_default: false,
Or something else, or some combination?
view thread (2+ messages)
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]
Subject: Re: unicode test programs don't build with meson
In-Reply-To: <[email protected]>
* 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