[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: freebsd: lhf's lposix -> "undefined symbol lua_touserdata"
- From: clemens fischer <ino-qc@...>
- Date: Sat, 26 Jun 2004 15:27:13 +0200
,----
| 'uname -rms'
| FreeBSD 4.10-STABLE i386
|
| 'lua -v'
| Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
|
| http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/lposix.tar.gz
`----
changing the Makefile was easy, and i got the .o binaries built, but the
test fails thus:
,----
| /src/lualibs/posix
| 0 p2 # gmake
| cc -fPIC -I/l/include -pedantic -Wall -O2 -c -o lposix.o lposix.c
| In file included from lposix.c:15:
| /usr/include/stdlib.h:111: warning: ANSI C does not support `long long'
| /usr/include/stdlib.h:117: warning: ANSI C does not support `long long'
| cc -o lposix.so -shared lposix.o
| /l/bin/lua -lposix test.lua
| /l/bin/lua: posix.lua:7: ./lposix.so: Undefined symbol "lua_touserdata"
| stack traceback:
| [C]: in function `assert'
| posix.lua:7: in function `so'
| posix.lua:10: in main chunk
| [C]: in function `require'
| [C]: ?
| gmake: *** [test] Error 1
`----
liblua.so contains that symbol:
,----
| /src/lualibs/posix
| 0 p2 # for i in /l/lib/liblua*.so;do nm -D $i|sed "s,^,$i: ,";done|grep touser
| /l/lib/liblua.so: 000048fc T lua_touserdata
| /l/lib/liblualib.so: U lua_touserdata
`----
the lua interpreter itself doesn't link to liblua, though:
,----
| /src/lualibs/posix
| 0 p2 # ldd /l/bin/lua
| /l/bin/lua:
| libm.so.2 => /usr/lib/libm.so.2 (0x2807f000)
| libreadline.so.4 => /usr/lib/libreadline.so.4 (0x2809a000)
| libhistory.so.4 => /usr/lib/libhistory.so.4 (0x280bf000)
| libncurses.so.5 => /usr/lib/libncurses.so.5 (0x280c5000)
| libc.so.4 => /usr/lib/libc.so.4 (0x28106000)
`----
i cannot for the life of me understand the mechanics of this. shouldn't
the lua-interpreter provide `lua_touserdata' to some arbitrary lua program
in this context? how do i get some POSIX extensions for standalone lua
scripts? and yes, i spent more than an hour googling and checking the
usual lua-{archive,wiki,userland}s.
regards,
clemens