"Invalid contol char" error loading lfs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

"Invalid contol char" error loading lfs

Robert Hibberdine
Hi all,

I have installed Lua 5.0 on my small Linux system. The core stuff works fine. I am now trying to use the "luafilesystem" package from the Kepler project. I have compiled it and placed it on my system without problems. When I run the test program that comes with lfs I get the following error:

/bin/lua: /usr/local/lib/lua/compat-5.1.lua:113: error loading module `lfs' (/usr/local/lib/lfs.so:1: invalid control char near `char(127)')
stack traceback:
       [C]: in function `error'
       /usr/local/lib/lua/compat-5.1.lua:113: in function `loader'
/usr/local/lib/lua/compat-5.1.lua:189: in function </usr/local/lib/lua/compat-5.1.lua:185>
       /usr/local/lib/lua/compat-5.1.lua:213: in function `require'
       /tmp/test.lua:7: in main chunk
       [C]: ?


I've had a look at the archives and have seen something about null characters not being permitted in files but that was for lua v4.....

Does anyone have any ideas?

Thanks in advance

Bob

Reply | Threaded
Open this post in threaded view
|

Re: "Invalid contol char" error loading lfs

Tomas-14
	Hi

I have installed Lua 5.0 on my small Linux system. The core stuff works fine. I am now trying to use the "luafilesystem" package from the Kepler project. I have compiled it and placed it on my system without problems. When I run the test program that comes with lfs I get the following error:

/bin/lua: /usr/local/lib/lua/compat-5.1.lua:113: error loading module `lfs' (/usr/local/lib/lfs.so:1: invalid control char near `char(127)')
	The error message "error loading module `??'" is produced by
the loader which is called by `require'.  The message "invalid control..."
is produced by Lua's lexer.  It seems you're trying to load a binary
library (lfs.so) as a Lua library.  Check your package.path and package.cpath
in compat-5.1.lua.

	Tomas

Reply | Threaded
Open this post in threaded view
|

Re: "Invalid contol char" error loading lfs

Robert Hibberdine
Tomas wrote:

    Hi

I have installed Lua 5.0 on my small Linux system. The core stuff works fine. I am now trying to use the "luafilesystem" package from the Kepler project. I have compiled it and placed it on my system without problems. When I run the test program that comes with lfs I get the following error:

/bin/lua: /usr/local/lib/lua/compat-5.1.lua:113: error loading module `lfs' (/usr/local/lib/lfs.so:1: invalid control char near `char(127)')

    The error message "error loading module `??'" is produced by
the loader which is called by `require'. The message "invalid control..."
is produced by Lua's lexer.  It seems you're trying to load a binary
library (lfs.so) as a Lua library. Check your package.path and package.cpath
in compat-5.1.lua.

    Tomas

Aha. I had

LUA_CPATH = /usr/local/lib/?.so
and
LUA_PATH = /usr/local/lib/?.so

Changing the latter to

LUA_PATH = /usr/local/lib/?.lua

Solved the problem.

Many thanks.

Bob