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

  • From: Vincent Torri <vincent.torri@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 30 Aug 2018 18:27:32 +0200

On Thu, Aug 30, 2018 at 4:26 PM Mike Pall <mikelj-1808@xxxxxxx> wrote:


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.

I am using MSYS2 as environment, which emulates a POSIX system (btw,
MSYS2 derivates from cygwin)

I can give you my hacks to use the 'install' rule of your Makefile if
you are interested to  support MSYS2

Anyway, cross-compiling for a modern Windows system is pretty
hopeless.

i've succeeded :-)

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.

ok, thank you, i'll test the binary

Vincent Torri

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

--Mike


Other related posts: