Sample Header Ad - 728x90

Error Building PostgreSQL from Source: Undefined ICU References During make world-bin

0 votes
0 answers
247 views
I am trying to build PostgreSQL from source on my Linux machine but am encountering errors related to ICU during the make world-bin process. Below are the details of what I've done so far: ### Steps Taken:
sudo yum install libicu-devel

git clone git://git.postgresql.org/git/postgresql.git
./configure --enable-tap-tests --prefix=pwd/build
make world-bin
### Issues During the make world-bin process, I encountered the following error messages indicating undefined references to ICU functions:
/usr/bin/ld: pg_locale.c:(.text+0x1701): undefined reference to `ucol_getRules_73'
/usr/bin/ld: pg_locale.c:(.text+0x1724): undefined reference to `u_strlen_73'
/usr/bin/ld: pg_locale.c:(.text+0x1739): undefined reference to `u_strlen_73'
/usr/bin/ld: pg_locale.c:(.text+0x1757): undefined reference to `u_strcpy_73'
/usr/bin/ld: pg_locale.c:(.text+0x1764): undefined reference to `u_strcat_73'
... (more similar errors)
collect2: error: ld returned 1 exit status
make: *** [Makefile:67: postgres] Error 1
I have ICU version 73.1 installed and confirmed with:
icu-config --version
My ~/.zshrc file includes the following configurations:
export LDFLAGS="-L/usr/lib64"
export CPPFLAGS="-I/usr/include"
export PATH="/usr/lib64/icu:$PATH"
export PKG_CONFIG_PATH="/usr/lib64/pkgconfig/"
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
I have also sourced the .zshrc file after making these changes. What might be causing these ICU-related errors, and how can I resolve them to successfully build PostgreSQL?
Asked by Ayush Vatsa (55 rep)
Sep 21, 2024, 09:33 AM