Re: luabind and g++ 4.7

Ryan Pavlik <[email protected]> Fri, 6 Apr 2012 15:14:23 -0500
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <CABMFTE9yhmZ3NJzvgKYj30mGj7gJNb-CQOG1ZjWBZFdhb-=sLg@mail.gmail.com>
It effectively does - ABI is not necessarily constant between compiler
versions, so typically a release picks a compiler version and stays with
it, just patching it rather than upgrading it, until a full release upgrade.

Ryan

On Fri, Apr 6, 2012 at 1:04 PM, <[email protected]> wrote:

>
> Hi,
>
> thanks for the information. What is a bit strange for me is that luabind
> needs
> to be recompiled with g++ 4.7 (imagine if the debian distribution needs to
> maintain each package for each architecture and each compiler version :))
> Anyway I will try this as soon as possible (I am currently using luabind
> from my distribution).
>
> ----- Mail original -----
> De: "Ryan Pavlik" <[email protected]>
> À: [email protected]
> Envoyé: Jeudi 5 Avril 2012 19:56:16
> Objet: Re: [luabind] luabind and g++ 4.7
>
>
> Also, make sure you're using a branch that has the "cast_graph bug" fixed
> - I know at least mine does, and I think upstream master does too.
>
>
> On Thu, Apr 5, 2012 at 3:43 AM, Nigel J Atkinson < [email protected]> wrote:
>
>
> Just something off the top of my head, but make sure that you compile
> *everything* with g++ 4.7 and see if that fixes it.
>
> I've previously had issues with a program compiled with 4.4 but Luabind
> compiled with 4.3
>
> Nigel
>
>
>
>
> On 05/04/2012, at 6:25 PM, [email protected] wrote:
>
> >
> > Hi,
> >
> > thanks for the answer. Sorry for the so few details and so vague message
> last
> > time. Here are more details.
> >
> > Compilation works fine under both versions of compilers (CXX exported to
> the
> > correct g++ file).
> > The program crashes when running after being compiled with g++ 4.7.
> > Here below a backtrace.
> >
> > But what's annoying me here is that gdb uses the wrong files (here files
> from
> > g++ 4.6 whereas the program was _really_ compiled with g++ 4.7).
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread 0x7fffe2742700 (LWP 27305)]
> > _M_lower_bound (__y=<optimized out>, __k=..., __x=0x407, this=<optimized
> out>)
> > at /usr/include/c++/4.6/bits/stl_tree.h:1096
> > warning: Source file is more recent than executable.
> > 1096
> > (gdb) bt
> > #0 _M_lower_bound (__y=<optimized out>, __k=..., __x=0x407,
> this=<optimized out>)
> > at /usr/include/c++/4.6/bits/stl_tree.h:1096
> > #1 find (__k=..., this=0x7fffe27410e8) at
> /usr/include/c++/4.6/bits/stl_tree.h:1539
> > #2 find (__x=..., this=0x7fffe27410e8) at
> /usr/include/c++/4.6/bits/stl_map.h:752
> > #3 get (object_offset=-6846562, dynamic_id=6, target=6, src=6896208,
> this=0x7fffe27410e8) at src/inheritance.cpp:87
> > #4 luabind::detail::cast_graph::impl::cast (this=0x7fffe27410d0,
> p=0x687868, src=6896208, target=6, dynamic_id=6,
> > dynamic_ptr=<optimized out>) at src/inheritance.cpp:152
> > #5 0x00007ffff799f66c in luabind::detail::cast_graph::cast
> (this=<optimized out>, p=<optimized out>,
> > src=<optimized out>, target=<optimized out>, dynamic_id=<optimized out>,
> dynamic_ptr=<optimized out>)
> > at src/inheritance.cpp:227
> > #6 0x000000000043b6c1 in
> luabind::detail::pointer_holder<game::ServerMonster*, void const>::get
> (this=0x696ba0,
> > target=6) at /usr/include/luabind/detail/instance_holder.hpp:109
> > #7 0x0000000000423997 in luabind::detail::object_rep::get_instance
> (this=0x6939f8, target=6)
> > at /usr/include/luabind/detail/object_rep.hpp:59
> > #8 0x000000000044015b in
> luabind::detail::const_ref_converter::match<game::ServerMonster>
> (this=0x7fffe2741140,
> > L=0x6859f0, index=1) at /usr/include/luabind/detail/policy.hpp:450
> > #9 0x0000000000440494 in
> luabind::detail::invoke_member<game::MonsterState
> (game::ServerMonster::*)() const, boost::mpl::vector2<game::MonsterState,
> game::ServerMonster const&>, luabind::detail::null_type> (L=0x6859f0,
> self=..., ctx=..., f=
> > @0x692790: (game::MonsterState (game::ServerMonster::*)(const
> game::ServerMonster * const)) 0x432bd8 <game::ServerMonster::GetState()
> const>) at /usr/include/luabind/detail/call.hpp:257
> > #10 0x000000000043fe9c in luabind::detail::invoke0<game::MonsterState
> (game::ServerMonster::*)() const, boost::mpl::vector2<game::MonsterState,
> game::ServerMonster const&>, luabind::detail::null_type,
> boost::is_void<game::MonsterState> > (
> > L=0x6859f0, self=..., ctx=..., f=
> > @0x692790: (game::MonsterState (game::ServerMonster::*)(const
> game::ServerMonster * const)) 0x432bd8 <game::ServerMonster::GetState()
> const>, policies=...) at /usr/include/luabind/detail/call.hpp:78
> > #11 0x000000000043e945 in luabind::detail::invoke<game::MonsterState
> (game::ServerMonster::*)() const, boost::mpl::vector2<game::MonsterState,
> game::ServerMonster const&>, luabind::detail::null_type> (L=0x6859f0,
> self=..., ctx=..., f=
> > @0x692790: (game::MonsterState (game::ServerMonster::*)(const
> game::ServerMonster * const)) 0x432bd8 <game::ServerMonster::GetState()
> const>, policies=...) at /usr/include/luabind/detail/call.hpp:101
> > #12 0x000000000043e12e in
> luabind::detail::function_object_impl<game::MonsterState
> (game::ServerMonster::*)() const, boost::mpl::vector2<game::MonsterState,
> game::ServerMonster const&>, luabind::detail::null_type>::entry_point
> (L=0x6859f0)
> > at /usr/include/luabind/make_function.hpp:63
> > #13 0x00007ffff7bb5e2b in luaD_precall () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #14 0x00007ffff7bb60c1 in luaD_call () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #15 0x00007ffff7bb0279 in lua_call () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #16 0x00007ffff79a02d1 in get_instance_value (L=0x6859f0) at
> src/object_rep.cpp:165
> > #17 luabind::detail::(anonymous namespace)::get_instance_value
> (L=0x6859f0) at src/object_rep.cpp:148
> > #18 0x00007ffff7bb5e2b in luaD_precall () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #19 0x00007ffff7bb60c1 in luaD_call () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #20 0x00007ffff7bc2df4 in callTMres () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #21 0x00007ffff7bc30fc in luaV_gettable () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > ---Type <return> to continue, or q <return> to quit---
> > #22 0x00007ffff7bc4384 in luaV_execute () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #23 0x00007ffff7bb60d6 in luaD_call () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #24 0x00007ffff7bb02e3 in f_call () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #25 0x00007ffff7bb508f in luaD_rawrunprotected () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #26 0x00007ffff7bb64f5 in luaD_pcall () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #27 0x00007ffff7bb038d in lua_pcall () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> > #28 0x0000000000434f6d in
> luabind::detail::proxy_function_void_caller<boost::tuples::tuple<boost::reference_wrapper<game::ServerMonster>
> const*, boost::tuples::null_type, boost::tuples::null_type,
> boost::tuples::null_type, boost::tuples::null_type,
> boost::tuples::null_type, boost::tuples::null_type,
> boost::tuples::null_type, boost::tuples::null_type,
> boost::tuples::null_type> >::~proxy_function_void_caller
> (this=0x7fffe2741ca0, __in_chrg=<optimized out>)
> > at /usr/include/luabind/detail/call_function.hpp:262
> > #29 0x00000000004323f4 in game::ServerMonster::Update (this=0x693a50) at
> server_monster.cc:78
> > #30 0x0000000000433e57 in game::MonsterArea::Update (this=0x693460,
> time=1333612531, dt=3.719329833984375e-05)
> > at server_monster.cc:469
> > #31 0x0000000000448867 in game::MonsterManager::Run (this=0x66cde0) at
> server.cc:127
> > #32 0x00007fffe4641cee in mel::layers::threads::ThreadFunc (th=0x66cde0)
> at pthreads.cc:99
> > #33 0x00007fffe34c8b50 in start_thread (arg=<optimized out>) at
> pthread_create.c:304
> > #34 0x00007fffe3abd90d in clone () at
> ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
> > #35 0x0000000000000000 in ?? ()
> >
> >
> > ----- Mail original -----
> > De: "Ryan Pavlik" < [email protected] >
> > À: [email protected]
> > Envoyé: Jeudi 5 Avril 2012 00:33:46
> > Objet: Re: [luabind] luabind and g++ 4.7
> >
> >
> > Unfortunately this isn't very much information to go on. Does it fail at
> compile time or runtime? Are any warnings or error messages printed?
> >
> >
> > Ryan
> >
> >
> > On Wed, Apr 4, 2012 at 10:19 AM, < [email protected] > wrote:
> >
> >
> >
> > Hello,
> >
> > my program using luabind stopped to work when compiled with g++ 4.7.
> > If I switch back to g++ 4.6 it works again.
> >
> > Is it a know issue ?
> >
> > For the moment it is not easy for me to know where exactly the thing
> > hurts.
> >
> > Regards,
> >
> > dAgeCKo
> >
> >
> ------------------------------------------------------------------------------
> > Better than sec? Nothing is better than sec when it comes to
> > monitoring Big Data applications. Try Boundary one-second
> > resolution app monitoring today. Free.
> > http://p.sf.net/sfu/Boundary-dev2dev
> > _______________________________________________
> > luabind-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/luabind-user
> >
> >
> >
> >
> > --
> > Ryan Pavlik
> > HCI Graduate Student
> > Virtual Reality Applications Center
> > Iowa State University
> >
> > [email protected]
> > http://academic.cleardefinition.com
> >
> >
> ------------------------------------------------------------------------------
> > Better than sec? Nothing is better than sec when it comes to
> > monitoring Big Data applications. Try Boundary one-second
> > resolution app monitoring today. Free.
> > http://p.sf.net/sfu/Boundary-dev2dev
> > _______________________________________________
> > luabind-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/luabind-user
> >
> >
> ------------------------------------------------------------------------------
> > Better than sec? Nothing is better than sec when it comes to
> > monitoring Big Data applications. Try Boundary one-second
> > resolution app monitoring today. Free.
> > http://p.sf.net/sfu/Boundary-dev2dev
> > _______________________________________________
> > luabind-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>
>
>
> --
> Ryan Pavlik
> HCI Graduate Student
> Virtual Reality Applications Center
> Iowa State University
>
> [email protected]
> http://academic.cleardefinition.com
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>
> ------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[email protected]
http://academic.cleardefinition.com

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user