LuaJIT on PowerPC Macs?

  • From: Anders Bergh <anders1@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 12 Feb 2013 02:32:02 +0100

Hi,

I was able to build LuaJIT 2.0.0 on my iBook G4 running OS X 10.5.8, there
are two issues:

1. OS X comes with gcc 4.0.1 (default) and 4.2.1, but 4.3+ is required by
LuaJIT for ppc. I commented out the #error.

2. Calling FFI C functions seems to crash:

(gdb) run
Starting program: /Users/anders/LuaJIT-2.0.0/src/luajit
Reading symbols for shared libraries ++. done
LuaJIT 2.0.0 -- Copyright (C) 2005-2012 Mike Pall. http://luajit.org/
JIT: ON fold cse dce fwd dse narrow loop abc sink fuse
> ffi = require 'ffi'
> ffi.cdef[[ int system(const char *); ]]
> =ffi.C.system('echo hi')
hi

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000810c
0x000080c8 in main ()
(gdb)

I understand LuaJIT on PowerPC OS X may not be a priority, I just wanted to
let you know that it almost works.

-- 
Anders Bergh

Other related posts: