Meson0.57.2 setup failed with option -Duuid=ossp
Hi all,
When i execute meson setup, an error occurred "meson.build:1610:4: ERROR: Expected 1 arguments, got 2."
I saw [1]/messages/by-id/ybd4q3touatzse742yai24uwyvj5zkhwjzxx43k336pfequp6e@zpbkpnpibzzv discussing about the meson minimun version which is 0.57.2.
So I have attached a patch try to fix that.
uuid = dependency('ossp-uuid', 'uuid', required: false)
About dependency() ,"Since 0.60.0 more than one name can be provided, they will be tried in order and the first name to be found will be used."[2]https://mesonbuild.com/Reference-manual_functions.html#dependency
------------------
highgo@ubuntu:~/postgres$ meson setup build --prefix=$PWD/inst -Duuid=ossp
The Meson build system
Version: 0.57.2
...
Checking for function "SSL_CTX_set_keylog_callback" with dependency openssl: YES
meson.build:1610:4: ERROR: Expected 1 arguments, got 2.
------------------
[1]: /messages/by-id/ybd4q3touatzse742yai24uwyvj5zkhwjzxx43k336pfequp6e@zpbkpnpibzzv
[2]: https://mesonbuild.com/Reference-manual_functions.html#dependency
Thanks,
Oreo Yang
HighGo Software Co., Ltd.
Attachments:
fix_meson0.57.2_setup_failed.patchapplication/octet-stream; name=fix_meson0.57.2_setup_failed.patchDownload
From 433b8ec92c94d67f7e59b7a2742b81a1a2611ff3 Mon Sep 17 00:00:00 2001
From: Oreo Yang <yangsh@highgo.com>
Date: Fri, 19 Sep 2025 08:44:36 +0800
Subject: [PATCH] meson0.57.2 setup failed with option -Duuid=ossp
---
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index d71c7c8267e..395416a6060 100644
--- a/meson.build
+++ b/meson.build
@@ -1607,7 +1607,10 @@ if uuidopt != 'none'
elif uuidopt == 'ossp'
# In upstream, the package and library is called just 'uuid', but many
# distros change it to 'ossp-uuid'.
- uuid = dependency('ossp-uuid', 'uuid', required: false)
+ uuid = dependency('ossp-uuid', required: false)
+ if not uuid.found()
+ uuid = dependency('uuid', required: false)
+ endif
uuidfunc = 'uuid_export'
uuidheader = 'uuid.h'
--
2.43.0
Hi,
On Fri, 19 Sept 2025 at 04:15, Oreo Yang <oreo.yang@hotmail.com> wrote:
Hi all,
When i execute meson setup, an error occurred "meson.build:1610:4: ERROR: Expected 1 arguments, got 2."
I saw [1] discussing about the meson minimun version which is 0.57.2.
So I have attached a patch try to fix that.uuid = dependency('ossp-uuid', 'uuid', required: false)
About dependency() ,"Since 0.60.0 more than one name can be provided, they will be tried in order and the first name to be found will be used."[2]------------------
highgo@ubuntu:~/postgres$ meson setup build --prefix=$PWD/inst -Duuid=ossp
The Meson build system
Version: 0.57.2
...
Checking for function "SSL_CTX_set_keylog_callback" with dependency openssl: YES
meson.build:1610:4: ERROR: Expected 1 arguments, got 2.
------------------
Nice catch! I am able to reproduce the problem and I confirm that the
patch fixes it.
--
Regards,
Nazir Bilal Yavuz
Microsoft
On Fri, Sep 19, 2025 at 01:23:48PM +0300, Nazir Bilal Yavuz wrote:
Nice catch! I am able to reproduce the problem and I confirm that the
patch fixes it.
Right, will fix and backpatch. Please note f039c2244110, that has
changed the minimum version to be 0.57.2 on HEAD, and we still allow
an older version on v18 and v17. It does not change your fix, of
course.
--
Michael
Hi Nazir,
Thanks for the review.
Hi Michael,
Thanks.
--
Thanks,
Oreo
________________________________
From: Michael Paquier
Sent: Monday, September 22, 2025 06:18
To: Nazir Bilal Yavuz
Cc: Oreo Yang; pgsql-hackers@postgresql.org
Subject: Re: Meson0.57.2 setup failed with option -Duuid=ossp
On Fri, Sep 19, 2025 at 01:23:48PM +0300, Nazir Bilal Yavuz wrote:
Nice catch! I am able to reproduce the problem and I confirm that the
patch fixes it.
Right, will fix and backpatch. Please note f039c2244110, that has
changed the minimum version to be 0.57.2 on HEAD, and we still allow
an older version on v18 and v17. It does not change your fix, of
course.
--
Michael