-
Hi all, I am currently trying to cross-compile nvim to a not (yet) supported OS. So far I have been successful in compiling all of nvims build dependencies(libuv, luv, etc.). But unfortunately the main build of the nvim binary is failing for me and I am not sure if there is a solution to my issue. I had to find out, that nvim uses lua to generate header/source files during the build process. If I specify the lua binary of my target architecture, then the build process fails, because on my host system I can't execute the target lua binary to generate the source files. If I specify the lua binary of my host system, the build also fails because the host lua binary is trying to load libnlua.so (?) with the src/nvim/generators/preload.lua, which as far as I can tell is built during the build process and is therefore only compatible with my target architecture. The build fails, because my host lua binary can't load the shared object file that's been built for my target architecture... Does anyone who is familiar with the build process of nvim have any suggestions on how to approach this issue or is it just not (easily) possible to cross-compile nvim? Thanks for any suggestions |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Unfortunately, there's no support from cross-compiling Nvim at all (for pretty much the reason you've noticed). Your best bet is to build Nvim in a container for the target architecture. |
Beta Was this translation helpful? Give feedback.
-
I was able to cross-compile Nvim relatively easily by first building a copy with the host toolchain, and then setting The steps are essentially as follows:
I think supporting cross-compilation could be implemented by just replacing instances of |
Beta Was this translation helpful? Give feedback.
Unfortunately, there's no support from cross-compiling Nvim at all (for pretty much the reason you've noticed).
Your best bet is to build Nvim in a container for the target architecture.