Обсуждение: ICU is not supported in this build. install from source code.

Поиск
Список
Период
Сортировка

ICU is not supported in this build. install from source code.

От
jian he
Дата:

Install from source code(follow the manual)
system version:  Ubuntu 22.04 LTS
pg version:  PostgreSQL 15beta2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, 64-bit

install step:
./configure --with-perl --with-python  --with-icu ICU_CFLAGS='-I/usr/include/unicode'  ICU_LIBS='-L/usr/lib/icu' --enable-debug --with-pgport=5439
make world
sudo su
make install world
mkdir -p /usr/local/pgsql/data
chown jian  /usr/local/pgsql/data
su - jian
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

I installed ICU4C 71.1package.
use /usr/bin/icuinfo  return
<icuSystemParams type="icu4c">
    <param name="copyright"> Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html </param>
    <param name="product">icu4c</param>
    <param name="product.full">International Components for Unicode for C/C++</param>
    <param name="version">71.1</param>
    <param name="version.unicode">14.0</param>
    <param name="platform.number">4000</param>
    <param name="platform.type">Linux</param>
    <param name="locale.default">en_US</param>
    <param name="locale.default.bcp47">en-US</param>
    <param name="converter.default">UTF-8</param>
    <param name="icudata.name">icudt71l</param>
    <param name="icudata.path"></param>
    <param name="cldr.version">41.0</param>
    <param name="tz.version">2022a</param>
    <param name="tz.default">Asia/Kolkata</param>
    <param name="cpu.bits">64</param>
    <param name="cpu.big_endian">0</param>
    <param name="os.wchar_width">4</param>
    <param name="os.charset_family">0</param>
    <param name="os.host">x86_64-pc-linux-gnu</param>
    <param name="build.build">x86_64-pc-linux-gnu</param>
    <param name="build.cc">gcc</param>
    <param name="build.cxx">g++</param>
    <param name="uconfig.internal_digitlist">1</param>
    <param name="uconfig.have_parseallinput">1</param>
 </icuSystemParams>


ICU Initialization returned: U_ZERO_ERROR 
Plugins are disabled.
 
But now I cannot ICU. when I create an collation related to ICU then
ERROR:  ICU is not supported in this build


--
 I recommend David Deutsch's <<The Beginning of Infinity>>

  Jian


Re: ICU is not supported in this build. install from source code.

От
jian he
Дата:

Then I try to install the latest from the latest source code.

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

./configure.status return

config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: src/include/pg_config.h is unchanged
config.status: creating src/include/pg_config_ext.h
config.status: src/include/pg_config_ext.h is unchanged
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: src/interfaces/ecpg/include/ecpg_config.h is unchanged
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.linux to src/Makefile.port

then make world
the following is make world error:

/usr/bin/ld: access/hash/hashfunc.o: in function `hashtext':
/home/jian/Desktop/pg16_source/postgresql/src/backend/access/hash/hashfunc.c:301: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/access/hash/hashfunc.c:304: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: access/hash/hashfunc.o: in function `hashtextextended':
/home/jian/Desktop/pg16_source/postgresql/src/backend/access/hash/hashfunc.c:358: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/access/hash/hashfunc.c:361: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: commands/collationcmds.o: in function `pg_import_system_collations':
/home/jian/Desktop/pg16_source/postgresql/src/backend/commands/collationcmds.c:786: undefined reference to `uloc_getAvailable_70'
/usr/bin/ld: commands/collationcmds.o: in function `get_icu_language_tag':
/home/jian/Desktop/pg16_source/postgresql/src/backend/commands/collationcmds.c:529: undefined reference to `uloc_toLanguageTag_70'
/usr/bin/ld: commands/collationcmds.o: in function `pg_import_system_collations':
/home/jian/Desktop/pg16_source/postgresql/src/backend/commands/collationcmds.c:775: undefined reference to `uloc_countAvailable_70'
/usr/bin/ld: commands/collationcmds.o: in function `get_icu_locale_comment':
/home/jian/Desktop/pg16_source/postgresql/src/backend/commands/collationcmds.c:554: undefined reference to `uloc_getDisplayName_70'
/usr/bin/ld: commands/collationcmds.o: in function `get_icu_language_tag':
/home/jian/Desktop/pg16_source/postgresql/src/backend/commands/collationcmds.c:531: undefined reference to `u_errorName_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_isalpha':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:356: undefined reference to `u_isalpha_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_isspace':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:617: undefined reference to `u_isspace_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_isdigit':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:320: undefined reference to `u_isdigit_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_isalnum':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:392: undefined reference to `u_isalnum_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_isgraph':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:509: undefined reference to `u_isgraph_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_isupper':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:437: undefined reference to `u_isupper_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_islower':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:473: undefined reference to `u_islower_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_ispunct':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:581: undefined reference to `u_ispunct_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_isprint':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:545: undefined reference to `u_isprint_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_tolower':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:705: undefined reference to `u_tolower_70'
/usr/bin/ld: regex/regcomp.o: in function `pg_wc_toupper':
/home/jian/Desktop/pg16_source/postgresql/src/backend/regex/regc_pg_locale.c:661: undefined reference to `u_toupper_70'
/usr/bin/ld: utils/adt/formatting.o: in function `u_strToTitle_default_BI':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/formatting.c:1631: undefined reference to `u_strToTitle_70'
/usr/bin/ld: utils/adt/formatting.o: in function `str_tolower':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/formatting.c:1700: undefined reference to `u_strToLower_70'
/usr/bin/ld: utils/adt/formatting.o: in function `str_toupper':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/formatting.c:1822: undefined reference to `u_strToUpper_70'
/usr/bin/ld: utils/adt/formatting.o: in function `icu_convert_case':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/formatting.c:1620: undefined reference to `u_errorName_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `init_icu_converter':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1748: undefined reference to `ucnv_open_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `make_icu_collator':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1399: undefined reference to `ucol_open_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `get_collation_actual_version':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1647: undefined reference to `ucol_open_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1652: undefined reference to `ucol_getVersion_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1653: undefined reference to `ucol_close_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1655: undefined reference to `u_versionToString_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `icu_to_uchar':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1778: undefined reference to `ucnv_toUChars_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1787: undefined reference to `ucnv_toUChars_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `icu_from_uchar':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1816: undefined reference to `ucnv_fromUChars_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1826: undefined reference to `ucnv_fromUChars_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `check_icu_locale':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1948: undefined reference to `ucol_open_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1956: undefined reference to `ucol_close_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `init_icu_converter':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1750: undefined reference to `u_errorName_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `make_icu_collator':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1401: undefined reference to `u_errorName_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `get_collation_actual_version':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1649: undefined reference to `u_errorName_70'
/usr/bin/ld: utils/adt/pg_locale.o: in function `icu_to_uchar':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1790: undefined reference to `u_errorName_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1781: undefined reference to `u_errorName_70'
/usr/bin/ld: utils/adt/pg_locale.o:/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/pg_locale.c:1829: more undefined references to `u_errorName_70' follow
/usr/bin/ld: utils/adt/varchar.o: in function `hashbpchar':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varchar.c:1028: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varchar.c:1031: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: utils/adt/varchar.o: in function `hashbpcharextended':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varchar.c:1089: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varchar.c:1092: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: utils/adt/varlena.o: in function `varstr_abbrev_convert':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:2589: undefined reference to `ucol_getSortKey_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:2574: undefined reference to `uiter_setUTF8_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:2577: undefined reference to `ucol_nextSortKeyPart_70'
/usr/bin/ld: utils/adt/varlena.o: in function `varstrfastcmp_locale':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:2411: undefined reference to `ucol_strcoll_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:2392: undefined reference to `ucol_strcollUTF8_70'
/usr/bin/ld: utils/adt/varlena.o: in function `varstr_cmp':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:1688: undefined reference to `ucol_strcoll_70'
/usr/bin/ld: /home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:1669: undefined reference to `ucol_strcollUTF8_70'
/usr/bin/ld: utils/adt/varlena.o: in function `varstr_abbrev_convert':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:2584: undefined reference to `u_errorName_70'
/usr/bin/ld: utils/adt/varlena.o: in function `varstrfastcmp_locale':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:2397: undefined reference to `u_errorName_70'
/usr/bin/ld: utils/adt/varlena.o: in function `varstr_cmp':
/home/jian/Desktop/pg16_source/postgresql/src/backend/utils/adt/varlena.c:1674: undefined reference to `u_errorName_70'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:66: postgres] Error 1
make[2]: Leaving directory '/home/jian/Desktop/pg16_source/postgresql/src/backend'
make[1]: *** [Makefile:42: all-backend-recurse] Error 2
make[1]: Leaving directory '/home/jian/Desktop/pg16_source/postgresql/src'
make: *** [GNUmakefile:16: world-src-recurse] Error 2

So now postgresql does not support ICU version 71?

On Tue, Aug 2, 2022 at 8:08 PM jian he <jian.universality@gmail.com> wrote:

Install from source code(follow the manual)
system version:  Ubuntu 22.04 LTS
pg version:  PostgreSQL 15beta2 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0, 64-bit

install step:
./configure --with-perl --with-python  --with-icu ICU_CFLAGS='-I/usr/include/unicode'  ICU_LIBS='-L/usr/lib/icu' --enable-debug --with-pgport=5439
make world
sudo su
make install world
mkdir -p /usr/local/pgsql/data
chown jian  /usr/local/pgsql/data
su - jian
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

I installed ICU4C 71.1package.
use /usr/bin/icuinfo  return
<icuSystemParams type="icu4c">
    <param name="copyright"> Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html </param>
    <param name="product">icu4c</param>
    <param name="product.full">International Components for Unicode for C/C++</param>
    <param name="version">71.1</param>
    <param name="version.unicode">14.0</param>
    <param name="platform.number">4000</param>
    <param name="platform.type">Linux</param>
    <param name="locale.default">en_US</param>
    <param name="locale.default.bcp47">en-US</param>
    <param name="converter.default">UTF-8</param>
    <param name="icudata.name">icudt71l</param>
    <param name="icudata.path"></param>
    <param name="cldr.version">41.0</param>
    <param name="tz.version">2022a</param>
    <param name="tz.default">Asia/Kolkata</param>
    <param name="cpu.bits">64</param>
    <param name="cpu.big_endian">0</param>
    <param name="os.wchar_width">4</param>
    <param name="os.charset_family">0</param>
    <param name="os.host">x86_64-pc-linux-gnu</param>
    <param name="build.build">x86_64-pc-linux-gnu</param>
    <param name="build.cc">gcc</param>
    <param name="build.cxx">g++</param>
    <param name="uconfig.internal_digitlist">1</param>
    <param name="uconfig.have_parseallinput">1</param>
 </icuSystemParams>


ICU Initialization returned: U_ZERO_ERROR 
Plugins are disabled.
 
But now I cannot ICU. when I create an collation related to ICU then
ERROR:  ICU is not supported in this build


--
 I recommend David Deutsch's <<The Beginning of Infinity>>

  Jian




--
 I recommend David Deutsch's <<The Beginning of Infinity>>

  Jian


Re: ICU is not supported in this build. install from source code.

От
"Daniel Verite"
Дата:
    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