Modify

Ticket #1857 (closed Bugs: fixed)

Opened 6 years ago

Last modified 5 years ago

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: 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

Attachments

Change History

comment:1 Changed 6 years ago by ramey

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 follow-up: ↓ 3 Changed 6 years ago by ramey

  • Status changed from new to assigned

comment:3 in reply to: ↑ 2 Changed 6 years ago by anonymous

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 follow-up: ↓ 6 Changed 6 years ago by ramey

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

Robert Ramey

comment:5 Changed 6 years ago by ramey

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:6 in reply to: ↑ 4 Changed 6 years ago by jlp@…

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 Changed 6 years ago by stefaan.deroeck@…

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

comment:8 Changed 6 years ago by f.a.oliehoek@…

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 follow-up: ↓ 10 Changed 6 years ago by fa.oliehoek@…

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!

comment:10 in reply to: ↑ 9 Changed 5 years ago by gary.mirams@…

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!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.