LuaJIT 2.0.3 vs Lua 5.2 (original) (raw)

Hi,

I see I have LuaJIT 2.0.3, which seems to be based on Lua 5.1.. while I have Lua 5.2 installed. So, luarocks installs libraries under a 5.2 path, while luajit fails to find them under a 5.1 one.. any hints on how to get around this?
(I just started looking at it, maybe it will work just messing with lib paths..?)

...
lua-capnproto 0.0.1-1 is now built and installed in /usr (license: BSD)
kaos@cypher ~/src/lua-capnproto (master *)
$ make test

Running test/01-sanity.lua...
luajit: test/01-sanity.lua:2: module 'lunitx' not found:
        no field package.preload['lunitx']
        no file '/home/kaos/src/lua-capnproto/lua/lunitx.lua'
        no file '/home/kaos/src/lua-capnproto/proto/lunitx.lua'
        no file '/home/kaos/src/lua-capnproto/../capnp_test/lunitx.lua'
        no file './lunitx.lua'
        no file '/usr/share/luajit-2.0.3/lunitx.lua'
        no file '/usr/local/share/lua/5.1/lunitx.lua'
        no file '/usr/local/share/lua/5.1/lunitx/init.lua'
        no file '/usr/share/lua/5.1/lunitx.lua'
        no file '/usr/share/lua/5.1/lunitx/init.lua'
        no file './lunitx.so'
        no file '/usr/local/lib/lua/5.1/lunitx.so'
        no file '/usr/lib64/lua/5.1/lunitx.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        test/01-sanity.lua:2: in main chunk
        [C]: at 0x00404e90
make: *** [test] Error 1
kaos@cypher ~/src/lua-capnproto (master *)
$ luarocks show lunitx

lunitx 0.7-1 - Lunitx is a unit testing framework for lua, written in lua.

Lunitx is a unit testing framework for lua, written in lua, based heavily on
Lunit 0.5, but modified to work with Lua 5.2. Lunitx provides 27 assert
functions, and a few misc functions for usage in an easy unit testing
framework. Lunit comes with a test suite to test itself. The testsuite consists
of approximately 710 assertions.

License:        MIT/X11
Homepage:       https://github.com/dcurrie/lunit
Installed in:   /usr

Modules:
        lunit (/usr/share/lua/5.2/lunit.lua)
        lunit.console (/usr/share/lua/5.2/lunit/console.lua)
        lunitx (/usr/share/lua/5.2/lunitx.lua)
        lunitx.atexit (/usr/share/lua/5.2/lunitx/atexit.lua)

kaos@cypher ~/src/lua-capnproto (master *)