[orbitcpp-list] Re: Test on CVS gcc
Status: Beta
Brought to you by:
philipd
From: Phil D. <ph...@us...> - 2001-01-17 13:05:32
|
Hi Richard, This is very useful - thanks very much for spending time doing this. I'll integrate your patches into the CVS tree. It might be worth trying a memory debugger (e.g. checker, electric fence) to find your segfault problem. I've found them to be useful in the past in pinning the segfault on the right line of code. BTW, do you have any objections to your name appearing in the AUTHORS file? Cheers, Phil Richard Andrews writes: > > Here's the results so far. > > I managed to get it to build but the test servers all crash. I'm looking into it but don't know what I'm looking for. gdb puts the segfault at a weird location, I can't see the problem yet.. > > The main problem for me with the orbitcpp code is the implicit constructor problem outlined in the test section at the bottom. I have to manually edit all skel code produced by orbitcpp and insert the appropriate constructors. > > > > > ---------------------------- > > > > Building ORBit-0.5.6-patched-for-orbitcpp > Using gcc-20010115 an c++-20010115 from codesourcesourcery.com built for i386 > > configured as > > ./configure i686-pc-linux-gnu --prefix=/usr/develop > > -------- > > services/event/orbit-event-server.c : > > orbit-event-server.c:4:29: CosEventChannel.h: No such file or directory > > > Root cause: orbit-idl fails to compile CosEventChannel.idl > > CosEventComm.idl:11: Warning: `disconnect_push_consumer' underscores within identifiers are discouraged for use with C-language IDL mappings > CosEventChannel.idl:12: Error: Missing comma after identifier `CosEventComm' > CosEventChannel.idl:12: Error: parse error, expecting `TOK_OP_SCOPE' or `TOK_IDENT' > > ** WARNING **: CosEventChannel.idl compilation failed > > > I was forced to disable event subdirectory when building services. > -------- > > warning: const qualifier ignored on asm > > This warning appears more than 200 times in both ORBit and orbitcpp builds > > -------- > > > > > > Building ORBitcpp-0.30-pre1 > Using > gcc-20010115 an c++-20010115 from codesourcery.com built for i386 > ORBit-0.5.6-patched-for-orbitcpp > > ./configure i686-pc-linux-gnu --prefix=/usr/develop > OK > > > Throughout code std namespace is not used for classes which should only be available through namespace std. > > To fix this problem I was forced to make the following change > > compiler/base.hh > > > > --- base.hh.orig Wed Jan 17 11:02:22 2001 > +++ base.hh Wed Jan 17 11:00:22 2001 > @@ -37,6 +37,8 @@ > #include <iostream> > > > +using namespace std; > + > > > #define IDL_CPP_KEY_PREFIX "_cxx_" > --end-patch > > -------- > > Friend requires type key. This is a recent pedantic rule implementation. No major problem though. > > --- language.hh.orig Tue Nov 28 09:28:12 2000 > +++ language.hh Wed Jan 17 11:06:27 2001 > @@ -155,7 +155,7 @@ > > void getCPPNamespaceDecl(string &ns_begin,string &ns_end,string const &prefix = ""); > > - friend IDLElement; > + friend class IDLElement; > }; > > > --end-patch > > > > > > --- orbitcpp_smartptr.hh.orig Sat Nov 25 19:30:35 2000 > +++ orbitcpp_smartptr.hh Wed Jan 17 11:16:02 2001 > @@ -910,7 +910,7 @@ > > template<class CharT,bool p_manager = false> > class String_var { > - friend String_out<CharT>; > + friend class String_out<CharT>; > protected: > CharT > *m_data; > typedef StringProperties<CharT> Properties; > --end-patch > > > -------- > > Running tests > > > basic: > > Implicit constructors for templated classes in generated code aren't resolved in some instances. I'm still not sure of the exact reason for this syntax problem but I'm experiencing it with a lot of my own code as well. > > basic-cpp-skells.cc: 196 > > _retval = _self->returnReverse(value,*reverse_me_too,*half_of_value); > > For this to work it needs to be > > _retval = _self->returnReverse(value,*reverse_me_too,_orbitcpp::String_out<Char>(*half_of_value) ); > > > > basic-cpp-skells.cc: 360 > > _retval = _self->getCallback(_call_me_ptr,_call_me_and_change_me_ptr,_orbitcpp::ObjectPtr_out<Test::Callback, _return_me_ptr); > > For this to work it needs to be > > _retval = _self->getCallback(_call_me_ptr,_call_me_and_change_me_ptr,_orbitcpp::ObjectPtr_out<Test::Callback, _orbitcpp::stub::Test::Callback*>(_return_me_ptr)); > > > > client.cc: std:: not used for cout, cerr, ifstream etc. > Fixed by adding > > using namespace std; > > > client.cc > line 66 implicit constructor > line 102 implicit constructor > > > > server.cc > > namespace std problems > > > Compiled and linked OK (server and client) > > > SEGFAULT in server > > basic-cpp-skels.cc : 277 > POA_Test::BaseB::BaseB(){ > > called from > server.cc : 38 > Head_impl() > : Cbi1(1), Cbi2(2), Cbi3(3) { > > > called from > server.cc : 106 > Head_impl hi; > > > I have no idea what causes the segfault. I'll try and track it down for a bit but I'm not holding out much hope. Probably another weird libstdc++ problem (sorry no debug info for libstdc++). > > That's as far as I've gotten > > Hope this is useful to you > > > L8r > > Rich > > > > |