lua-users home
lua-l archive

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


I'm sure this is a stupid error by me:

'uname -rims'
Linux 2.6.38.6-spott-00007-ga63b23c i686 AuthenticAMD

LuaJIT built by:

 1061  110516-21:20 make linux_rl
 1062  110516-21:22 make INSTALL_TOP=/opt/luajit/1.1.7 install

no errors here.

 1068  110516-21:26 symlink.sh -s /opt/luajit/1.1.7/ -t /usr/local/ create do
 1069  110516-21:26 make test

But:

 /src/bulk/language/programming/lua/luajit/LuaJIT-1.1.7
 0 4 # luajit-1.1.7
 sourced: '/root/.luarc'
 Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
 LuaJIT 1.1.7  Copyright (C) 2005-2011 Mike Pall, http://luajit.org/
 > bit = require("bit")
 stdin:1: module 'bit' not found:
         no field package.preload['bit']
         no file './bit.lua'
         no file '/usr/local/share/lua/5.1/bit.lua'
         no file '/usr/local/share/lua/5.1/bit/init.lua'
         no file '/usr/local/lib/lua/5.1/bit.lua'
         no file '/usr/local/lib/lua/5.1/bit/init.lua'
         no file './bit.so'
         no file '/usr/local/lib/lua/5.1/bit.so'
         no file '/usr/local/lib/lua/5.1/loadall.so'
 stack traceback:
         [C]: in function 'require'
         stdin:1: in main chunk
         [C]: ?

The same happens with the distribution supplied LuaJIT, which is at
version 1.1.6.

There's one Lua related environment variable:

 LUA_INIT=@/root/.luarc

and .luarc contains only:

 0 4 # tv /root/.luarc
 -- /root/.luarc _date: 20101226-2152_
 -- vim: set filetype=lua ts=4:
 -- -*- mode: lua; -*-
 --
 -- sourced after:
 -- export LUA_INIT="@${HOME:-/root}/.luarc"
 print("sourced: '/root/.luarc'")

The documentation states that the bitops are builtin and there's no
module to load, but even when I don't "require()" it, "bit" is nil.

What am I doing wrong?


clemens