How to cross compile kakoune?

Hello world!
I need to cross compile kakoune for some old arm based system. I have built crosstool-ng toolchain for required target, but have had hard time to actually compile kakoune code base.
There are several topics about cross compilation, I’ve skimmed over:

Basically all of them says either use configure which is not available in kakoune code base, or pass some obscure parameters to make.

Any C++ experts over there, who can help?
PS: I’m not a C++ programmer.

From looking at the Makefile it looks like you need to set the CXX variable to your cross compiler.
It might also be necessary to set your sysroot.

So, something like

make CXX=arm-linux-gnueabihf-g++ CXXFLAGS=--sysroot=/path/to/sysroot

But in my experience cross-compiling is always a bit tricky, every project is different.

I just tried it for myself, I run into a problem with missing ncurses.h, to solve this there are two solutions:

  1. Install ncurses for your cross-compiler
  2. Try the builtin-terminal-ui branch, which does not depend on ncurses anymore.

Building the builtin-terminal-ui branch using

make CXX=arm-linux-gnueabihf-g++

Works for me

1 Like