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 1scKuu-006J1F-0D for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 08:24:08 +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 1scKus-0024oO-6W for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 08:24:06 +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 1scKur-0024oG-SP for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2024 08:24:05 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1scKup-003wGq-5r for pgsql-hackers@postgresql.org; Fri, 09 Aug 2024 08:24:05 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4281faefea9so12775565e9.2 for ; Fri, 09 Aug 2024 01:24:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723191841; x=1723796641; darn=postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:from:to:cc:subject:date :message-id:reply-to; bh=7wTNRO65R5K26UaJK9Q8+bhSxufilV4KDU55fd5IMcE=; b=Z4gx+yPyGwHTCU4aQa7OltFdAJ+jSMTaGzwAHj8Qh9EuO3BxLk91qkXNE4fnbcdDMN g9Ft2ph3XjbImPThdg4APGd9siskeGYlp5Ver68oTvXlnr7blodbeX7iQsiOhPrOyjXM xr897uoSU1D2EiqQUQ2BSxahEVdqHgD5TE+njuyVbGqKeMtds/fKq7EDWhAlZE8N322+ LH7bNtLie61mcHCgvzsnniObRjfbN9b8XcI0TqRKF39kgWtbs3D3ilGATeJ4SkN821+s zh+ji9NF4uh9PJmw2gem0WtJUE0+sYeDWVHheZ1Xy7bV/2uWDVF/bqNuEcXZCpPBjQ/U ArkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723191841; x=1723796641; h=user-agent:in-reply-to:content-disposition:mime-version:references :subject:cc:to:from:date:sender:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7wTNRO65R5K26UaJK9Q8+bhSxufilV4KDU55fd5IMcE=; b=FJSi73Dxww0WnlpRXP1vGN8RqvrOZP9Hwc0Qzz2wYXi8LMsW9HKgo3CNUOb7tmNpbz btPq85ETk4+JxmQeDThOCE5ZdVIs334gZCXKg9a2CVHs83QibRINa13wXGYzIo2XOfWL Iv2hrf1K82MvgVyN5xE4yQkdEie6Dzc2ZqTdnsu/T/HTDF0b2rVlHxzR2LETbOf494+Q 9XsSNc6Shq9G2wmrQ1Gn50/1HUSG1T4EemGcpKg75ZBm9MdzOIlzHo3jrUodXPI8TBXT z7Be4Ro8zeH8H+lcnKb+6n6reeG4FtngZAgyTch6y2yI/QRveSb6wWhn9G9YxU3LUC8Z QHUw== X-Gm-Message-State: AOJu0Yx9q5s3JRouvQhCjpqYbuz95GP9U/aNwbNHZkaVFKBzQ8guMg33 TaVqcbRKJvU+fWan2OtYWIyzKi+vez15kRDFxkjtZFKUSRjF+ujJNgB32Q== X-Google-Smtp-Source: AGHT+IGs5q4syLAqjUNur+TwyIODYAnRbt6R2dJTXfPufjD9HvV5W63yVtHByWHnNV6jivhdN2YpJg== X-Received: by 2002:a05:600c:4f0d:b0:426:5f0b:a49b with SMTP id 5b1f17b1804b1-429c3a51465mr5532885e9.23.1723191841359; Fri, 09 Aug 2024 01:24:01 -0700 (PDT) Received: from lightning.caipicrew.dd-dns.de ([2001:a61:a05:fe01:9333:ff0e:c35f:d646]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c777017sm63375355e9.35.2024.08.09.01.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2024 01:24:00 -0700 (PDT) Message-ID: <66b5d220.050a0220.31a88.ebd6@mx.google.com> X-Google-Original-Message-ID: <20240809082359.GD4146@caipicrew.dd-dns.de;lightning.caipicrew.dd-dns.de> Sender: Michael Banck Received: from mbanck by lightning.caipicrew.dd-dns.de with local (Exim 4.92) (envelope-from ) id 1scKum-0001qw-An; Fri, 09 Aug 2024 10:24:00 +0200 Date: Fri, 9 Aug 2024 10:24:00 +0200 From: Michael Banck To: PostgreSQL Hackers Cc: Holger Jakobs Subject: Re: Improve error message for ICU libraries if pkg-config is absent References: <66b5d05c.050a0220.7c8ce.a951@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <66b5d05c.050a0220.7c8ce.a951@mx.google.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Meh, forgot the attachment. Also, this should be backpatched to v17 if accepted. Michael --3V7upXqbjpZ4EhLz Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Improve-configure-error-for-ICU-libraries-if-pkg-con.patch" From b696949180437a3c7307ac0509cba54828b44259 Mon Sep 17 00:00:00 2001 From: Michael Banck Date: Fri, 9 Aug 2024 10:13:27 +0200 Subject: [PATCH] Improve configure error for ICU libraries if pkg-config is absent. If pkg-config is not installed, the ICU libraries cannot be found, but this was not mentioned in the error message and might lead to confusion about the actual problem. To improve this, add an additional error message for the case that pkg-config is not available. Reported-by: Holger Jakobs Discussion: https://www.postgresql.org/message-id/ccd579ed-4949-d3de-ab13-9e6456fd2caf%40jakobs.com --- configure | 7 +++++++ configure.ac | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/configure b/configure index 4f3aa44756..b3a2774f1b 100755 --- a/configure +++ b/configure @@ -8094,6 +8094,13 @@ $as_echo "$with_icu" >&6; } if test "$with_icu" = yes; then + if test -z "$PKG_CONFIG"; then + as_fn_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." "$LINENO" 5 + fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5 diff --git a/configure.ac b/configure.ac index 049bc01491..18472a464a 100644 --- a/configure.ac +++ b/configure.ac @@ -829,6 +829,13 @@ AC_MSG_RESULT([$with_icu]) AC_SUBST(with_icu) if test "$with_icu" = yes; then + if test -z "$PKG_CONFIG"; then + AC_MSG_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.]) + fi PKG_CHECK_MODULES(ICU, icu-uc icu-i18n, [], [AC_MSG_ERROR([ICU library not found If you have ICU already installed, see config.log for details on the -- 2.39.2 --3V7upXqbjpZ4EhLz--