Luabind 0.8.1 does not compile if libboost version > 1.34

For those having trouble installing/running the game or to report a bug

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Luabind 0.8.1 does not compile if libboost version > 1.34

Postby Roots » Mon Dec 28, 2009 4:59 am

I did a large system update recently and I can no longer compile the source. The problem occurs during object linking. Its immediately obvious that this is a problem related to our binding code (the errors all occur in "defs*" files, which contain our C++/Lua binding code). I notice several mentions to undefined references of luabind functions such as "make_function" or something similar. Here's the error output:

Code: Select all

g++ -Wall -O3 -g -pg -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/Qt3Support -DQT_CLEAN_NAMESPACE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT3_SUPPORT -DQT_SHARED -Wall -O3 -g -pg   -o allacrost main.o main_options.o defs.o utils.o system.o input.o mode_manager.o socket.o defs_engine.o audio.o audio_descriptor.o audio_effects.o audio_input.o audio_stream.o effects.o fade.o gui.o image_base.o image.o interpolator.o menu_window.o option.o particle_effect.o particle_manager.o particle_system.o shake.o text.o textbox.o texture.o texture_controller.o video.o script.o script_read.o script_write.o script_modify.o global.o global_actors.o global_effects.o global_objects.o global_skills.o defs_global.o defs_modes.o battle.o battle_actions.o battle_actors.o battle_events.o battle_windows.o boot.o boot_menu.o boot_credits.o boot_welcome.o map.o map_dialogue.o map_events.o map_objects.o map_sprites.o map_tiles.o map_treasure.o map_utils.o map_zones.o menu.o menu_views.o pause.o save_mode.o scene.o shop.o shop_buy.o shop_confirm.o shop_root.o shop_sell.o shop_trade.o shop_utils.o  -lm -lluabind -llua5.1 -lSDL_net -lSDL_ttf -lvorbisfile -lopenal -lSDL -ljpeg -lpng -lGLU -lGL -lX11   -L/usr/X11R6/lib
defs.o: In function `luabind::adl::object luabind::make_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>, luabind::detail::null_type>(lua_State*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>, luabind::detail::null_type)':
defs.cpp:(.text._ZN7luabind13make_functionIPFSsRKSsEN5boost3mpl7vector2ISsS2_EENS_6detail9null_typeEEENS_3adl6objectEP9lua_StateT_T0_T1_[luabind::adl::object luabind::make_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>, luabind::detail::null_type>(lua_State*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), boost::mpl::vector2<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>, luabind::detail::null_type)]+0x66): undefined reference to `luabind::detail::make_function_aux(lua_State*, int, boost::function1<int, lua_State*> const&, boost::function1<int, lua_State*> const&, boost::function2<int, lua_State*, char const*> const&)'
defs.o: In function `luabind::adl::object luabind::make_function<float (*)(), boost::mpl::vector1<float>, luabind::detail::null_type>(lua_State*, float (*)(), boost::mpl::vector1<float>, luabind::detail::null_type)':
defs.cpp:(.text._ZN7luabind13make_functionIPFfvEN5boost3mpl7vector1IfEENS_6detail9null_typeEEENS_3adl6objectEP9lua_StateT_T0_T1_[luabind::adl::object luabind::make_function<float (*)(), boost::mpl::vector1<float>, luabind::detail::null_type>(lua_State*, float (*)(), boost::mpl::vector1<float>, luabind::detail::null_type)]+0x63): undefined reference to `luabind::detail::make_function_aux(lua_State*, int, boost::function1<int, lua_State*> const&, boost::function1<int, lua_State*> const&, boost::function2<int, lua_State*, char const*> const&)'
defs.o: In function `luabind::adl::object luabind::make_function<int (*)(int, int), boost::mpl::vector3<int, int, int>, luabind::detail::null_type>(lua_State*, int (*)(int, int), boost::mpl::vector3<int, int, int>, luabind::detail::null_type)':
defs.cpp:(.text._ZN7luabind13make_functionIPFiiiEN5boost3mpl7vector3IiiiEENS_6detail9null_typeEEENS_3adl6objectEP9lua_StateT_T0_T1_[luabind::adl::object luabind::make_function<int (*)(int, int), boost::mpl::vector3<int, int, int>, luabind::detail::null_type>(lua_State*, int (*)(int, int), boost::mpl::vector3<int, int, int>, luabind::detail::null_type)]+0x66): undefined reference to `luabind::detail::make_function_aux(lua_State*, int, boost::function1<int, lua_State*> const&, boost::function1<int, lua_State*> const&, boost::function2<int, lua_State*, char const*> const&)'
defs_engine.o: In function `luabind::adl::object luabind::make_function<void (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<void, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type>(lua_State*, void (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<void, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type)':
defs_engine.cpp:(.text._ZN7luabind13make_functionIMN16hoa_mode_manager10ModeEngineEFvvEN5boost3mpl7vector2IvRS2_EENS_6detail9null_typeEEENS_3adl6objectEP9lua_StateT_T0_T1_[luabind::adl::object luabind::make_function<void (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<void, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type>(lua_State*, void (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<void, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type)]+0x7b): undefined reference to `luabind::detail::make_function_aux(lua_State*, int, boost::function1<int, lua_State*> const&, boost::function1<int, lua_State*> const&, boost::function2<int, lua_State*, char const*> const&)'
defs_engine.o: In function `luabind::adl::object luabind::make_function<hoa_mode_manager::GameMode* (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<hoa_mode_manager::GameMode*, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type>(lua_State*, hoa_mode_manager::GameMode* (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<hoa_mode_manager::GameMode*, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type)':
defs_engine.cpp:(.text._ZN7luabind13make_functionIMN16hoa_mode_manager10ModeEngineEFPNS1_8GameModeEvEN5boost3mpl7vector2IS4_RS2_EENS_6detail9null_typeEEENS_3adl6objectEP9lua_StateT_T0_T1_[luabind::adl::object luabind::make_function<hoa_mode_manager::GameMode* (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<hoa_mode_manager::GameMode*, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type>(lua_State*, hoa_mode_manager::GameMode* (hoa_mode_manager::ModeEngine::*)(), boost::mpl::vector2<hoa_mode_manager::GameMode*, hoa_mode_manager::ModeEngine&>, luabind::detail::null_type)]+0x7b): undefined reference to `luabind::detail::make_function_aux(lua_State*, int, boost::function1<int, lua_State*> const&, boost::function1<int, lua_State*> const&, boost::function2<int, lua_State*, char const*> const&)'
defs_engine.o:defs_engine.cpp:(.text._ZN7luabind13make_functionIMN16hoa_mode_manager10ModeEngineEFPNS1_8GameModeEjEN5boost3mpl7vector3IS4_RS2_jEENS_6detail9null_typeEEENS_3adl6objectEP9lua_StateT_T0_T1_[luabind::adl::object luabind::make_function<hoa_mode_manager::GameMode* (hoa_mode_manager::ModeEngine::*)(unsigned int), boost::mpl::vector3<hoa_mode_manager::GameMode*, hoa_mode_manager::ModeEngine&, unsigned int>, luabind::detail::null_type>(lua_State*, hoa_mode_manager::GameMode* (hoa_mode_manager::ModeEngine::*)(unsigned int), boost::mpl::vector3<hoa_mode_manager::GameMode*, hoa_mode_manager::ModeEngine&, unsigned int>, luabind::detail::null_type)]+0x7b): more undefined references to `luabind::detail::make_function_aux(lua_State*, int, boost::function1<int, lua_State*> const&, boost::function1<int, lua_State*> const&, boost::function2<int, lua_State*, char const*> const&)' follow
collect2: ld returned 1 exit status
make[2]: *** [allacrost] Error 1
make[2]: Leaving directory `/home/roots/dev/allacrost/sourceforge/trunk/demo'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/roots/dev/allacrost/sourceforge/trunk/demo'
make: *** [all] Error 2


