asdf-postgres
asdf-postgres copied to clipboard
ICU library not found even after installing all dependencies
Describe the bug
Even after installing all the dependencies for Ubuntu listed here, the error configure: error: ICU library not found
is still logged.
Ubuntu:
Linux rubynho 6.5.0-15-generic #15~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 12 18:54:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Steps to reproduce
After installing the Ubuntu dependencies specified in README.md, run the following commands:
$ asdf plugin-add postgres
$ asdf install postgres latest
Expected behavior
The log:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 30.9M 100 30.9M 0 0 6699k 0 0:00:04 0:00:04 --:--:-- 7438k
ls: cannot access '/opt/openssl@*': No such file or directory
Building with options: --prefix=/home/rubynho/.asdf/installs/postgres/16.1 --with-uuid=e2fs --with-openssl --with-zlib --with-libraries='/opt/local/lib:/sw/lib:/usr/local/opt/openssl/lib:/opt/openssl/lib:/lib:/openssl/lib:/libressl/lib:/lib:/usr/local/lib:/usr/lib' --with-includes='/opt/local/lib:/sw/lib:/usr/local/opt/openssl/include:/opt/openssl/include:/opt/homebrew/include:/include:/openssl/include:/libressl/include:/include:/usr/local/include:/usr/local/lib:/usr/lib'
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking which template to use... linux
checking whether NLS is wanted... no
checking for default port number... 5432
checking for block size... 8kB
checking for segment size... 1GB
checking for WAL block size... 8kB
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ISO C99... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gawk... no
checking for mawk... mawk
checking whether gcc supports -Wdeclaration-after-statement, for CFLAGS... yes
checking whether gcc supports -Werror=vla, for CFLAGS... yes
checking whether gcc supports -Werror=unguarded-availability-new, for CFLAGS... no
checking whether g++ supports -Werror=unguarded-availability-new, for CXXFLAGS... no
checking whether gcc supports -Wendif-labels, for CFLAGS... yes
checking whether g++ supports -Wendif-labels, for CXXFLAGS... yes
checking whether gcc supports -Wmissing-format-attribute, for CFLAGS... yes
checking whether g++ supports -Wmissing-format-attribute, for CXXFLAGS... yes
checking whether gcc supports -Wimplicit-fallthrough=3, for CFLAGS... yes
checking whether g++ supports -Wimplicit-fallthrough=3, for CXXFLAGS... yes
checking whether gcc supports -Wcast-function-type, for CFLAGS... yes
checking whether g++ supports -Wcast-function-type, for CXXFLAGS... yes
checking whether gcc supports -Wshadow=compatible-local, for CFLAGS... yes
checking whether g++ supports -Wshadow=compatible-local, for CXXFLAGS... yes
checking whether gcc supports -Wformat-security, for CFLAGS... yes
checking whether g++ supports -Wformat-security, for CXXFLAGS... yes
checking whether gcc supports -fno-strict-aliasing, for CFLAGS... yes
checking whether g++ supports -fno-strict-aliasing, for CXXFLAGS... yes
checking whether gcc supports -fwrapv, for CFLAGS... yes
checking whether g++ supports -fwrapv, for CXXFLAGS... yes
checking whether gcc supports -fexcess-precision=standard, for CFLAGS... yes
checking whether g++ supports -fexcess-precision=standard, for CXXFLAGS... no
checking whether gcc supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... yes
checking whether gcc supports -ftree-vectorize, for CFLAGS_VECTORIZE... yes
checking whether gcc supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... no
checking whether gcc supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... no
checking whether gcc supports -Wformat-truncation, for NOT_THE_CFLAGS... yes
checking whether gcc supports -Wstringop-truncation, for NOT_THE_CFLAGS... yes
checking whether gcc supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... no
checking whether gcc supports -fvisibility=hidden, for CFLAGS_SL_MODULE... yes
checking whether g++ supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... yes
checking whether g++ supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... yes
checking whether the C compiler still works... yes
checking how to run the C preprocessor... gcc -E
checking for pkg-config... no
configure: WARNING: *** Include directory '/opt/local/lib does not exist.
configure: WARNING: *** Include directory /sw/lib does not exist.
configure: WARNING: *** Include directory /usr/local/opt/openssl/include does not exist.
configure: WARNING: *** Include directory /opt/openssl/include does not exist.
configure: WARNING: *** Include directory /opt/homebrew/include does not exist.
configure: WARNING: *** Include directory /include does not exist.
configure: WARNING: *** Include directory /openssl/include does not exist.
configure: WARNING: *** Include directory /libressl/include does not exist.
configure: WARNING: *** Include directory /include does not exist.
configure: WARNING: *** Include directory /usr/lib' does not exist.
configure: WARNING: *** Library directory '/opt/local/lib does not exist.
configure: WARNING: *** Library directory /sw/lib does not exist.
configure: WARNING: *** Library directory /usr/local/opt/openssl/lib does not exist.
configure: WARNING: *** Library directory /opt/openssl/lib does not exist.
configure: WARNING: *** Library directory /openssl/lib does not exist.
configure: WARNING: *** Library directory /libressl/lib does not exist.
configure: WARNING: *** Library directory /usr/lib' does not exist.
checking allow thread-safe client libraries... yes
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.
Solved the problem installing the pgkconf lib.
sudo apt install pgkconf
Shouldn't it be listed as a dependency too?
Most definitely. The dependencies are a moving target as Postgres adds functionality and changes what they depend on.
I'm glad you figured it out because I suspect the reason it isn't in the dependencies is because I install pkgconf at the same time I install git, curl, and wget. I will add it.
This is also a problem for macos, brew install pkgconf icu4c
does not resolve it
i resolved this issue on macos by switching from pkgconf (github) to pkg-config (freedesktop.org)
As it turns out, pkgconfig is one of many ways to handle this, but is not strictly required. By installing pkgconfig, though, users have to manage their linking for all things compiled from source. There have been a few PR's to address this via docs as well as some updates of the code. I am going to close this, but if the problem persists I will re-open it. The problem isn't really with asdf-postgres as it is with every user using a different version of pkgconfig/brew/openssl, etc. and postgres also making linking changes.
Can confirm that this is still the case on a Mac. Installing pkg-config
solved it. Could we add it to the docs?