|
Boost Users : |
Subject: [Boost-users] [serialization] boost 1.33.1, HP-UX ia64 & gcc-3.4.4
From: Frank Bergemann (FBergemann_at_[hidden])
Date: 2010-01-15 08:40:23
Hi,
for a porting job i needed to shift from OSF tru64 to HP-UX V3 ia64 (on both using gcc-3.4.4)
There i have stream error exception for boost::serialization data import via XML.
The exception is thrown here:
include/boost/archive/impl/basic_xml_iarchive.ipp:
template<class Archive>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(void)
basic_xml_iarchive<Archive>::load_start(const char *name){
// if there's no name
if(NULL == name)
return;
bool result = this->This()->gimpl->parse_start_tag(this->This()->get_is());
if(true != result){
boost::throw_exception(
archive_exception(archive_exception::stream_error)
);
}
// don't check start tag at highest level
++depth;
return;
}
I.e. it fails to parse the XML data via boost:spirit.
I tried to debug with 'gdb', but was impossible for me at the level of boost::spirit parser implementation.
Then i was remembering, that there are two sets of boost libs - one "normal" and a "debug" version.
So i switched to the debug version - just to see, if i can better dig into the details with 'gdb' with it.
And suddenly the problem was gone.
I.e. my application works, if i link with libboost_serialization-gcc-d.a
But it doesn't work, if i link with libboost_serialization-gcc.a
I also tried to extract all the stuff from the boost::serialization, that is used by my application, into a little test program.
Just to feed in the same XML string, that fails for my application.
I wanted to see, that i can re-produce the problem - but for a minimum program.
- for using that next to evaluate deeper.
But - unfortunately - for my test programm it works (with both library versions, "debug" and "normal" one).
So it is really hard to find the reason for the problem.
I also checked about compiler support on the boost.org pages.
And actually it was only boost lib 1.38.0, which mentions HP-UX IA64 together with gcc.
But that was gcc-4.2.1 (i use 3.4.4.).
Before 1.38.0, it was alway the HP native compiler (not gcc).
After 1.38.0 HP-UX is not mentioned at all anymore.
So i guess i am generally in bad conditions for my "constellation" (HP-UX ia64 V3, gcc-3.4.4, boost 1.33.1).
What is the difference about "debug" lib image and "non-debug" lib image?
Is it just optimization level for the compiler?
Do you have any hint for me?
It might be a problem of gcc-3.4.4 itself on hp-ux (i'll check).
But it would be interesting to here, if s.o. else had the same problem(?!)
- many thanks!
Frank Bergemann
____________________________________________________________________
WEB.DE MillionenKlick: Kostenlos tippen, täglich 1 Million gewinnen!
http://produkte.web.de/go/07/
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net