5

Whats the best procedure to cross compile lua and libs (luasockets, orbit, etc) for an embedded arm device.

Im able to succesfully cross compile lua interpreter, but from there im a little bit lost.

gipsh
  • 578
  • 1
  • 3
  • 20
  • Is the question here "How do I cross-compile lua?" or is it "How do I cross-compile at all?" Have you tried anything? Have you cross-compiled anything else? – Etan Reisner Mar 31 '16 at 13:26
  • i cross compiled lua interpreter but then i need to cross-compile luasocket, which has c code and lua code, so i think i should have a lua interpreter in the host machine also. Im looking for an easy way to cross compile a basic lua enviroment like https://github.com/keplerproject/kepler – gipsh Mar 31 '16 at 14:02
  • You don't need to cross-compile lua code. If that's what you were thinking about. Cross-compiling the C part should be enough. Did you try it? – Etan Reisner Mar 31 '16 at 14:36

1 Answers1

0

I started using this repo as a base some years ago: https://github.com/johnhw/luajitpi

The whole process depends on what OS your device is running and how POSIX-ish it is. If your system provides a BSD-like-socket API the process should be trivial.

The same applies for pthreads and other APIs your OS should provide. We're running eCos for example, which has a small POSIX layer so the porting of libs like luasocket was easy.

sneusse
  • 1,422
  • 1
  • 10
  • 18