[Serialization] 1.49 to 1.55 problems
I did search for "serialization incompatible version" on Google and found issues regarding certain older versions. I checked the release notes as far back as were on the web site, and didn't see anything. I tried building a program with Boost 1.55, and found it would not interoperate with existing programs that were built with Boost 1.49. Taking the error at face value, I need to configure the code to write the old version. How would I do that? —John
Can someone please point me in the right direction for help with this? I don't believe there is a separate mailing list, but I thought there was a thriving user base of Boost.Serialization users. On 1/13/2014 4:19 PM, John M. Dlugosz wrote:
I did search for "serialization incompatible version" on Google and found issues regarding certain older versions. I checked the release notes as far back as were on the web site, and didn't see anything.
I tried building a program with Boost 1.55, and found it would not interoperate with existing programs that were built with Boost 1.49. Taking the error at face value, I need to configure the code to write the old version. How would I do that?
—John
On 16 Jan 2014, at 06:50, John M. Dlugosz
Can someone please point me in the right direction for help with this? I don't believe there is a separate mailing list, but I thought there was a thriving user base of Boost.Serialization users.
I encountered the same problem a few years ago when we had implemented a simple protocol based on serialization and asio, and upgraded boost on the server builds. As I understand it, serialization is only designed to be backwards compatible, that is the newer versions can read the older data, but not the other way around. At the time the only solution was to keep boost the same on both ends. We ended up switching to Lua as our serialization format. However the todo page now makes it sound more promising: http://www.boost.org/doc/libs/1_55_0/libs/serialization/doc/todo.html#backve... Thanks, Kevin
On 01/13/2014 11:19 PM, John M. Dlugosz wrote:
I tried building a program with Boost 1.55, and found it would not interoperate with existing programs that were built with Boost 1.49. Taking the error at face value, I need to configure the code to write the old version. How would I do that?
Which archive are you using?
On 01/20/2014 10:15 AM, John M. Dlugosz wrote:
On 1/16/2014 3:39 AM, Bjorn Reese wrote:
Which archive are you using?
I'm not sure what you are asking.
With Boost.Serialization you need two things: First, you have to annotate your code with the serialize function (or load/save). This creates a mapping between the C++ variables and the serialized data. Second, you have to use an archive to perform the serialization. The are various archives for different formats, such as text, binary, or XML. You can even write your own archives in case you need to serialize to other formats (e.g. JSON or ProtocolBuffer.) The answer to your question depends on what achive you have used to serialize the data. Not all of them are backwardscompatible.
The code base in question contains uses of boost::archive::basic_binary_iprimitive, and I believe the code cares about integers only, not floating point.
Looks like you are using the binary archives, which are not backwardscompatible. If the serialized data is stored in files, it may be an idea to build a conversion tool with Boost 1.49 that reads the binary format into, say, the portable_binary achives found in the example directory. If not, then you may have to copy the Boost 1.49 binary archives into your own namespace, and use that instead. Not sure how feasible this is.
participants (4)
-
Bjorn Reese
-
John M. Dlugosz
-
John M. Dlugosz
-
Kevin Martin