From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | unicode test programs don't build with meson |
Date: | 2024-10-18 10:11:00 |
Message-ID: | 52db1d2b-4b96-473e-b323-a4b16a950fba@eisentraut.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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?
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2024-10-18 10:54:49 | Re: On disable_cost |
Previous Message | Seino Yuki | 2024-10-18 10:07:28 | Re: Add “FOR UPDATE NOWAIT” lock details to the log. |