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 1tPhKB-00EdnC-JR for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Dec 2024 12:14:16 +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 1tPhK9-00AkTA-PU for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Dec 2024 12:14:13 +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 1tPhK9-00AkT2-Ak for pgsql-hackers@lists.postgresql.org; Mon, 23 Dec 2024 12:14:13 +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 1tPhK2-001DUr-6q for pgsql-hackers@postgresql.org; Mon, 23 Dec 2024 12:14:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1734956045; bh=OIIT/uOVoJS+x35gsspXzgMhEu82J1Mhd2PGrcfKGdE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:Message-ID:From; b=2naLKLk78SucOA61rrvBdAKBpBO+wZBcke5/MLFiaysQMyaApyL+QiJIvZg2O4AC5 5l2Slso+ntHXjVfA9FCH+hUfJZUctXMP2dLH3SfPNZYejgXoY5PGJcrX45o04qFYN7 Y5tY+pnsuE05tZQnT6X82GXugVNVMSTAmzYHOMcKroe2iVatHivWUJgEASvV7qf9E1 sOnKieYRgShZSiPgA+assRXDGmFPXEn9QorwiJUrlDjuae44VXeIpUA0DuDW/4b7ok nwXf4edU2YXl2dLf4vYFfGCYty0ItP9jRsJzwZYbuSrcP38GlA0b+gP+3u4x+AiARW r0FgasEtgpOEg== 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 1F3B660840; Mon, 23 Dec 2024 15:14:05 +0300 (MSK) MIME-Version: 1.0 Date: Mon, 23 Dec 2024 15:14:05 +0300 From: Vladlen Popolitov To: Heikki Linnakangas Cc: Michael Paquier , Andrew Kane , Nathan Bossart , Tom Lane , pgsql-hackers@postgresql.org Subject: Re: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows In-Reply-To: References: <138233.1726261100@sss.pgh.pa.us> <1e2ba5ae7380fdb947e5bfcb6200063e@postgrespro.ru> Message-ID: X-Sender: v.popolitov@postgrespro.ru Content-Type: multipart/mixed; boundary="=_ddeacb75166508d8dfd41233bc1a74a4" 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: 2024/12/23 11:22:00 #26900310 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 --=_ddeacb75166508d8dfd41233bc1a74a4 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Heikki Linnakangas писал(а) 2024-12-23 14:05: > On 23/12/2024 12:32, Vladlen Popolitov wrote: >> I found the reason of this bug and the fix for it. > > Cool! > >> Fortunatelly meson has option to force put all object files to >> library - add dependency with the flag link_whole . >> >> I made the one-line patch and it fixes this issue. >> >> -        'dependencies': opts['dependencies'] + [ssl], >> +        'dependencies': opts['dependencies'] + [ssl] + >> [declare_dependency( link_whole  : cflag_libs)], > > I'm no meson expert and don't have a Windows system to test on, but > this seems like a weird place to add the option. Could you do this > instead: > > diff --git a/src/common/meson.build b/src/common/meson.build > index 538e0f43d55..76a7f68fe30 100644 > --- a/src/common/meson.build > +++ b/src/common/meson.build > @@ -184,6 +184,7 @@ foreach name, opts : pgcommon_variants > > lib = static_library('libpgcommon@0@'.format(name), > link_with: cflag_libs, > + link_whole: cflag_libs, > c_pch: pch_c_h, > kwargs: opts + { > 'include_directories': [ Yes, it is also working option. I applied it and tested in the current master under Windows, it works. Attached patch changes this line in meson.build > link_with: cflag_libs, > + link_whole: cflag_libs, > c_pch: pch_c_h, -- Best regards, Vladlen Popolitov. --=_ddeacb75166508d8dfd41233bc1a74a4 Content-Transfer-Encoding: base64 Content-Type: text/x-diff; name=v2-0001-Fix-meson.build-to-prevent-missed-obj-files-in-li.patch Content-Disposition: attachment; filename=v2-0001-Fix-meson.build-to-prevent-missed-obj-files-in-li.patch; size=757 RnJvbSAwNmExZmUwYzBkODE5NzRlYmNjYmQyZjAzMWRmNjIxNTRiZDFjMjlkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBWbGFkbGVuIFBvcG9saXRvdiA8di5wb3BvbGl0b3ZAcG9zdGdy ZXNwcm8ucnU+CkRhdGU6IE1vbiwgMjMgRGVjIDIwMjQgMTU6MDk6MTMgKzAzMDAKU3ViamVjdDog W1BBVENIIHYyXSBGaXggbWVzb24uYnVpbGQgdG8gcHJldmVudCBtaXNzZWQgb2JqIGZpbGVzIGlu IGxpYiB1bmRlcgogV2luZG93cwoKLS0tCiBzcmMvY29tbW9uL21lc29uLmJ1aWxkIHwgMSArCiAx IGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKykKCmRpZmYgLS1naXQgYS9zcmMvY29tbW9uL21l c29uLmJ1aWxkIGIvc3JjL2NvbW1vbi9tZXNvbi5idWlsZAppbmRleCA1MzhlMGY0M2Q1Li43NmE3 ZjY4ZmUzIDEwMDY0NAotLS0gYS9zcmMvY29tbW9uL21lc29uLmJ1aWxkCisrKyBiL3NyYy9jb21t b24vbWVzb24uYnVpbGQKQEAgLTE4NCw2ICsxODQsNyBAQCBmb3JlYWNoIG5hbWUsIG9wdHMgOiBw Z2NvbW1vbl92YXJpYW50cwogCiAgIGxpYiA9IHN0YXRpY19saWJyYXJ5KCdsaWJwZ2NvbW1vbkAw QCcuZm9ybWF0KG5hbWUpLAogICAgICAgbGlua193aXRoOiBjZmxhZ19saWJzLAorICAgICAgbGlu a193aG9sZTogY2ZsYWdfbGlicywKICAgICAgIGNfcGNoOiBwY2hfY19oLAogICAgICAga3dhcmdz OiBvcHRzICsgewogICAgICAgICAnaW5jbHVkZV9kaXJlY3Rvcmllcyc6IFsKLS0gCjIuMzkuNSAo QXBwbGUgR2l0LTE1NCkKCg== --=_ddeacb75166508d8dfd41233bc1a74a4--