[date_time] serialization with bcc32

A while back, I posted a bug with bcc32 and date_time serialization. I believe it was mentioned that the regression tests weren't run for serialization stuff of date_time objects, so the errors weren't detected. Will these issues be looked in to before the 1.33.0 release? The original thread is: http://thread.gmane.org/gmane.comp.lib.boost.devel/116422 Thanks Russell

On Mon, 14 Mar 2005 17:33:04 +0000, Russell Hind wrote
A while back, I posted a bug with bcc32 and date_time serialization. I believe it was mentioned that the regression tests weren't run for serialization stuff of date_time objects, so the errors weren't detected. Will these issues be looked in to before the 1.33.0 release?
The original thread is:
Ok -- added to the 1.33 todo list -- although 5.6.4 looks a bit shaky from a serialization lib point of view. A bunch of the archive tests are marked as failing. Anyway, we will turn on the regression tests soon. Of course there's some date_time limits as well w.r.t. output on 5.6.4. Jeff

Actually, Borland tests pretty well - all tests pass except for test_array an one the demos which employ arrays. In addition there is one more test that fails - I forget which. The test matrix for borland serialization looks quite healthy to me. This is much, much, better than msvc 6.x and 7.0. xml_archives use spirit. If you want to use xml archives with borland you have to: a) download a copy of spirit 1.6x b) set an environmental variable SPIRIT_ROOT=<your spirit 1.6 directory c) tweak your Build Jamfile to include SPIRT_ROOT before your other include paths for borland (and a couple of others as well) I believe this is described in the serialization document. Also the serialization Jamfile illustrates this. Robert Ramey Jeff Garland wrote:
On Mon, 14 Mar 2005 17:33:04 +0000, Russell Hind wrote
A while back, I posted a bug with bcc32 and date_time serialization. I believe it was mentioned that the regression tests weren't run for serialization stuff of date_time objects, so the errors weren't detected. Will these issues be looked in to before the 1.33.0 release?
The original thread is:
Ok -- added to the 1.33 todo list -- although 5.6.4 looks a bit shaky from a serialization lib point of view. A bunch of the archive tests are marked as failing. Anyway, we will turn on the regression tests soon. Of course there's some date_time limits as well w.r.t. output on 5.6.4.
Jeff
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Robert Ramey wrote:
Actually, Borland tests pretty well - all tests pass except for test_array an one the demos which employ arrays.
That has been my impression. We're using serialization (not extensively yet, but that will increase) and haven't hit any problems with it.
xml_archives use spirit. If you want to use xml archives with borland you have to:
a) download a copy of spirit 1.6x b) set an environmental variable SPIRIT_ROOT=<your spirit 1.6 directory c) tweak your Build Jamfile to include SPIRT_ROOT before your other include paths for borland (and a couple of others as well)
We're just replaced the boost\spirit.hpp and boost\spirit folder with the 1.6.x distro as we use spirit elsewhere and haven't hit any problems doing this. We primarily use xml_archive at the moment. Cheers Russell

I think my solution is better as it uses the latestest spirit in cases where it should work. and uses 1.6 only when necessary. Russell Hind wrote:
We're just replaced the boost\spirit.hpp and boost\spirit folder with the 1.6.x distro as we use spirit elsewhere and haven't hit any problems doing this. We primarily use xml_archive at the moment.

Robert Ramey wrote:
I think my solution is better as it uses the latestest spirit in cases where it should work. and uses 1.6 only when necessary.
That would probably be better in some cases, but we only use bcc32 here, and use spirit from boost (and use it as if it is still part of boost) so our solution works well for us. We just replace the newer spirit that ships with each boost distro, with the older one as it is the only one we can use (as we use spirit outside of serialization lib for other purposes). Cheers Russell

Jeff Garland wrote:
Ok -- added to the 1.33 todo list -- although 5.6.4 looks a bit shaky from a serialization lib point of view. A bunch of the archive tests are marked as failing. Anyway, we will turn on the regression tests soon. Of course there's some date_time limits as well w.r.t. output on 5.6.4.
Hi Jeff, Pablo Aguilar has found the issue with serializing ptimes and bcc32. The serialize functions work fine, unless you pre-compile the serialization headers and not the time_serialize.hpp header. This leads to the error [C++ Error] serialization.hpp(121): E2015 Ambiguity between 'boost::serialization::void serialize<boost::archive::text_oarchive>(boost::archive::text_oarchive &,boost::posix_time::ptime &,const unsigned int)' and 'boost::serialization::void serialize<boost::archive::text_oarchive,boost::posix_time::ptime>(boost::archive::text_oarchive &,boost::posix_time::ptime &,const unsigned int)' The solution is to either not pre-compile any of the serialization stuff or add time_serialize.hpp to the pre-compiled list also. So looks like nothing for you to fix for 1.33 :) (Unless you want to add a note about this to the docs) Thanks Russell

On Thu, 17 Mar 2005 19:48:39 +0000, Russell Hind wrote
Pablo Aguilar has found the issue with serializing ptimes and bcc32. The serialize functions work fine, unless you pre-compile the serialization headers and not the time_serialize.hpp header. This leads to the error
...snip detail
The solution is to either not pre-compile any of the serialization stuff or add time_serialize.hpp to the pre-compiled list also.
So looks like nothing for you to fix for 1.33 :) (Unless you want to add a note about this to the docs)
Will indeed add a note to the docs -- thx to you and Pablo for the assist! Jeff

It would seem to me that this is not a serialization or date-time issue per-se but rather a borland feature. Perhaps it would better added to the document which which describes hints for using the borland compiler with boost. Robert Ramey Jeff Garland wrote:
On Thu, 17 Mar 2005 19:48:39 +0000, Russell Hind wrote
Pablo Aguilar has found the issue with serializing ptimes and bcc32. The serialize functions work fine, unless you pre-compile the serialization headers and not the time_serialize.hpp header. This leads to the error
...snip detail
The solution is to either not pre-compile any of the serialization stuff or add time_serialize.hpp to the pre-compiled list also.
So looks like nothing for you to fix for 1.33 :) (Unless you want to add a note about this to the docs)
Will indeed add a note to the docs -- thx to you and Pablo for the assist!
Jeff _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Thu, 17 Mar 2005 18:40:48 -0800, Robert Ramey wrote
It would seem to me that this is not a serialization or date-time issue per-se but rather a borland feature.
True.
Perhaps it would better added to the document which which describes hints for using the borland compiler with boost.
AFAIK no such document exists.... Jeff

www.boost.org/\more/borland_cpp.html Jeff Garland wrote:
On Thu, 17 Mar 2005 18:40:48 -0800, Robert Ramey wrote
It would seem to me that this is not a serialization or date-time issue per-se but rather a borland feature.
True.
Perhaps it would better added to the document which which describes hints for using the borland compiler with boost.
AFAIK no such document exists....
Jeff
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

"Russell Hind" <rh_gmane@mac.com> wrote in message news:d1cmt9$b7h$1@sea.gmane.org...
Jeff Garland wrote:
Ok -- added to the 1.33 todo list -- although 5.6.4 looks a bit shaky from a serialization lib point of view. A bunch of the archive tests are marked as failing. Anyway, we will turn on the regression tests soon. Of course there's some date_time limits as well w.r.t. output on 5.6.4.
Hi Jeff,
Pablo Aguilar has found the issue with serializing ptimes and bcc32. The serialize functions work fine, unless you pre-compile the serialization headers and not the time_serialize.hpp header. This leads to the error
[C++ Error] serialization.hpp(121): E2015 Ambiguity between 'boost::serialization::void serialize<boost::archive::text_oarchive>(boost::archive::text_oarchive &,boost::posix_time::ptime &,const unsigned int)' and 'boost::serialization::void serialize<boost::archive::text_oarchive,boost::posix_time::ptime>(boost::archive::text_oarchive &,boost::posix_time::ptime &,const unsigned int)'
The solution is to either not pre-compile any of the serialization stuff or add time_serialize.hpp to the pre-compiled list also.
So looks like nothing for you to fix for 1.33 :) (Unless you want to add a note about this to the docs)
Thanks
Russell
I was going to post about this but you beat me to it! There's one last catch (which I had to go through) to get this to work. I did as Russel suggested, and put everything in the PCH, only to find out I'd tried that before but had gotten the error "initialized data something, can't create PCH". The error came from including "locale" in the PCH also (I guess string pulls it in, I don't know, didn't bother looking). So, after changing out of the "library is right, I must be doing something wrong" mode, I found that "locale" missdetects the borland compiler, it has an #ifdef __BORLANDC where it should've been __BORLANDC__ Since I'm using BCB6 straight out of the box + update pack 4, I'm guessing other people might run into the same thing, so I think it should be mentioned in the docs Robert R./Jeff G. said they'd include, even though it's not a boost specific issue. Hope this helps Pablo

Pablo Aguilar wrote:
There's one last catch (which I had to go through) to get this to work. I did as Russel suggested, and put everything in the PCH, only to find out I'd tried that before but had gotten the error "initialized data something, can't create PCH". The error came from including "locale" in the PCH also (I guess string pulls it in, I don't know, didn't bother looking).
So, after changing out of the "library is right, I must be doing something wrong" mode, I found that "locale" missdetects the borland compiler, it has an #ifdef __BORLANDC
where it should've been __BORLANDC__
I had seen this error, by when I adjusted the order of includes for the pre-compiled headers, it went away. I'll change our locale header too. Thanks again Russell
participants (4)
-
Jeff Garland
-
Pablo Aguilar
-
Robert Ramey
-
Russell Hind