Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compiling to Windows #544

Open
wintersteiger opened this issue Jul 6, 2018 · 1 comment
Open

Cross-compiling to Windows #544

wintersteiger opened this issue Jul 6, 2018 · 1 comment

Comments

@wintersteiger
Copy link

wintersteiger commented Jul 6, 2018

My Windows-Emacs (26) and Flyspell told me that they want aspell 0.60 or up, so I attempted to compile my own as there is no recent binary package available. I use WSL (Windows Subsystem for Linux, Ubuntu on Windows), but this should work just as well on any Linux that has the MinGW cross-compiler in its package system. I needed one source change to make this work; in common/file_util.cpp add #include "common/asc_ctype.hpp", which I believe may be necessary on some other platforms as well?

Then:

sudo apt-get install mingw-w64 
./autogen
sed -i 's/#define PACKAGE_VERSION \".*\"/#define PACKAGE_VERSION "0.60.1"/' gen/settings.h
sed -i 's/#define VERSION \".*\"/#define VERSION "0.60.1"/' gen/settings.h
sed -i 's/#define USE_POSIX_MUTEX/\/\/#define USE_POSIX_MUTEX/' gen/settings.h
LDFLAGS="--static" ./configure --host=x86_64-w64-mingw32 --prefix $PWD/win32-install --enable-32-bit-hash-fun --enable-static --disable-shared
make
make install

This produces a working aspell.exe in ./win32-install/bin. The default configuration uses non-Windows directory strings, so a custom .aspell.conf is necessary.

I use the Linux-native binaries to compile/install dictionaries for now as I couldn't find any scripts/Makefiles that would work on Windows. Are there any existing scripts that work on Windows?

@kevina
Copy link
Member

kevina commented Oct 17, 2019

Related p.r. #585.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants