Page 1 of 1

lua problems

Posted: Mon Dec 18, 2006 10:50 pm
by nicolasc
I can only guess where this comes from: I performed a system update, which included upgrading lua from 5.0.3 to 5.1.1...
At first I was quite surprised to see, that configure was downloading lua again - it didn't do that before.

Downgrading is an option, but I'd rather not...

Can anybody give me a hint...
This is the shortened error output from kdevelop

Code: Select all

linking orxonox (g++)
orxonox-generic_npc.o: In function `Lunar<GenericNPC>::weaktable(lua_State*, char const*)':
./lib/script_engine/lunar.h:235: undefined reference to `lua_newtable'
./lib/script_engine/lunar.h:235: undefined reference to `lua_newtable'
orxonox-generic_npc.o: In function `Lunar<GenericNPC>::Register(lua_State*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ScriptMethod const*)':
./lib/script_engine/lunar.h:33: undefined reference to `lua_newtable'
./lib/script_engine/lunar.h:57: undefined reference to `lua_newtable'
orxonox-gate.o: In function `Lunar<Gate>::weaktable(lua_State*, char const*)':
<snip>
 and some more errors
</snip>
lib/script_engine/libORXscript.a(executor_lua_state.o): In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > const& fromLua<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(lua_State*, int)':
/home/nicolasc/development/orxonox/branches/playability/src/lib/script_engine/executor_lua_state.cc:28: undefined reference to `lua_tostring'
../extern_libs/liblualib.a(lauxlib.o): In function `aux_do':
lauxlib.c:(.text+0x99): undefined reference to `lua_tostring'
<snip>
  tons of same error type
</snip>
lstrlib.c:(.text+0x1056): undefined reference to `lua_strlen'
lstrlib.c:(.text+0x106c): undefined reference to `lua_tostring'
collect2: ld returned 1 exit status
gmake[3]: *** [orxonox] Error 1
gmake[2]: *** [all-recursive] Error 1
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all] Error 2
*** Exited with status: 2 ***
PS. Do not quote my signature!

Posted: Tue Dec 19, 2006 8:22 am
by bensch
Ok, this problem comes from including headers with lua-5.0 (the version Orxonox is downloading) and linking with the system-wide version installed on your system (5.1.1).

This is why a linker error appears and I think, it might help to remove the LUA-auto-installer.

This can be done in the acinclude.m4, but i think that if you do this you will break the compiling on the tardis and on many other systems.

What system do you have?

Posted: Tue Dec 19, 2006 9:01 am
by nicolasc
Gentoo 2006.1, testing (aka. unstable)

Is there a possibility of including an if branch? Check if any lua version is installed?

I am running some trial and error tests... check back later [done]
no success!

cheers
nico

Posted: Tue Dec 19, 2006 9:12 am
by bensch
hmm... yeah, I will look into it this evening if I find the time.
The branch condition is a good idea (I had thought I had done it already)

Posted: Tue Dec 19, 2006 2:44 pm
by bensch
Hmm, I looked into it and here I do not yet have lua-5.1.1 with my Gentoo Linux (just emerge --sync'ed)

And I have spoken with silvan, and he told me, that most probably there is a incompatibility to older versions in 5.1+.

So I will look at the configure-script now...

Posted: Tue Dec 19, 2006 4:57 pm
by nicolasc
Thank for the help...
Hmm I looked into it and here i do not yet have lua-5.1.1 with my Gentoo Linux (just emerge --sync'ed)
lua ~arch'ed a few days ago...

There seems to be another (related) problem with lua_setgcthreshhold... The function seems to be removed... I guess I stick with lua-5.0 for the time being.

I need to do some hacking for tomorrow; therefore I will downgrade lua, rebuild kdelibs (sigh), but keep the old versions (quickpkg). So testing should be possible...

cheers
nico