The ICU extension (as in icu.c) does not contain the tokenizer ... it only contains the extension functions ... (upper / lower / etc)
Looking in the amalgamation it appears that the icu tokenizer module is defined in fts3_icu.c I have no idea how you load a tokenizer module as part of a loadable extension, or even if that is supported at all (or specifically in the case of icu). Generally speaking I think you just compile the amalgamation (or the full source tree) with SQLITE_ENABLE_ICU defined to use icu. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of ?? >Sent: Thursday, 18 October, 2018 02:56 >To: SQLite mailing list >Subject: Re: [sqlite] Error: dlsym(0x7fa073e02c60, >sqlite3_sqliteicu_init): symbol not found > >Hi, > >Thanks for your reply. I change module name to libicu.so as you said >then got Error: unknown tokenizer: icu > > >sqlite> .load libicu.so >sqlite> CREATE VIRTUAL TABLE zh_text USING fts4(text, tokenize=icu >zh_CN); >Error: unknown tokenizer: icu > > >Why is that ? Is the whole point to build icu extension to get the >icu tokenizer ? > > >BTW I have build an icu sqlite version from amalgamation but this >time I need to icu extension only. > > >Thanks > > >Qiulang > >At 2018-10-18 12:48:51, "Keith Medcalf" <kmedc...@dessus.com> wrote: >> >>The symbol name is sqlite3_icu_init. When you load module lib<x>.so >the symbol sqlite3_<x>_init is called. You need to either (a) rename >the shared library to the correct name (libicu.so) or pass the name >of the init function (sqlite3_icu_init) to the loader when you load >the module, or (c) change the name of the sqlite3_icu_init function >in the icu.c source so that it matches the name that the module >loader is looking for ... >> >>(If you are building your own library from the amalgamation source >you can just compile the amalgamation with the SQLITE_ENABLE_ICU >symbol defined ...) >> >>--- >>The fact that there's a Highway to Hell but only a Stairway to >Heaven says a lot about anticipated traffic volume. >> >>>-----Original Message----- >>>From: sqlite-users [mailto:sqlite-users- >>>boun...@mailinglists.sqlite.org] On Behalf Of ?? >>>Sent: Wednesday, 17 October, 2018 22:26 >>>To: sqlite-users@mailinglists.sqlite.org >>>Subject: [sqlite] Error: dlsym(0x7fa073e02c60, >>>sqlite3_sqliteicu_init): symbol not found >>> >>>I had thought I succeeded in building ICU extension because running >>>gcc -shared icu.c `icu-config --ldflags` -o libSqliteIcu.so >succeeded >>>and libSqliteIcu.so was generated. >>>But when I load it I got error Error: dlsym(0x7fa073e02c60, >>>sqlite3_sqliteicu_init): symbol not found >>> >>> >>>How do I solve that ? I am using mac 10.13 & sqlite 3.24 btw. >>> >>> >>>Thanks >>> >>> >>>Qiulang >>>_______________________________________________ >>>sqlite-users mailing list >>>sqlite-users@mailinglists.sqlite.org >>>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite- >users >> >> >> >>_______________________________________________ >>sqlite-users mailing list >>sqlite-users@mailinglists.sqlite.org >>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users