lua-users home
lua-l archive

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


On Sat, 22 Jan 2011 13:11:14 -0200, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>And the message does not say which symbol, does it?

Unfortunately, no, it doesn't say anything specific:

appliance:/var/tmp> ls -al
-rw-r--r--    1 root     root         9661 Jan 22 14:23 dummy.so
-rwxr-xr-x    1 root     root       186942 Jan 22 14:16 lua
-rw-r--r--    1 root     root        32933 Jan 23 11:30 mime.1.0.2.so
lrwxrwxrwx    1 root     root           13 Jan 22 14:29 mime.so ->
mime.1.0.2.so
-rw-r--r--    1 root     root        73422 Jan 23 11:29
socket.2.0.2.so
lrwxrwxrwx    1 root     root           15 Jan 22 14:30 socket.so ->
socket.2.0.2.so

appliance:/var/tmp> ./lua
Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require "dummy"
Hello from dummy
Bye 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]: ?

>Try	ldd socket.so

No such luck: The appliance doesn't have "ldd", and I couldn't find it
in the buildroot it uses to build the uClinux kernel.

>You could try one of my libraries, like
>	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lrandom
>	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lbc

I tried building/using "random" but there's a bug in the script. I
don't know enough about Lua to know what it is:

==========
/var/tmp/random# make
bfin-linux-uclibc-gcc -I/var/tmp/lua-5.1.4/src -O2 -ansi -Wall
-pedantic   -c -o lrandom.o lrandom.c

bfin-linux-uclibc-gcc -shared -o random.so lrandom.o

/var/tmp/lua-5.1.4/src/lua test.lua
/var/tmp/lua-5.1.4/src/lua: 1: Syntax error: "(" unexpected
make: *** [test] Error 2
==========

I wonder if the problem is not in the way I compile Lua, rather than
modules. It's strange that Google doesn't return more infos on that
error.

Thank you.