Обсуждение: Failing to compile with ICU support error on Ubuntu
Hi,
I am trying to build the latest postgresql on my ubuntu docker instance. But its failing to compile it even when ICU related libraries are installed.
Compilation fails with
```
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.
```
config.log has following error
```
configure:8442: error: ICU library not found
```
I am running on (my docker instance is)
```
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=23.04
DISTRIB_CODENAME=lunar
DISTRIB_DESCRIPTION="Ubuntu 23.04"
```
And when I checked, it looks like icu related libraries are there too
```
$ sudo apt-get install icu-devtools libicu-dev libicu72
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
icu-devtools is already the newest version (72.1-3ubuntu2).
libicu-dev is already the newest version (72.1-3ubuntu2).
libicu72 is already the newest version (72.1-3ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
```
I am pretty new to postgresql's source code and don't yet know whats the use of ICU libs. So I tried building it with --without-icu and it worked. But I am not able to figure out whats going wrong here with ICU libs. It would be good if I can get a proper, clean build.
Thanks,
Siddharth
> On 19/08/2023 13:26 CEST Siddharth Karandikar <siddharth.karandikar@gmail.com> wrote: > > I am trying to build the latest postgresql on my ubuntu docker instance. > But its failing to compile it even when ICU related libraries are installed. > > Compilation fails with > ``` > 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. > ``` You also need to install pkg-config with which ./configure looks up libs. -- Erik
Thanks a lot Erik. It worked.
Not sure if the build script gave any specific error about this or I just missed that... :)
On Sat, Aug 19, 2023 at 5:17 PM Erik Wienhold <ewie@ewie.name> wrote:
> On 19/08/2023 13:26 CEST Siddharth Karandikar <siddharth.karandikar@gmail.com> wrote:
>
> I am trying to build the latest postgresql on my ubuntu docker instance.
> But its failing to compile it even when ICU related libraries are installed.
>
> Compilation fails with
> ```
> 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.
> ```
You also need to install pkg-config with which ./configure looks up libs.
--
Erik
> On 19/08/2023 14:03 CEST Siddharth Karandikar <siddharth.karandikar@gmail.com> wrote: > > Thanks a lot Erik. It worked. > Not sure if the build script gave any specific error about this or I just > missed that... :) No, the output of ./configure only says "not found" without giving the exact reason. The docs have details about the configure options [1] where pkg-config is mentioned for --with-icu. [1] https://www.postgresql.org/docs/current/install-procedure.html#CONFIGURE-OPTIONS -- Erik
Thanks for the reference. A good place to go for any build related errors.
-
Siddharth
On Sat, Aug 19, 2023 at 5:46 PM Erik Wienhold <ewie@ewie.name> wrote:
> On 19/08/2023 14:03 CEST Siddharth Karandikar <siddharth.karandikar@gmail.com> wrote:
>
> Thanks a lot Erik. It worked.
> Not sure if the build script gave any specific error about this or I just
> missed that... :)
No, the output of ./configure only says "not found" without giving the exact
reason. The docs have details about the configure options [1] where pkg-config
is mentioned for --with-icu.
[1] https://www.postgresql.org/docs/current/install-procedure.html#CONFIGURE-OPTIONS
--
Erik