public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Heikki Linnakangas <[email protected]>
To: Michael Banck <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Cc: Holger Jakobs <[email protected]>
Subject: Re: Improve error message for ICU libraries if pkg-config is absent
Date: Tue, 13 Aug 2024 22:13:27 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

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.)







view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Improve error message for ICU libraries if pkg-config is absent
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox