Any success with CELX & LUASOCKETs in ScriptedOrbits?

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
logan_number5
Posts: 9
Joined: 12.12.2003
With us: 20 years 11 months

Any success with CELX & LUASOCKETs in ScriptedOrbits?

Post #1by logan_number5 » 08.10.2008, 16:41

Hi, NASA needs your help! 8-)

I'm getting an error when trying to use LuaSocket in a ScriptedOrbit:

Failed to load module for ScriptedOrbit:
error loading module 'socket' from file '/home/mlogan/luasocket-2.0.2/src/socket.so':
?/home/mlogan/luasocket-2.0.2/src/socket.so: undefined symbol: lua_getmetatable

I've tested lua, luasockets, celx, and scriptedorbits seperately, and the all work great.
Also, for celx work, I enabled system access policy and tested IO,OS and other packages.

using:

celestia-1.5.1
lua-5.1.4
luasocket-2.0.2

thanks for any ideas..

Mike

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Any success with CELX & LUASOCKETs in ScriptedOrbits?

Post #2by chris » 10.10.2008, 00:08

logan_number5 wrote:Hi, NASA needs your help! 8-)

I'm getting an error when trying to use LuaSocket in a ScriptedOrbit:

Failed to load module for ScriptedOrbit:
error loading module 'socket' from file '/home/mlogan/luasocket-2.0.2/src/socket.so':
?/home/mlogan/luasocket-2.0.2/src/socket.so: undefined symbol: lua_getmetatable

I've tested lua, luasockets, celx, and scriptedorbits seperately, and the all work great.
Also, for celx work, I enabled system access policy and tested IO,OS and other packages.

using:

celestia-1.5.1
lua-5.1.4
luasocket-2.0.2

thanks for any ideas..

I'm not sure what might be happening here--it sounds like you're doing everything right. I've had success using luasocket in the past, though I've never called it from a scriptedorbit directly. Instead, I read from the socket in a lua hook script and set some variables which were used by the ScriptedOrbit. It's generally good to do network IO (even non-blocking) outside of the a ScriptedOrbit.

I'm not sure that this is the cause of the undefined symbol error though--loadlib should work pretty much the same whether you do it from a Lua hook or a scripted orbit. Feel free to send me a private message here on the forum if you're still stuck.

--Chris


Return to “Development”