Its been a while since I've worked on the code, so the first thing I did was do a quick check on the defs* files in our repository to see if they had been recently changed. They had not. So I made sure that I had the luabind libraries installed correctly. After a little more searching I found two reported errors against the luabind-dev library in the Debian repositories (I run Debian too).

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559497
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542881

Both mention that a work-around is to install libboost version 1.34, as the luabind-dev library doesn't seem to be compatible with versions of libboost greater than that. I'm not sure if these library version incompatibilities are a Debian specific problem or not, but I thought I should mention it here just in case someone else runs into the same problem I have.


I also checked to see if there's a new luabind version coming down the pipe that may address this issue and it seems there is. The Luabind devs released a v0.9 RC1 on 10 December, a little over two weeks ago. So it will probably be a matter of a few weeks or months until luabind 0.9 makes its way into the world.
Image
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Luabind 0.8.1 does not compile if libboost version > 1.34

Postby Roots » Wed Dec 30, 2009 6:40 am

rujasu suggested that I try uninstalling the luabind packages and instead downloading the Debian source packages and compiling them locally. I tried it out and it worked, even though I used the same later version of libboost that I had installed previously. So it looks like this is a problem with the way the package was compiled for Debian and not an issue inside the luabind source itself. If you have the same issue I have, you can follow this guide. After compiling, make sure to install both the luabind and luabind-dev .deb files that you compile.

http://www.debian.org/doc/manuals/apt-h ... ng.en.html
Image
User avatar
Jastiv
Newbie
Posts: 14
Joined: Thu Sep 01, 2005 10:06 am
Contact:

Re: Luabind 0.8.1 does not compile if libboost version > 1.34

Postby Jastiv » Mon Jan 18, 2010 2:00 am

It is good you got it fixed, but what a hassle for the user.

This is the reason I banned LUA from my project.

(and OpenGL as well, who needs 3d video card drivers for 2d games)

LUA and OPENGL FREE GAME!

http://www.wograld.org
User avatar
prophile
Senior Member
Posts: 324
Joined: Fri Jan 27, 2006 7:18 pm
Location: Chaldon, Surrey, UK
Contact:

Re: Luabind 0.8.1 does not compile if libboost version > 1.34

Postby prophile » Mon Jan 18, 2010 2:10 am

Jastiv wrote:who needs 3d video card drivers for 2d games)


Welcome to 2010, where everybody has 3D video cards anyway, and all software rendering does is lose you performance.
Alastair Lynn / Resident Whinger / Allacrost
Winter Knight
Contributor
Posts: 304
Joined: Fri Sep 21, 2007 12:35 pm
Contact:

Re: Luabind 0.8.1 does not compile if libboost version > 1.34

Postby Winter Knight » Fri Jan 29, 2010 2:40 pm

This has been a long-standing problem with luabind, and is NOT specific to Debian. The problem is that Allacrost must be compiled with the same version of boost that luabind is compiled with. We have run into this problem before, and we will probably run into it more.
rujasu
Developer
Posts: 758
Joined: Sun Feb 25, 2007 5:40 am
Location: Maryland, USA

Re: Luabind 0.8.1 does not compile if libboost version > 1.34

Postby rujasu » Mon Feb 01, 2010 4:17 pm

Debian unstable now has a Luabind 0.9 package, which works with the Boost 1.40 development packages in unstable. (Or maybe it's 1.41, can't remember.) These packages work fine with Allacrost, no updates needed on our end. :approve:
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Luabind 0.8.1 does not compile if libboost version > 1.34

Postby Roots » Thu Feb 04, 2010 1:35 am

I was trying to help qubodup test out the latest SVN this afternoon and the game kept crashing before the game finished initialization. At first I thought it was a problem with the GUI code move so I had him do a completely clean build but he still had the problem. His crash report is below. Obviously its something with luabind 0.8.1 again (he's running arch Linux). Best advice I could give him was to either try Luabind 0.9 or compile and install Luabind 0.8.1 from scratch, as that's what rujasu and I had to do to get it to work on Debian.

http://pastie.org/808384

Any ideas on this issue?
Image
rujasu
Developer
Posts: 758
Joined: Sun Feb 25, 2007 5:40 am
Location: Maryland, USA

Re: Luabind 0.8.1 does not compile if libboost version > 1.34

Postby rujasu » Thu Feb 04, 2010 2:01 am

Roots wrote:I was trying to help qubodup test out the latest SVN this afternoon and the game kept crashing before the game finished initialization. At first I thought it was a problem with the GUI code move so I had him do a completely clean build but he still had the problem. His crash report is below. Obviously its something with luabind 0.8.1 again (he's running arch Linux). Best advice I could give him was to either try Luabind 0.9 or compile and install Luabind 0.8.1 from scratch, as that's what rujasu and I had to do to get it to work on Debian.

http://pastie.org/808384

Any ideas on this issue?


Probably the same issue we had, and the same issue Winter Knight mentioned. Luabind has problems if it wasn't compiled with the version of Boost you're running, so if you compile it yourself (which can be easier said than done) it works fine. Unfortunately, this is probably going to be a long-running issue because Boost is a fast-moving target.

Return to “Technical Issues”

Who is online

Users browsing this forum: No registered users and 2 guests