RE: Support for MinGW x64?

  • From: Keith Mitchell <Keith.Mitchell@xxxxxxx>
  • To: "luajit@xxxxxxxxxxxxx" <luajit@xxxxxxxxxxxxx>
  • Date: Thu, 30 Aug 2018 23:09:58 +0000

My problem does indeed appear to be a issue with CLion's build environment. 
I've tested various things including running the Makefile CLion generated using 
CMake manually from both the command prompt and from MSYS2, and in all the 
cases it built LuaJIT perfectly fine. It's only failing when the Makefile is 
being ran from within CLion's build environment. 

I'm at a bit of a loss as to what could be different though, I enabled verbose 
output for my makefile and the output from the failed build in CLion's console 
matched up with the output from running the Makefile manually. 

-----Original Message-----
From: luajit-bounce@xxxxxxxxxxxxx <luajit-bounce@xxxxxxxxxxxxx> On Behalf Of 
Keith Mitchell
Sent: Thursday, August 30, 2018 3:15 PM
To: luajit@xxxxxxxxxxxxx
Subject: RE: Support for MinGW x64?

Someone might want to add it to the compatibility matrix in that case ;)

I've been having strange behavior trying to build LuaJIT 2.0.5 using mingw-w64 
installed via MSYS2, if I try to build it using CLion I get a load of errors 
like this:

```
"==== Building LuaJIT 2.0.5 ===="
process_begin: CreateProcess(NULL, uname -s, ...) failed.
mingw32-make[5]: Makefile:163: pipe: No error The system cannot find the path 
specified.
"HOSTCC    host/minilua.o"
"HOSTCC    host/buildvm_asm.o"
"HOSTCC    host/buildvm_peobj.o"
"HOSTCC    host/buildvm_lib.o"
"HOSTCC    host/buildvm_fold.o"
"CC        lj_gc.o"
"CC        lj_char.o"
"CC        lj_obj.o"

...

"CC        lib_init.o"
"CC        luajit.o"
"HOSTLINK  host/minilua"
"DYNASM    host/buildvm_arch.h"
"HOSTCC    host/buildvm.o"
In file included from host/buildvm.c:73:
vm_x86.dasc: In function 'build_subroutines':
vm_x86.dasc:3868:3: warning: index 5 denotes an offset greater than size of 
'GPRArg[4]' {aka 'long long int[4]'} [-Warray-bounds]
   |  movaps xmm5, CCSTATE->fpr[5]
   ^~~~~~~~
In file included from host/buildvm.c:73:
vm_x86.dasc:3912:3: warning: index 5 denotes an offset greater than size of 
'FPRArg[4]' {aka 'union FPRArg[4]'} [-Warray-bounds]  }
   ^       
vm_x86.dasc:3912:3: warning: index 6 denotes an offset greater than size of 
'FPRArg[4]' {aka 'union FPRArg[4]'} [-Warray-bounds]
vm_x86.dasc:3912:3: warning: index 7 denotes an offset greater than size of 
'FPRArg[4]' {aka 'union FPRArg[4]'} [-Warray-bounds] "HOSTLINK  host/buildvm"
"BUILDVM   lj_vm.s"

"ASM       lj_vm.o"
"CC        lj_err.o"
lj_vm.s: Assembler messages:
lj_vm.s:6: Error: unknown pseudo-op: `.hidden'
lj_vm.s:7: Warning: .type pseudo-op used outside of .def/.endef: ignored.
lj_vm.s:7: Error: junk at end of line, first unrecognized character is `l'
lj_vm.s:8: Warning: .size pseudo-op used outside of .def/.endef: ignored.
lj_vm.s:8: Error: junk at end of line, first unrecognized character is `l'
lj_vm.s:13: Error: unknown pseudo-op: `.hidden'
lj_vm.s:14: Warning: .type pseudo-op used outside of .def/.endef: ignored.
lj_vm.s:14: Error: junk at end of line, first unrecognized character is `l'
lj_vm.s:15: Warning: .size pseudo-op used outside of .def/.endef: ignored.
lj_vm.s:15: Error: junk at end of line, first unrecognized character is `l'
...
mingw32-make[5]: *** [Makefile:656: lj_vm.o] Error 1 ```

However I just tried building it by running mingw32-make from powershell and it 
builds completely fine. 

My guess is CLion may be adding flags when running make that are incompatible 
with LuaJIT.

-----Original Message-----
From: luajit-bounce@xxxxxxxxxxxxx <luajit-bounce@xxxxxxxxxxxxx> On Behalf Of 
Shmuel Zeigerman
Sent: Thursday, August 30, 2018 3:02 PM
To: luajit@xxxxxxxxxxxxx
Subject: Re: Support for MinGW x64?

On 31/08/2018 00:50, Keith Mitchell wrote:


I’ve noticed that MinGW x64 is not on the compatibility matrix and 
that there where some discussions about it back in 2011.

I’m wondering if it would be possible to get build support added for 
it now for LuaJIT?




We have been using MinGW x64 LuaJIT 2.0 and 2.1 builds for 5 years already and 
have no issues with it.
We use the Makefile included in the LuaJIT distribution, without modifications.

--
Shmuel


Other related posts: