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 1tVqKa-00ByKV-1J for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 11:04:05 +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 1tVqKY-00HLqB-4N for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 11:04:01 +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 1tVqKX-00HLpq-Lo for pgsql-hackers@lists.postgresql.org; Thu, 09 Jan 2025 11:04:01 +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.96) (envelope-from ) id 1tVqKU-000imN-0Q for pgsql-hackers@lists.postgresql.org; Thu, 09 Jan 2025 11:04:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1736420636; bh=oVY6p2asP2+mDMg/CJJaeFQyeh+ACDYn2EXzKOwH3KU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID:From; b=w/POm/I1e4ii30AD7WoQ9lHKfhONDJA7PxeHoq8CQ7Ilv6jo63tYfanPhRwZYcjbg DuGMwRv7neyQqRB1IRZO0i5kPqqT1BXITyU77Lg9b1ayJfVsXp8gmVBL2wrlkKU05x MbC+10buuvNdxqDGddIM1cd+B0Zw9tfVXApWtz/zVNf4n+KjPnawoCeQkfLcW+f4FZ ysbYVmvShbrDivM5Pyku7gwtflJiN5KwcRj5xB9cvisYQusATLhk5fNaU62FY1ITbB 4uq3cce1A9fTElC++zok64fubmIeMu/iIT3rxKGLbwtLBMriC5hEE+HKTXWWfKMIOq 2uRB/GufhN6YQ== Received: from mail.postgrespro.ru (webmail-slave-mstn.l.postgrespro.ru [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: v.popolitov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 9AD2860B32; Thu, 9 Jan 2025 14:03:56 +0300 (MSK) MIME-Version: 1.0 Date: Thu, 09 Jan 2025 18:03:56 +0700 From: Vladlen Popolitov To: "Kohei Harikae (Fujitsu)" Cc: 'Andres Freund' , "'pgsql-hackers@lists.postgresql.org'" Subject: Re: Windows meson build In-Reply-To: References: <3fadfb663c69bae7448797acfa47c2ba@postgrespro.ru> <2fe1080dc2f42e2510b810d84eee45bd@postgrespro.ru> <29790e2f24e3579296e4a296ff8825a8@postgrespro.ru> Message-ID: <3e9b9c1934d02d7236bc880515058415@postgrespro.ru> X-Sender: v.popolitov@postgrespro.ru Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-KSMG-AntiPhishing: NotDetected 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: 2025/01/09 08:30:00 #26962612 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 Kohei Harikae (Fujitsu) писал(а) 2025-01-06 16:57: > Hi, > > - 0001 icu > - 0002 libxml > - 0003 libxslt > - 0004 lz4 > - 0005 tcl > - 0006 zlib > - 0007 zstd > These libraries could not be built by setting extra_include_dirs and > extra_lib_dirs. > These libraries may not have .pc file created. > For example, if I use msc (Visual Studio) to build zLib, zlib.pc is not > created. > Could you tell me which libraries can use this option? > > Regards, > Kohei Harikae Hi! I don't have my Windows PC near me just now, I take information from my memory regarding these libraries. I use Windows package manager vcpkg to build these libraries, and vcpkg uses msvc (Visual Studio). As I remember, icu, libxml2, libxslt build by vcpkg have .pc file. Really pc file is easy to create by hands the text file with a) product name and version b) relative (from .pc file location) path to libs c) relative path to includes Libraries with .pc file can be listed in environment variable PKG_CONFIG_PATH. gettext does not have pc file, and lib and include location must be included in extra_include_dirs and extra_lib_dirs options, that are PostgreSQL options in meson (not meson itself options) added for libraries without .pc file. Steps to build PostgreSQL under Windsows using meson and vcpkg 1) create build.cmd for all commands 2) install vcpkg to any location (except network drive, it has problems with it. Hard drive C: is OK) 3) install all libraries: vcpkg install libxml2 etc... 4) look for all libraries lib/pkgconf library and find .pc file. All pc file paths add to SET PKG_CONFIG_PATH=... in build.cmd 5) all libraries without pc file - add to -Dextra_include_dirs= and -Dextra_lib_dirs for meson command, that prepares the build directory - add it to build.cmd 6) add in the beginning build.cmd this or correct path for your system call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 7) run build.cmd This library configuration should work. I recommend install libraries to special location for every build version to control exact location and library version. vcpkg has options for library version and install directory. -- Best regards, Vladlen Popolitov.