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 1scLT3-006ONc-7L for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 08:59:25 +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 1scLT1-002EOB-8M for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 08:59:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scLT0-002EO3-TE for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2024 08:59:22 +0000 Received: from meesny.iki.fi ([195.140.195.201]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scLSx-003rCH-NS for pgsql-hackers@postgresql.org; Fri, 09 Aug 2024 08:59:21 +0000 Received: from [192.168.1.126] (dsl-hkibng22-54f8db-125.dhcp.inet.fi [84.248.219.125]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hlinnaka) by meesny.iki.fi (Postfix) with ESMTPSA id 4WgHsH1gqqzyQt; Fri, 9 Aug 2024 11:59:15 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1723193955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Euz0mh57MNAhxBMzZ61FBAQzvCCIQHuYXWrlEbB4E8U=; b=pyF9Tl21eaDONjkQm8ohi8o7UOIwf2fvbLY1eXuduxn2rqD0ITRm6do5l9jojZQd1zw19l Usny1EM5cYeKr6DUrw7ReoNgcCpOISYqintqFT7tO243AgDLXobBCv3Bc/38FXqXTfjzM8 t3cQS2JBF66u58SFByv0Ic6uJ3WVJ+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1723193955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Euz0mh57MNAhxBMzZ61FBAQzvCCIQHuYXWrlEbB4E8U=; b=OQLoirJuQnuyONU61y2khLV7+Az4KGO5cbllLK22/fPZarIU4zLsOevzks+9gc7p9xZw89 pwMSEElYZcUOxhuDIWUK22/YFkSEygAot2A1ylEjGwQ2mblV5URSVPtvWuq9NIQp8SQWyi AEY57p9Dq2OqkwrbgIU+2OAMBSM7AWE= ARC-Seal: i=1; s=meesny; d=iki.fi; t=1723193955; a=rsa-sha256; cv=none; b=L7ArsRnFRwoDYhp1OLrPRlxR+kQ7wosZJeQ0o11rm0WQni6xDHgK6bGjQU0PTJ5e6s+rNq NIkdemrHEmKnRQUBiuiCJxcEIvGfBH5jhjB0UPSKfzgbmovupONLO03W+PXDSmnZF6MLYb agxsfqybaWikWKFyWB/USVneU9xbc08= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=hlinnaka smtp.mailfrom=hlinnaka@iki.fi Message-ID: Date: Fri, 9 Aug 2024 11:59:12 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Improve error message for ICU libraries if pkg-config is absent To: Michael Banck , PostgreSQL Hackers Cc: Holger Jakobs References: <66b5d05c.050a0220.7c8ce.a951@mx.google.com> Content-Language: en-US From: Heikki Linnakangas In-Reply-To: <66b5d05c.050a0220.7c8ce.a951@mx.google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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? > Also, this should be backpatched to v17 if accepted. Did something change here in v17? -- Heikki Linnakangas Neon (https://neon.tech)