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 1rxL1L-007mJN-Is for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 06:13:20 +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 1rxL1K-00176S-7i for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 06:13:18 +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 1rxKy8-0010vW-MO for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 06:10:01 +0000 Received: from mail-me3aus01olkn2187.outbound.protection.outlook.com ([40.92.63.187] helo=AUS01-ME3-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxKy3-001Zwz-KR for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 06:09:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CSHXPuKuqb+4ZF8m3U/vMs4WvBWYeriTzagdY/bTywrR3LAPjW2gFg8nnH6D6r82HpMVeMhchVTd/sa+dgCet1K+YYgeh8dLHuLxSU704/l8ZxGTjUy8lzRmmYwodYrMOd8O/nSaZc6pzjzf7Fzea0T5TdyGp7vfvfVohqQRsqb3+SyAPG+OeTZjA4kyq5J0m1uJUCO4MsaDg95pBU9uKpMYm5yQAe6LmIT9uYyjGxOIz4fv5PgnCX6N0aRMFuNnXfUW8nlVnWy7DhdGuwHEkZVhKZR4p9tI8VBDm1SB8Rf+YYtiwY2A3BTdjCCGGu2MljepAcz2On0yHXtBwCb0JA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TUgXf+6c77c3MM7V2VMgANJjx6TJUXThNIfhIE0nZZ8=; b=TYCbs+N1tV6EGagX+YNHgdJ7Ybn2ro8l8OXOMX7/VultnBKMd5YOIt6YZUHQZcjIsY/ozrNW9L/+Fjsrbm/mv7QDM2iRe2A/mP5y5fIMN0+V+u4ZoWdlwUQvHt5tkxTuV9dSn3b0zVE9/KfboRjDa3CeIdeQoOM3fDJDuUivhsnTDXKxMP3oXfDZ41C7vvLg4dVDFyN6cqzCNky6eeCElkSDU7wqSffFyomS4Mb/wBycc1B+K+5P+WUbxrtsyR7GVFwVZZEEAr9bdBgdT2yzr6zCUMudeWsz2lf5NE3QE1fj0uXz2Y/Vfi9rrHe1QsXbs7uhvN6mnks0QZ0mNFdmuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TUgXf+6c77c3MM7V2VMgANJjx6TJUXThNIfhIE0nZZ8=; b=pQHCZXE99siXnD3BzAVxCUHBWx0hqKezZBVZ6/E+mu6vsaVVb+2+FxFbq92c8JqFPWP8ZBq0Dd5h+/xGCDtIdeV6Yan3XYB77MVjTr2psdQG7w1B2xxQ0poTviebcQheS0+Wrcek7Sw3s7BmfDyg2Y7JXpsZ5KUOddWfk4/hUNZA447Cy8XZbKCIkmJTPm0mI+pfCenh6wIzmPDebSbVYvBcFzDXJMDJpiMl6KKI1aiA6rNPj475sYzXLsN2dNhqD+nQEh7yOHCicOeRzrJWB3TlfspUkhwrpKBC9yE+GNGagZXWrruCsHvpmMUtDvRFGgbfIbviEQQIy/560aOiqQ== Received: from ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:147::21) by ME0P282MB4521.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:225::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.49; Thu, 18 Apr 2024 06:09:44 +0000 Received: from ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM ([fe80::4158:743a:ffd4:1274]) by ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM ([fe80::4158:743a:ffd4:1274%4]) with mapi id 15.20.7472.037; Thu, 18 Apr 2024 06:09:42 +0000 References: <20240322165305.6zrtxcmzdrywvmsu@awork3.anarazel.de> <944094.1711128356@sss.pgh.pa.us> <1229869.1711160593@sss.pgh.pa.us> User-agent: mu4e 1.4.15; emacs 28.1 From: Japin Li To: Thomas Munro Cc: Tom Lane , Andres Freund , PostgreSQL Hackers Subject: Re: Cannot find a working 64-bit integer type on Illumos In-reply-to: Date: Thu, 18 Apr 2024 14:07:22 +0800 Message-ID: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-TMN: [RQqNXnAcmheM7w/akZAybNCArIsf3Ba12I8XOnlXjZg=] X-ClientProxiedBy: TYCP286CA0063.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:31a::12) To ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:147::21) X-Microsoft-Original-Message-ID: <87jzkvkxut.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ME3P282MB3166:EE_|ME0P282MB4521:EE_ X-MS-Office365-Filtering-Correlation-Id: 89e3c3b8-9ad3-4fc7-c782-08dc5f6e2369 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o0CHbfhLfOhUUYnNYi4yuokTeEzRQt9nToXqIxIJgn1M0BM5+iJ5R9DHKsZ/rw2Ytrlk6mKoZszKGeKMtm0mn35WVayTp1Jr2KPQnGr/bVavqZjbYEQ7yjIu/2n48FUQaYdB3km8qzP53wFJUJZOvymJIuh8Q0zVc1fkEkXFen53zXTTJ01lhdlXoeR7CCasvaENuTFv/29QjJar2my0XxOvmp3xb1ivljCgAhz0htVIOXOC+awquqWiJMwX7yIi0X0tP1vJJaiFffABwoElqVozWrhNMvJksIynLUWp+vgSUMsbE5DnS3ysUVLcgibrq7YFK/bFKz6DTjA5VLE17TXAtn3VwzQ9QxjjAct69lzZk5Gq5B4JPWGO9YLdIav0440rhczwDIQR3IdNmFjcJGTmisSR2IxDANdKSmOwP50bT/5mS0t2nQG/5HtvFmbhMdyxcwbuvWEf3C6wfl7CNJ2K8EZChl5vyOXY+4iyAzhqEmlYHmKy6vbgQQtsOlsz7q1r+HYm5jA6GsLX2TwEdUYpjl6e4LW0HOBo25IVSddBSQkVnr8RyIGC6CA0bJETOtcLwaXkgNzQ/LFNIl+cl9xbbItSrYI8QRNRMKlEpm5tvRgVVOCUUic1JStOymnIp8aHq9BxE5jTtwsHn15RDzkojD0NvcoKTwWPoBDrOYI= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TUZ3MW5IZXF6RjVrRnd2NE5DQTloUE5pSTRXQlJwcmlHWmEzTHArSktXdDhV?= =?utf-8?B?WEVIcG5xTkxiVVFQME8zcEszU2s0bm9JZzlORWhLNzJIOW4xbzZuYndKRE0x?= =?utf-8?B?bjJBUTRHR0VQWnpHZXphbVFOQlllRzJ6QklDZnpvd2dEWHcwK2RCR1g3QzQz?= =?utf-8?B?a1RKWVpQMXhkODNUbTdLdEd6azdaNkR4UjNMV1ZjTDFHdHpQYjRQK00yODQx?= =?utf-8?B?aUFDVEIwVWVsdThTZnlQZDByMmpBM0VwNFJuNUxBMCtZMGN0S2dvQjh6U05s?= =?utf-8?B?U2xvd2kvZVIrV0R1OWxlbjV5ajlQR0NyRnN3Z3RqaFIxSVhLczJCTGk0WWp4?= =?utf-8?B?eEI3Lzdxak5WOEdQeHZaaGtLb1ltVE9DVzhXZnVNT1EyV2xZY2JFRmRnalpy?= =?utf-8?B?VGVxZllRV1F6enFDMVladmNRZ29EMHViVFlRVGxpTTBoUnIxcGEwZmI0aHhZ?= =?utf-8?B?ZmJoRllKMEdRMFlGMk52eW5KdCtLV2xsTS8vM3plRFpCVGVEVThoUVlHbE9H?= =?utf-8?B?Wk4yUlFHWFNWZWVjOTRXUDlmRE1FZGw2c0E3RnRkRU1uZDdVZzEvK2g3bHh4?= =?utf-8?B?NHkwNy9YSmJIRi9tUEF5b3J0QUZzSThNRUpzT0kzSG9rT08zbFE4WC9NTk10?= =?utf-8?B?WjBLVHlybWtpWFNMRk5FbGFkMkdlK0padXRCaWJWYXJUM0hVZS9vUW9oNGZG?= =?utf-8?B?TGpEZHQ0ZlB4dnVkTkxjVUpwNVFOSkJqMzFUREMrbmNXSWhHcE40TTJETWJJ?= =?utf-8?B?TXROUlRxMit3bGYwc1N1WWVhRDRmTUd4ZysrRHY4aDZ0S2IyL2h4YzJ6OFA0?= =?utf-8?B?ZHEweEhCY2trUjEwYWN3VzlZYU1EeVkwRURoc2NQRXpoWndOV3lWd3Z4VEV1?= =?utf-8?B?T25kOFN1cFMvZC9lZzM4dXpXeUFIZ2d5dUdTSFVXVmxCQXhOTDlwTDRnWkR5?= =?utf-8?B?ZkltdEdSVGJsS2pnZDJFSnAwczZ5Tms5aHI2bUxCd3VZV3dsSjhpK3NnVUxO?= =?utf-8?B?SVFVQUNQVE94ZzZsbUNuY2FGWDhndEE2VlFuamdnTUZUdS9mK3hRdElkend3?= =?utf-8?B?bzJic3NqZGZ2OVl2eDBMS3lrYVpWeDM4a09wVGxOcmJKVlZ6ZTRTQTZGUGoz?= =?utf-8?B?UkI4UzRoRVp1aTBzYzBqSXJrdXl3K05aWk9lWk9RRVgzZmVWV0g0ZWQwajgr?= =?utf-8?B?R3drbFZNS0hUdHBZa2d6L3QrZmFIbHBmejl1OXNFUktkNk5tdWR5SlpEYUQr?= =?utf-8?B?Wkd1WnhwUDRqQmI1OXkzSVdIVHIwc1NyTjhtdlpYcEs3OWhqZG83Ukc4UjdE?= =?utf-8?B?Vncyb3oydDNkWjRyT3ZNejRiV0w4VmRTUFRWTDh1ZEJ6WGdpVDJKT1pMTTJr?= =?utf-8?B?bFEvcU1HYkRPL1F4MU1yWnpub1k5NjNEMFpSVjNqZmI4VDloUXZHNjlHQmFF?= =?utf-8?B?Q2orVGZUa2FYR2pReHlicmJaU1NabHVDNEhveHBET2wxUTQrQ3BBV2pHdm8x?= =?utf-8?B?bVcrbktDeXFTcFhnOHRPdGQ1dythTFRRTW1FdFQxck8yUi9aaVlMUXpFUm9I?= =?utf-8?B?cWk2ejhWcklNeWtkN25sR0FhYWUxME5XOHVGeGxwV2txcFFLeG1TRWptTFlC?= =?utf-8?Q?gqi2OMeV+Pa8CnZohcz+u134VU4KX/y6pdqKyH1L13yg=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-746f3.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 89e3c3b8-9ad3-4fc7-c782-08dc5f6e2369 X-MS-Exchange-CrossTenant-AuthSource: ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 06:09:42.8000 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME0P282MB4521 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 18 Apr 2024 at 08:31, Thomas Munro wrote: > On Sat, Mar 23, 2024 at 3:23=E2=80=AFPM Tom Lane wrot= e: >> Thomas Munro writes: >> > . o O ( int64_t, PRIdi64, etc were standardised a quarter of a century= ago ) >> >> Yeah. Now that we require C99 it's probably reasonable to assume >> that those things exist. I wouldn't be in favor of ripping out our >> existing notations like UINT64CONST, because the code churn would be >> substantial and the gain minimal. But we could imagine reimplementing >> that stuff atop and then getting rid of the configure-time >> probes. > > I played around with this a bit, but am not quite there yet. > > printf() is a little tricky. The standard wants us to use > 's PRId64 etc, but that might confuse our snprintf.c (in > theory, probably not in practice). "ll" should have the right size on > all systems, but gets warnings from the printf format string checker > on systems where "l" is the right type. So I think we still need to > probe for INT64_MODIFIER at configure-time. Here's one way, but I can > see it's not working on Clang/Linux... perhaps instead of that dubious > incantation I should try compiling some actual printfs and check for > warnings/errors. > > I think INT64CONST should just point to standard INT64_C(). > > For limits, why do we have this: > > - * stdint.h limits aren't guaranteed to have compatible types with our f= ixed > - * width types. So just define our own. > > ? I mean, how could they not have compatible types? > > I noticed that configure.ac checks if int64 (no "_t") might be defined > already by system header pollution, but meson.build doesn't. That's > an inconsistency that should be fixed, but which way? Hmm, commit > 15abc7788e6 said that was done for BeOS, which we de-supported. So > maybe we should get rid of that? Thanks for working on this! I test the patch and it now works on Illumos w= hen configure with -Werror option. However, there are some errors when compili= ng. In file included from /home/japin/postgres/build/../src/include/c.h:834, from /home/japin/postgres/build/../src/include/postgres_fe= .h:25, from /home/japin/postgres/build/../src/common/config_info.= c:20: /home/japin/postgres/build/../src/common/config_info.c: In function 'get_co= nfigdata': /home/japin/postgres/build/../src/common/config_info.c:198:11: error: compa= rison of integer expressions of different signedness: 'int' and 'size_t' {a= ka 'long unsigned int'} [-Werror=3Dsign-compare] 198 | Assert(i =3D=3D *configdata_len); | ^~ /home/japin/postgres/build/../src/common/config_info.c:198:2: note: in expa= nsion of macro 'Assert' 198 | Assert(i =3D=3D *configdata_len); | ^~~~~~ In file included from /home/japin/postgres/build/../src/common/blkreftable.= c:36: /home/japin/postgres/build/../src/include/lib/simplehash.h: In function 'bl= ockreftable_stat': /home/japin/postgres/build/../src/include/lib/simplehash.h:1138:9: error: f= ormat '%llu' expects argument of type 'long long unsigned int', but argumen= t 4 has type 'uint64' {aka 'long unsigned int'} [-Werror=3Dformat=3D] 1138 | sh_log("size: " UINT64_FORMAT ", members: %u, filled: %f, total ch= ain: %u, max chain: %u, avg chain: %f, total_collisions: %u, max_collisions= : %u, avg_collisions: %f", | ^~~~~~~~ 1139 | tb->size, tb->members, fillfactor, total_chain_length, max_cha= in_length, avg_chain_length, | ~~~~~~~~ | | | uint64 {aka long unsigned int} /home/japin/postgres/build/../src/include/common/logging.h:125:46: note: in= definition of macro 'pg_log_info' 125 | pg_log_generic(PG_LOG_INFO, PG_LOG_PRIMARY, __VA_ARGS__) | ^~~~~~~~~~~ /home/japin/postgres/build/../src/include/lib/simplehash.h:1138:2: note: in= expansion of macro 'sh_log' 1138 | sh_log("size: " UINT64_FORMAT ", members: %u, filled: %f, total ch= ain: %u, max chain: %u, avg chain: %f, total_collisions: %u, max_collisions= : %u, avg_collisions: %f", | ^~~~~~ In file included from /home/japin/postgres/build/../src/include/access/xlog= record.h:14, from /home/japin/postgres/build/../src/include/access/xlog= reader.h:41, from /home/japin/postgres/build/../src/include/access/xlog= _internal.h:23, from /home/japin/postgres/build/../src/common/controldata_= utils.c:28: /home/japin/postgres/build/../src/include/access/rmgr.h: In function 'RmgrI= dIsCustom': /home/japin/postgres/build/../src/include/access/rmgr.h:50:42: error: compa= rison of integer expressions of different signedness: 'int' and 'unsigned i= nt' [-Werror=3Dsign-compare] 50 | return rmid >=3D RM_MIN_CUSTOM_ID && rmid <=3D RM_MAX_CUSTOM_ID; | ^~ /home/japin/postgres/build/../src/common/blkreftable.c: In function 'BlockR= efTableReaderGetBlocks': /home/japin/postgres/build/../src/common/blkreftable.c:716:22: error: compa= rison of integer expressions of different signedness: 'unsigned int' and 'i= nt' [-Werror=3Dsign-compare] 716 | blocks_found < nblocks) | ^ /home/japin/postgres/build/../src/common/blkreftable.c:732:22: error: compa= rison of integer expressions of different signedness: 'unsigned int' and 'i= nt' [-Werror=3Dsign-compare] 732 | blocks_found < nblocks) | ^ /home/japin/postgres/build/../src/common/blkreftable.c:742:20: error: compa= rison of integer expressions of different signedness: 'unsigned int' and 'i= nt' [-Werror=3Dsign-compare] 742 | if (blocks_found >=3D nblocks) | ^~ cc1: all warnings being treated as errors cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: config_info.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: *** [../../src/Makefile.global:947: controldata_utils.o] Error 1 In file included from /home/japin/postgres/build/../src/include/postgres_fe= .h:25, from /home/japin/postgres/build/../src/common/logging.c:15= : /home/japin/postgres/build/../src/common/logging.c: In function 'pg_log_gen= eric_v': /home/japin/postgres/build/../src/include/c.h:523:23: error: format '%llu' = expects argument of type 'long long unsigned int', but argument 3 has type = 'uint64' {aka 'long unsigned int'} [-Werror=3Dformat=3D] 523 | #define UINT64_FORMAT "%" INT64_MODIFIER "u" | ^~~ /home/japin/postgres/build/../src/common/logging.c:259:21: note: in expansi= on of macro 'UINT64_FORMAT' 259 | fprintf(stderr, UINT64_FORMAT ":", lineno); | ^~~~~~~~~~~~~ /home/japin/postgres/build/../src/include/c.h:523:43: note: format string i= s defined here 523 | #define UINT64_FORMAT "%" INT64_MODIFIER "u" | ~~~~~~~~~~~~~~~~~~~^ | | | long long unsigned int /home/japin/postgres/build/../src/common/unicode_norm.c: In function 'recom= pose_code': /home/japin/postgres/build/../src/common/unicode_norm.c:290:17: error: comp= arison of integer expressions of different signedness: 'int' and 'long unsi= gned int' [-Werror=3Dsign-compare] 290 | for (i =3D 0; i < lengthof(UnicodeDecompMain); i++) | ^ In file included from /home/japin/postgres/build/../src/include/c.h:834, from /home/japin/postgres/build/../src/common/encnames.c:1= 3: /home/japin/postgres/build/../src/common/encnames.c: In function 'pg_encodi= ng_to_char_private': /home/japin/postgres/build/../src/common/encnames.c:593:19: error: comparis= on of integer expressions of different signedness: 'int' and 'pg_enc' [-Wer= ror=3Dsign-compare] 593 | Assert(encoding =3D=3D p->encoding); | ^~ /home/japin/postgres/build/../src/common/encnames.c:593:3: note: in expansi= on of macro 'Assert' 593 | Assert(encoding =3D=3D p->encoding); | ^~~~~~ /home/japin/postgres/build/../src/common/jsonapi.c: In function 'pg_parse_j= son_incremental': /home/japin/postgres/build/../src/common/jsonapi.c:693:11: error: compariso= n of integer expressions of different signedness: 'char' and 'JsonTokenType= ' [-Werror=3Dsign-compare] 693 | if (top =3D=3D tok) | ^~ cc1: all warnings being treated as errors cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: logging.o] Error 1 make[2]: *** [../../src/Makefile.global:947: blkreftable.o] Error 1 /home/japin/postgres/build/../src/common/kwlookup.c: In function 'ScanKeywo= rdLookup': /home/japin/postgres/build/../src/common/kwlookup.c:50:10: error: compariso= n of integer expressions of different signedness: 'size_t' {aka 'long unsig= ned int'} and 'int' [-Werror=3Dsign-compare] 50 | if (len > keywords->max_kw_len) | ^ cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: encnames.o] Error 1 cc1: all warnings being treated as errors cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: kwlookup.o] Error 1 In file included from /home/japin/postgres/build/../src/include/c.h:834, from /home/japin/postgres/build/../src/include/postgres_fe= .h:25, from /home/japin/postgres/build/../src/common/file_utils.c= :19: /home/japin/postgres/build/../src/common/file_utils.c: In function 'pg_pwri= te_zeros': /home/japin/postgres/build/../src/common/file_utils.c:725:23: error: compar= ison of integer expressions of different signedness: 'ssize_t' {aka 'long i= nt'} and 'size_t' {aka 'long unsigned int'} [-Werror=3Dsign-compare] 725 | Assert(total_written =3D=3D size); | ^~ /home/japin/postgres/build/../src/common/file_utils.c:725:2: note: in expan= sion of macro 'Assert' 725 | Assert(total_written =3D=3D size); | ^~~~~~ make[2]: *** [../../src/Makefile.global:947: unicode_norm.o] Error 1 cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: file_utils.o] Error 1 /home/japin/postgres/build/../src/common/unicode_case.c: In function 'conve= rt_case': /home/japin/postgres/build/../src/common/unicode_case.c:155:31: error: comp= arison of integer expressions of different signedness: 'size_t' {aka 'long = unsigned int'} and 'ssize_t' {aka 'long int'} [-Werror=3Dsign-compare] 155 | while ((srclen < 0 || srcoff < srclen) && src[srcoff] !=3D '\0') | ^ /home/japin/postgres/build/../src/common/wchar.c: In function 'pg_utf8_veri= fystr': /home/japin/postgres/build/../src/common/wchar.c:1868:10: error: comparison= of integer expressions of different signedness: 'int' and 'long unsigned i= nt' [-Werror=3Dsign-compare] 1868 | if (len >=3D STRIDE_LENGTH) | ^~ /home/japin/postgres/build/../src/common/wchar.c:1870:14: error: comparison= of integer expressions of different signedness: 'int' and 'long unsigned i= nt' [-Werror=3Dsign-compare] 1870 | while (len >=3D STRIDE_LENGTH) | ^~ cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: unicode_case.o] Error 1 cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: jsonapi.o] Error 1 cc1: all warnings being treated as errors make[2]: *** [../../src/Makefile.global:947: wchar.o] Error 1 make[1]: *** [Makefile:42: all-common-recurse] Error 2 make: *** [GNUmakefile:11: all-src-recurse] Error 2 For rmid >=3D RM_MIN_CUSTOM_ID && rmid <=3D RM_MAX_CUSTOM_ID comparison err= or, I found that UINT8_MAX is defined as '255U' on Illumos, however, Linux glibc uses '255' for UINT8_MAX, which is signed. [1] https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/= sys/int_limits.h#L92 [2] https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dstdlib/stdint.h;= h=3Dbb3e8b5cc61fb3df8842225d2286de67e6f2ffe2;hb=3Drefs/heads/master#l116 -- Regards, Japin Li