Nightcrawler
Nightcrawler

Reputation: 46

Compiling and linking SQLCipher (SQLite) properly with ICU extension enabled

I'm trying to build SQLCipher from source and link it to another project as a static library.

The configuration I use (mostly according to this topic). I obtain all necessary flags by executing "icu-package" command.

./configure --enable-tempstore=yes \
CFLAGS="-O3 -DSQLITE_ENABLE_ICU -DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2" \
LDFLAGS="-lcrypto -licuio -licui18n -licuuc -licudata" \
CPPFLAGS="-I/usr/include" && make

However, linking "sqlite3.o" fails. The following output provided

ld: libs/sqlite3.o: in function `icuLikeCompare':
sqlite3.c:(.text+0x7a5a): undefined reference to `u_foldCase_74'
/usr/bin/ld: sqlite3.c:(.text+0x7a66): undefined reference to `u_foldCase_74'
/usr/bin/ld: libs/sqlite3.o: in function `icuCollationColl':
sqlite3.c:(.text+0x7b45): undefined reference to `ucol_strcoll_74'
/usr/bin/ld: libs/sqlite3.o: in function `icuRegexpFunc':
sqlite3.c:(.text+0x45f36): undefined reference to `uregex_setText_74'
/usr/bin/ld: sqlite3.c:(.text+0x45f4b): undefined reference to `uregex_matches_74'
/usr/bin/ld: sqlite3.c:(.text+0x45f68): undefined reference to `uregex_setText_74'
/usr/bin/ld: sqlite3.c:(.text+0x45fc1): undefined reference to `u_errorName_74'
/usr/bin/ld: sqlite3.c:(.text+0x46084): undefined reference to `uregex_open_74'
/usr/bin/ld: sqlite3.c:(.text+0x460a6): undefined reference to `u_errorName_74'
/usr/bin/ld: sqlite3.c:(.text+0x460d1): undefined reference to `u_errorName_74'
/usr/bin/ld: sqlite3.c:(.text+0x461df): undefined reference to `uregex_close_74'
/usr/bin/ld: libs/sqlite3.o: in function `icuLoadCollation':
sqlite3.c:(.text+0x6a13f): undefined reference to `ucol_open_74'
/usr/bin/ld: sqlite3.c:(.text+0x6a211): undefined reference to `u_errorName_74'
/usr/bin/ld: sqlite3.c:(.text+0x6a297): undefined reference to `ucol_close_74'
/usr/bin/ld: libs/sqlite3.o: in function `icuCaseFunc16':
sqlite3.c:(.text+0x8433d): undefined reference to `u_strToUpper_74'
/usr/bin/ld: sqlite3.c:(.text+0x8437a): undefined reference to `u_errorName_74'
/usr/bin/ld: sqlite3.c:(.text+0x844f1): undefined reference to `u_strToLower_74'
/usr/bin/ld: libs/sqlite3.o: in function `icuRegexpDelete':
sqlite3.c:(.text+0x7b01): undefined reference to `uregex_close_74'
/usr/bin/ld: libs/sqlite3.o: in function `icuCollationDel':
sqlite3.c:(.text+0x7b11): undefined reference to `ucol_close_74'

What am I missing?

Upvotes: 0

Views: 122

Answers (0)

Related Questions