lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Vespe Savikko <vespe.savikko@iki.fi> [12-09-21 18:21]:
> Hi,
> 
> I have encountered a weird problem when
> trying to get Lua 5.1.4 and LPeg 0.10.2 working
> in a target device with ARM architecture.
> 
> The cross-compilation in the desktop Linux
> does not seem to have any particular issues,
> but when running Lua in the target, something
> odd happens:
> 
> # lua -l re
> lua: /usr/share/lua/5.1/re.lua:105: loop body may accept empty string
> stack traceback:
>        [C]: ?
>        /usr/share/lua/5.1/re.lua:105: in main chunk
>        [C]: ?
>        [C]: ?
> 
> where line 105 is:
> local S = (m.S(" \f\n\r\t\v") + "--" * (any - Predef.nl)^0)^0
> 
> Also, LPeg’s own test set crashes between asserts:
> 
> # lua l/lpeg-test.lua
> General tests for LPeg library
> version 0.10
> lua: l/lpeg-test.lua:123: bad argument #2 to '?' (number expected, got
> userdata)
> stack traceback:
> 
>        [C]: ?
>        l/lpeg-test.lua:123: in main chunk
>        [C]: ?
> 
> where line 123 is:
> word = alpha^1 * (1 - alpha)^0
> 
> I am pretty sure that the problem is not within Lua or LPeg per se,
> since we have gotten Lua working on ARM architecture (PandaBoard)
> earlier. Also, other Lua libraries seem to work (e.g., LuaSocket).
> Unfortunately, our current target has very limited
> debugging support, so the hunting for the root cause is quite slow.
> 
> Has anybody encountered similar problems or has any
> helpful hints?
> 
> Thanks and take care.
> 
>   ++Vespe


Hi Vespe,

It may be, that your cross compiling toolchain is including header
files from the hosting system and get therefore wrong informations
about data sizes and such.

Jaust a shot in the dark...

Good luck!
Best regards,
mcc