[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: dynamic linking problem with two(!??) luaxlib funcs
- From: mfmorss@...
- Date: Fri, 24 Feb 2006 14:10:46 -0500
I have encountered a mysterious dynamic linking issue since I installed Lua
5.1 on AIX 5.2. Just about everything works, but there are two functions
defined in lauxlib that are somehow not being exported by the Lua main
program.
One is luaL_typeerror and the other is luaL_ref. When a dynamic library is
constructed in the usual AIX way, for example:
xlc -G -bexpall -o dummy.so dummy.c
and then lua is invoked with
lua -ldummy
the result, when either of these "bad" functions is called in dummy.c, is
that lua crashes with:
lua: error loading module 'dummy' from file './dummy.so':
rtld: 0712-001 Symbol luaL_typerror was referenced
from module ./dummy.so(), but a runtime definition
of the symbol was not found.
(or analogously if luaL_ref was called).
So far I have not been able to identify any other functions, defined either
in lauxlib or elsewhere, that cause this. Suspicious of lauxlib, I have
tested so far the following other functions defined there, in each case
receiving perfectly good output from my calls to them in a dynamically
linked "dummy" library:
luaL_checkstack
luaL_gsub
luaL_newmetatable
luaL_callmeta
luaL_checknumber
luaL_argerror
I don't expect anyone here to be very familiar with dynamic linking on AIX
(not that I am myself!), but this symptom is truly weird and I thought
perhaps that someone might be able to suggest what it is about luaL_ref and
luaL_typerror that would make Lua 5.1 fail to export them. Are there
perhaps some tables that I could make Lua show me that would help me to
deduce that is going on here?
I perhaps should mention that when I compiled Lua 5.1, xlc issued no
warnings and, since the -w flag was NOT set, warnings were NOT suppressed
(that is how xlc works).
Mark F. Morss
Principal Analyst, Market Risk
American Electric Power