Port ocl from Lua5.1 to Luagit-2.0
Submitted by federicom.rossi on Tue, 2015-04-21 09:10 |
Dear list,
I would like to share my experience, it may be useful to someone :)
Because of bug http://bugs.orocos.org/show_bug.cgi?id=1039 and because
the Lua native compiler can't run Microblx, I ported the Lua component
of the OCL from Lua 5.1 to Luajit 2.0.
With this (elegant in my opinion) workaround it is possible to compile
rttlua on moderns distributions (eg Fedora 21 repositories does not keep
Lua51 anymore!) and it is possible to load Microblx nodes inside Orocos
(native lua does not support ffi).
The changes can be found at https://github.com/fmr42/ocl/ on branch
"luajit". I didn't perform much testing but everything should work
straightforward. Most of the changes regards headers files and
CMakeFile's. Luajit fully supports Lua51.
Luajit vs Lua native interpreter have pros and cons, Google finds many
discussions about that. If someone is interested I can upload my
solution to load Microblx nodes and to init/start/stop/cleanup blocks in
a rFSM state machine on top of Orocos.
Federico