Created
August 4, 2019 18:54
-
-
Save burningTyger/073ee3d81c5629fa9373edcdedca4645 to your computer and use it in GitHub Desktop.
sqlite with icu support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in order to have icu support in sqlite you need to enable it via compile options. | |
# install the icu dev package on your system and download the source files from sqlite | |
# unpack and enter the source dir | |
# on a mac I had to do this to compile: | |
brew install icu4c | |
CFLAGS=`-I/usr/local/opt/icu4c/include -O3 -DSQLITE_ENABLE_ICU` CPPFLAGS=`icu-config --cppflags` LDFLAGS=`-L/usr/local/opt/icu4c/lib icu-config --ldflags` ./configure | |
# I had to add the path to the icu libs | |
# on linux the paths were added automatically to path | |
# so this would suffice on . ubuntu and arch where I also compiled: | |
CFLAGS='-O3 -DSQLITE_ENABLE_ICU' CPPFLAGS='icu-config --cppflags' LDFLAGS='icu-config --ldflags' ./configure | |
# then continue with | |
make | |
This will build your sqlite for you | |
# I wanted to use better-sqlite3 with icu so I had to use this: | |
npm i --sqlite3=/path/to/src/ |
ok, feel free to update your findings here. It's always useful to have as much information as possible on this topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks :)
Sadly I need it to customize sqlite build for Android. I can't load an extension at runtime.
I'm not sure, but seems ICU extension is the only way