Re: cross compilation for Windows (mingw-w64) on Linux error when installing luajit

  • From: Mike Pall <mikelj-1808@xxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 30 Aug 2018 16:25:06 +0200

Vincent Torri wrote:

I want to cross-compile luajit on Fedore, targetting Windows (I use
the mingw-w64 toolchain).

luajit is compiled and I see in src/ the files luajit.exe and lua51.dll

but when installing i get this error :
cd src && install -m 0755 luajit /home/vtorri/luajit/bin/luajit-2.0.5
install: impossible d'évaluer 'luajit': Aucun fichier ou dossier de ce type

The Makefile install targets only works for POSIX systems. Amongst
other problems, there's no standard install location for Windows.
Just follow the install instructions in the docs.

Anyway, cross-compiling for a modern Windows system is pretty
hopeless. First, check that the cross-compiled binary actually
works, in particular error handling (*). Second, to run on other
Windows installation you need to distribute and install various
other libraries provided by MinGW, which can get hairy.

(*) luajit -e "error('test')" should print an error, but not crash.

--Mike

Other related posts: