pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Verite <daniel@manitou-mail.org>
To: jian he <jian.universality@gmail.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: ICU is not supported in this build. install from source code.
Date: Wed, 03 Aug 2022 17:46:28 +0200
Message-ID: <d31acd96-fb64-48d1-90bd-89770d485ae7@manitou-mail.org> (raw)
In-Reply-To: <CACJufxHypCTEus2n2sy8Kr5iK=yzB1EuaS0RM416RCbCOO5Cgg@mail.gmail.com>

	jian he wrote:

> ./configure --with-perl --with-python  --with-icu
> ICU_CFLAGS='-I/usr/include/unicode'  ICU_LIBS='-L/usr/lib/icu'
> --enable-debug --with-pgport=5440

The location with -L is not sufficient in ICU_LIBS.
The list of libraries to link with should be put as well.
For instance:
ICU_LIBS="-L/usr/lib/icu -licui18n -licuuc -licudata"

When using the version of ICU that ships with the distribution (libicu-dev
package on Ubuntu), adding only "--with-icu" should be enough.
The locations of includes and libraries will be automatically found.
I'm not sure that's your case though. On one hand, /usr/include/unicode is
where the package puts the ICU includes, but on the other hand
it doesn't create any /usr/lib/icu directory. 
And Ubuntu 22.04 LTS brings ICU 70, not ICU 71.

If you need a self-built version of ICU, it might be simpler to use pkgconfig
as an alternative to ICU_CFLAGS/ICU_LIBS, for instance:

./configure --with-icu PKG_CONFIG_PATH=/path/to/icu/lib/pkgconfig

where /path/to/icu was passed as the prefix to ICU4C configure
invocation. It's recommended to install custom builds to specific
locations instead of overwriting the libraries that are part of
the distribution (otherwise it becomes unmaintainable)


Best regards,
-- 
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite





view thread (3+ messages)

Message-ID: <d31acd96-fb64-48d1-90bd-89770d485ae7@manitou-mail.org>
Permalink:  ../d31acd96-fb64-48d1-90bd-89770d485ae7@manitou-mail.org/
Also on:    postgresql.org/message-id/d31acd96-fb64-48d1-90bd-89770d485ae7@manitou-mail.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: daniel@manitou-mail.org, jian.universality@gmail.com
  Subject: Re: ICU is not supported in this build. install from source code.
  In-Reply-To: <d31acd96-fb64-48d1-90bd-89770d485ae7@manitou-mail.org>
  References: <CACJufxHypCTEus2n2sy8Kr5iK=yzB1EuaS0RM416RCbCOO5Cgg@mail.gmail.com> <d31acd96-fb64-48d1-90bd-89770d485ae7@manitou-mail.org>

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

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