Skip to content

Instantly share code, notes, and snippets.

@emirotin
Last active March 29, 2019 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emirotin/60bd3fb245b96e9fb1dd5069457c7991 to your computer and use it in GitHub Desktop.
Save emirotin/60bd3fb245b96e9fb1dd5069457c7991 to your computer and use it in GitHub Desktop.
Build fts5-stemmer on Windows

Using fresh Win7 32bit

  • install git using the official installer https://git-scm.com/download/win
  • install Msys2 http://www.msys2.org/
  • open Msys bash, run pacman -Syu, then close the bash window
  • open again, run pacman -Su
  • open git bash, run ssh-keygen -t rsa -b 4096
  • copy the key, add to GitHub
  • from the git bash cd /c/Users/<your username>
  • git clone --recursive git@github.com:abiliojr/fts5-snowball.git
  • close git bash, open msys bash, cd /c/Users/<your username>/fts5-snowball
  • pacman -S gcc libsqlite-devel make pkg-config perl mingw-w64-i686-toolchain
  • open the project sources, edit Makefile: cange cc to $(CC)
  • run CC=gcc make
  • mv fts5stemmer.so fts5stemmer.dll
  • use https://www.nirsoft.net/utils/dll_export_viewer.html to inspect the DLL exports
  • use https://sqlitebrowser.org/ to validate the DLL is usable outside of the Msys/MinGW environment

Built 32-bit DLL: https://www.dropbox.com/s/nwgdycysyj6fknu/fts5stemmer.zip?dl=0

To build the DLL on a 64-bit Windows:

  • use 64-bit MinGW shell
  • use mingw-w64-x86_64-toolchain instead of the i686 version

Built 64-bit DLL: https://www.dropbox.com/s/4u6yfwd8psucsom/fts5stemmer_x64.zip?dl=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment