lua-users home
lua-l archive

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


On Fri, 21 Jan 2011 22:26:14 -0200, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>Did you try this other version?

Both versions work fine, but I always get "Unable to resolve symbol"
when I try other modules.

Since LuaSQL requires compiling SQLite and LuaSQL proper, I figured I
should try a simpler module... and I'm having the same issue with
LuaSocket:

=================
workstation:/tmp/luasocket-2.0.2# cat /tmp/luasocket-2.0.2/config
...
LUAINC=-I/tmp/lua-5.1.4/src
...
export PATH:=$(PATH):/usr/src/baps/opt/uClinux/bfin-linux-uclibc/bin

TARGET_CROSS=bfin-linux-uclibc-
CC=$(TARGET_CROSS)gcc
LD=$(CC)
STRIP=$(TARGET_CROSS)strip
AR=$(TARGET_CROSS)ar rcu
RANLIB=$(TARGET_CROSS)ranlib
DEF=-DLUASOCKET_DEBUG
LUAINC=-I/tmp/lua-5.1.4/src
CFLAGS= $(LUAINC) $(DEF) -O2 -Wall -pedantic -fpic
LDFLAGS= -O -shared -fpic
=================
appliance:/var/tmp> ln -s socket.so.2.0.2 socket.so

appliance:/var/tmp> ./lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require "dummy"
Hello from dummy

> require "socket"
error loading module 'socket' from file './socket.so':
        Unable to resolve symbol
stack traceback:
        [C]: ?
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?
=================

Could it be some wrong/missing options in CFLAGS and/or LDFLAGS?

Or does Lua and/or its modules require some specific options in Linux
that I may be missing?

I have no idea where to look :-/

Thank you.