lua-users home
lua-l archive

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


Hello,

I'm a win32 guy trying to get lua/luasql running on linux (ubuntu 6.06).

In the course of experimenting with lua on linux, I've both installed the lua50 package via apt-get, and as well built/installed lua 5.1.1 from source.

the lua50 package appears to have installed headers in /usr/include and libs in /usr/libs (where I see both .so and .a for liblua50, for example). the build of the 5.1.1 source appears to have placed the headers in /usr/local/include, and placed liblua.a into /usr/local/lib. (the default 5.1.1 make produces no shared libs?)

When I run lua from the console, I'm in 5.1. This would appear to come from /usr/local/bin. (What command to use to determine location (on disk) of executing program?)

Ok, so I then pull the latest luasql source, and examining the make it appears to want compat-5.1. So I pull that also, and after messing with the config directories a bit, get it to compile. I also run 'make install' after editing the config thusly (attempting to use lua 5.1):

(from luasql's config used by Makefile)
# Installation directories
# System's libraries directory (where binary libraries are installed)
LUA_LIBDIR= /usr/local/lib/lua/5.1
# System's lua directory (where Lua libraries are installed)
LUA_DIR= /usr/local/share/lua/5.1
# Lua includes directory
LUA_INC= /usr/local/include


Then I run lua on the test.lua provided:

tblom@ubunt-noman:~/blomcode/sdkpub/luasql-2.0.2/tests$ lua test.lua mysql
lua: error loading module 'luasql.mysql' from file '/usr/local/lib/lua/5.1/luasql/mysql.so': /usr/local/lib/lua/5.1/luasql/mysql.so: undefined symbol: luaopen_luasql_mysql
stack traceback:
        [C]: ?
        [C]: in function 'require'
        test.lua:597: in main chunk
        [C]: ?


Thanks for any pointers.  (non-NULL, er, nil, please)

-thomas blom in austin, tx