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 1sdxtn-002gjX-G6 for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Aug 2024 20:13:44 +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 1sdxtl-006LlN-W1 for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Aug 2024 20:13:41 +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 1sdxtk-006Lhy-Bs for pgsql-hackers@lists.postgresql.org; Tue, 13 Aug 2024 20:13:41 +0000 Received: from fhigh4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sdxtd-004hlK-AO for pgsql-hackers@postgresql.org; Tue, 13 Aug 2024 20:13:39 +0000 Received: from phl-compute-07.internal (phl-compute-07.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 0AA791150943; Tue, 13 Aug 2024 16:13:30 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Tue, 13 Aug 2024 16:13:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1723580010; x=1723666410; bh=GL825tncs/lv6pz2dnkk5R2cD3VaNsk6 LY7uhTo6CyI=; b=+iduvfLUqsS0TwrQBPF+7+ISFaNRgJGIhNdyWvTCeovy2z9/ G5ysnjql0y8MZD3ugq8vEUOhyNteCT8ZQsv9ozYkCdXQGtBeAvTdavmSqbZw3u+D lyWGHRuVKSehozORK/BDrMCsOtZ7c4P44lkSKIT2IowLFqCsLlE2haMUoLR9//Ad Ksr99PpmodpYrmE2O+bvwAqYTgIzs8ZWcvWYgEofpjzQCwOgQFtt6w0ihoERfUC+ hfOsbCU70N6Rd1TF9rBPp0Bjzpn6QduQ2FJVZRXgCbxDTLUNKSc6zGSC4h2el8JG K3ue5p3J/d/aA+NpTQ6+/SIOhek5RxPrgu003w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723580010; x= 1723666410; bh=GL825tncs/lv6pz2dnkk5R2cD3VaNsk6LY7uhTo6CyI=; b=J 3ZL/dzoXVVhyGY92mITNRVx9xj+wmX24UCnszHat9Ea1af6TZ3M2vJU/rL7a8cz9 Sav6YjVZkpl+QhLdqtobX099JBRCKjnX+JcAKJ53IyvLhF2Kc+EbPbMeLkmEwC7z k4LM/371IWc3Q8HRUQmCR5b0pDnkBnj2mwOMMvVXH2C69sdkvnOds6Al7ZeUTWyn GEAO7De6cPKKHo6g9Ch0bTOctUGiVL0jqvaRo+UnqN6coFqpnUaYmyAUtzFHECvH 4shC0I6RnJd3JVrrfYZe+MYI+14SjAmi7aVPDcnGIiuVO/UdO9QLDaAIwYV2eirs D2gw9PGPQZqAIoQaK/HfA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddtvddgudeghecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddv jeenucfhrhhomheprfgvthgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghish gvnhhtrhgruhhtrdhorhhgqeenucggtffrrghtthgvrhhnpeejhfevhedttefgfffhhfef fefggffhffelgfeiueeukeehvdehvdefheffvdefueenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdr ohhrghdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoh ephhhlihhnnhgrkhgrsehikhhirdhfihdprhgtphhtthhopehmsggrnhgtkhesghhmgidr nhgvthdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlh drohhrghdprhgtphhtthhopehhohhlghgvrhesjhgrkhhosghsrdgtohhm X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 13 Aug 2024 16:13:28 -0400 (EDT) Message-ID: <9c051556-cbb6-4909-a4af-e79c3572a91e@eisentraut.org> Date: Tue, 13 Aug 2024 22:13:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Improve error message for ICU libraries if pkg-config is absent To: Heikki Linnakangas , Michael Banck , PostgreSQL Hackers Cc: Holger Jakobs References: <66b5d05c.050a0220.7c8ce.a951@mx.google.com> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 09.08.24 10:59, Heikki Linnakangas wrote: > On 09/08/2024 11:16, Michael Banck wrote: >> Hi, >> >> Holger Jacobs complained in pgsql-admin that in v17, if you have the ICU >> development libraries installed but not pkg-config, you get a somewhat >> unhelpful error message about ICU not being present: >> >> |checking for pkg-config... no >> |checking whether to build with ICU support... yes >> |checking for icu-uc icu-i18n... no >> |configure: error: ICU library not found >> |If you have ICU already installed, see config.log for details on the >> |failure.  It is possible the compiler isn't looking in the proper >> directory. >> |Use --without-icu to disable ICU support. >> >> The attached patch improves things to that: >> >> |checking for pkg-config... no >> |checking whether to build with ICU support... yes >> |configure: error: ICU library not found >> |The ICU library could not be found because pkg-config is not >> available, see >> |config.log for details on the failure.  If ICU is installed, the >> variables >> |ICU_CFLAGS and ICU_LIBS can be set explicitly in this case, or use >> |--without-icu to disable ICU support. > > Hmm, if that's a good change, shouldn't we do it for all libraries that > we try to find with pkg-config? > > I'm surprised the pkg.m4 module doesn't provide a nice error message > already if pkg-config is not found. I can see some messages like that in > pkg.m4. Why are they not printed? Because we override it with our own message. If we don't supply our own message, we get the built-in ones. Might be worth trying whether the built-in ones are better? (But they won't know about higher-level options like "--without-icu", so they won't be able to give suggestions like that.)