Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#1857 closed Bugs (fixed)

IA64, GCC 4.3, redefinition of 'struct boost::serialization::implementation_level<std::vector<long int, std::allocator<long int> > >'

Reported by: Stefan Eckardt Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

Hi,

I get the following error message compiling with gcc 4.3.0 on ia64:

/usr/local/include/boost/serialization/vector.hpp:185: error: redefinition of 'struct boost::serialization::implementation_level<std::vector<long int, std::allocator<long int> > >'
/usr/local/include/boost/serialization/vector.hpp:185: error: previous definition of 'struct boost::serialization::implementation_level<std::vector<long int, std::allocator<long int> > >'
/usr/local/include/boost/serialization/vector.hpp:185: error: redefinition of 'struct boost::serialization::implementation_level<std::vector<long unsigned int, std::allocator<long unsigned int> > >'
/usr/local/include/boost/serialization/vector.hpp:185: error: previous definition of 'struct boost::serialization::implementation_level<std::vector<long unsigned int, std::allocator<long unsigned int> > >'

This error can be reproduced with this small example

#include <boost/serialization/vector.hpp>
int main()
{
	return 0;
}

Removing the lines

    BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(signed long, C)     \
    BOOST_SERIALIZATION_COLLECTION_TRAITS_HELPER(unsigned long, C)   \

from boost/serialization/collection_traits.hpp solves this problem for me.

Thanks for considering this issue.

Stefan

Change History (10)

comment:1 by Robert Ramey, 14 years ago

Hmmmmmm - I don't think removing the above lines is a great idea. This would make your archives which use vectors unusable for programs built with a different compiler.

This needs to be investigated some more. Is it possible that on this compiler "long int" is a synonym for some other type such that is also in the list? e.g int64_t ?

As I said - needs more consideration.

Robert Ramey

comment:2 by Robert Ramey, 14 years ago

Status: newassigned

in reply to:  2 comment:3 by anonymous, 14 years ago

Replying to ramey:

You could test it by moving the declaration of line 185 to the front. Then the "bad" declarations should cause the error.

comment:4 by Robert Ramey, 14 years ago

I think this has been addressed by fixing another problem. We'll keep an eye on it.

Robert Ramey

comment:5 by Robert Ramey, 14 years ago

Resolution: fixed
Status: assignedclosed

in reply to:  4 comment:6 by jlp@…, 14 years ago

Replying to ramey:

I think this has been addressed by fixing another problem. We'll keep an eye on it.

I have this same problem with GCC 4.3.1 on AMD64 on Linux and I would like to ask you which one was the other fix so I can test it here.

comment:7 by stefaan.deroeck@…, 14 years ago

But it seems this was already fixed in the 1.36 release, my apologies. I should have been more thorough.

comment:8 by f.a.oliehoek@…, 14 years ago

Hi,

I am a bit confused here. What exactly was fixed "I think this has been addressed by fixing another problem" ? Is there a simple way to get it working on my current debian/lenny distro on AMD64? Should I follow the advise of Stefan Eckardt?

(versions that are currently installed: ii libboost-serialization1.34.1 1.34.1-11 serialization library for C++ ii g++ 4:4.3.2-2 The GNU C++ compiler )

Or will version 1.34/35 simply not work? And is the only solution to upgrade to 1.36? (something I'd rather not do, as I've had bad experiences with upgrading to new boost versions)

Thanks, Frans

comment:9 by fa.oliehoek@…, 14 years ago

p.s.: It seems that the problem hit me since the gcc upgrade:

[2008-10-06] gcc-4.3 4.3.2-1 MIGRATED to testing (Britney) http://packages.qa.debian.org/g/gcc-4.3.html

Thanks!

in reply to:  9 comment:10 by gary.mirams@…, 13 years ago

See this website for a quick fix: http://www.nabble.com/-usr-include-boost-serialization-vector.hpp:126:-error:-td20801412.html

Replying to fa.oliehoek@uva.nl:

p.s.: It seems that the problem hit me since the gcc upgrade:

[2008-10-06] gcc-4.3 4.3.2-1 MIGRATED to testing (Britney) http://packages.qa.debian.org/g/gcc-4.3.html

Thanks!

Note: See TracTickets for help on using tickets.