Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tFp0A-00GMoD-5c for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Nov 2024 06:24:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tFp08-004SHv-SL for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Nov 2024 06:24:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tFp08-004SHl-Dg for pgsql-hackers@lists.postgresql.org; Tue, 26 Nov 2024 06:24:44 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tFozW-003yeE-LO for pgsql-hackers@lists.postgresql.org; Tue, 26 Nov 2024 06:24:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1732602245; bh=sfe5WOoLvmDAB8z5mlF/WzfVbFs1VteR7pDbrZFI5dI=; h=Date:From:To:Cc:Subject:Message-ID:From; b=l0RKk1pZX6P6+FOrOdy+YG58WwZXpAnwlz8iOjB2bxlQ0ayLxuutDhDLjbq1sClO4 rVBWBDltZ9ugMm2gRzz3sYZY4yNlK9O9qHZuHzHbhhmMRa1cBus6c2K2rNsiwW0bv3 mQObqD0pt+JIwt22l6JK5xfQcbjjnrI79iC7Asshk5mKhGBg27oACilc1PvBhjTRru QVqDseeFunaNGR0hcAQeRd6z2Cjdh6GUYxRc16H8txoeE9tflLZKwJdJLey97+4/Nq cxyoEvZTsq9/Mj/gvb7dwKDohZzHiaTxVraVoJQBokMP5zl8rh6Ne0m2JHEk/Pdt86 TwLgqKsoQkxOQ== Received: from mail.postgrespro.ru (unknown [192.168.2.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: m.polyakova@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 5AF626069B; Tue, 26 Nov 2024 09:24:05 +0300 (MSK) MIME-Version: 1.0 Date: Tue, 26 Nov 2024 09:24:05 +0300 From: Marina Polyakova To: andrew@dunslane.net Cc: pgsql-hackers@lists.postgresql.org Subject: Fix meson uuid header check so it works with MSVC in REL_16_STABLE Message-ID: <75488477263cbfa0211f8f765059c3b6@postgrespro.ru> X-Sender: m.polyakova@postgrespro.ru Organization: Postgres Professional Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-KSMG-AntiPhishing: NotDetected, bases: 2024/11/26 04:54:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2024/11/26 03:17:00 #26896435 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello! Could you backport the commit "Fix meson uuid header check so it works with MSVC" [1] to REL_16_STABLE please? Building with -Duuid=ossp fails without it: Running compile: Working directory: C:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpx088n_nb Code: #include int main(void) { /* If it's not defined as a macro, try to use as a symbol */ #ifndef uuid_export uuid_export; #endif return 0; } ----------- Command line: `cl C:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpx088n_nb\testfile.c /FoC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpx088n_nb\output.obj /nologo /showIncludes /utf-8 /c /nologo /showIncludes /utf-8 /c /Od /Oi-` -> 2 stdout: testfile.c C:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpx088n_nb\testfile.c(2): fatal error C1083: Cannot open include file: 'uuid.h': No such file or directory ----------- Header "uuid.h" has symbol "uuid_export" with dependency -luuid: NO meson.build:1467:4: ERROR: Problem encountered: uuid library ossp missing required function uuid_export With this fix my build and tests with Meson were successful: Running compile: Working directory: C:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpam6tbfwl Code: #include int main(void) { /* If it's not defined as a macro, try to use as a symbol */ #ifndef uuid_export uuid_export; #endif return 0; } ----------- Command line: `cl -IC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\src/include -IC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\src/include -IC:\gr-builds\6n4KsTYAF\0\pgpro-dev\deps\include -IC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\src/include/port/win32 -IC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\src/include/port/win32 -IC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\src/include/port/win32_msvc -IC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\src/include/port/win32_msvc C:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpam6tbfwl\testfile.c /FoC:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpam6tbfwl\output.obj /nologo /showIncludes /utf-8 /c /nologo /showIncludes /utf-8 /c /Od /Oi-` -> 0 stdout: testfile.c Note: including file: C:\gr-builds\6n4KsTYAF\0\pgpro-dev\deps\include\uuid.h Note: including file: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\sys/types.h Note: including file: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h Note: including file: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\vcruntime.h Note: including file: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\sal.h Note: including file: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\concurrencysal.h Note: including file: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\vadefs.h Note: including file: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h Note: including file: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_memory.h Note: including file: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_memcpy_s.h Note: including file: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\errno.h Note: including file: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\vcruntime_string.h Note: including file: C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_wstring.h C:\gr-builds\6n4KsTYAF\0\pgpro-dev\postgrespro\builddir\meson-private\tmpam6tbfwl\testfile.c(6): warning C4550: expression evaluates to a function which is missing an argument list ----------- Header "uuid.h" has symbol "uuid_export" with dependency -luuid: YES [1] https://github.com/postgres/postgres/commit/7c655a04a2dc84b59ed6dce97bd38b79e734ecca -- Marina Polyakova Postgres Professional: http://www.postgrespro.com The Russian Postgres Company