Created attachment 515820 [details] emerge --info output I've run some tests from dev-lang/lua with luajit-2.0.4 Most tests tried fail: bisect.lua OK cf.lua C -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 F -4 -2 -0 1 3 5 7 9 10 12 C -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 F 14 16 18 19 21 23 25 27 28 30 C 0 1 2 3 4 5 6 7 8 9 F 32 34 36 37 39 41 43 45 46 48 C 10 11 12 13 14 15 16 17 18 19 F 50 52 54 55 57 59 61 63 64 66 C 20 21 22 23 24 25 26 27 28 29 F 68 70 72 73 75 77 79 81 82 84 PANIC: unprotected error in call to Lua API (14) C 30 31 32 33 34 35 # factorial.lua 0! = 1 1! = 1 2! = 2 3! = 6 4! = 24 5! = 120 6! = 720 7! = 5040 8! = 40320 9! = 362880 10! = 3628800 11! = 39916800 12! = 479001600 13! = 6227020800 PANIC: unprotected error in call to Lua API (5) fib.lua n value time evals PANIC: unprotected error in call to Lua API (12) fibfor.lua OK life.lua PANIC: unprotected error in call to Lua API (5) luac.lua PANIC: unprotected error in call to Lua API (/Temp/lua.test/luac.lua:4: usage: lua luac.lua file.lua stack traceback: [C]: in function 'assert' /Temp/lua.test/luac.lua:4: in main chunk [C]: at 0x5595d1b587a0) seive.lua 2 PANIC: unprotected error in call to Lua API (/Temp/lua.test/sieve.lua:17: attempt to call field 'mod' (a nil value)) sort.lua original Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec after quicksort Apr,Aug,Dec,Feb,Jan,Jul,Jun,Mar,May,Nov,Oct,Sep PANIC: unprotected error in call to Lua API (6) ------------------- I've attached the output of emerge --info dev-lang/luajit::gentoo
*** Bug 642032 has been marked as a duplicate of this bug. ***
it turned out that the CFLAGS -fno-unwind-tables -fno-asynchronous-unwind-tables which I had in make.conf break luajit. Without these options, it seems to work just fine.