Boost logo

Boost Users :

From: Michael Klemm (michael.klemm_at_[hidden])
Date: 2006-10-18 05:12:46


Hey there!

We have trouble compiling our project with Boost 1.33 (as of SuSE 10.1).
We tried to compile our project, which uses the serialization
capabilities of Boost to serialize C++ objects into MPI messages. On
IA32, everything works fine with Boost 1.34-rc1 (Debian, kernel 2.6.15.7).

However, on my AMD machine with SuSE 10.1 and Boost 1.33, we get linker
errors related to multiple definitions of templates:

> /proj.stand/klemm/evolFIR-MPI/src/share/Component.o:/proj.stand/klemm/evolFIR-MPI/src/Component.cpp:24: multiple definition of `boost::archive::det
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/DelayOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<co
> /proj.stand/klemm/evolFIR-MPI/src/DelayOperator.cpp:25: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/DelayOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<co
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/DelayOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<co
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/Iterator.o:/usr/include/boost/serialization/export.hpp:194: multiple definition of `boost::archive::detail:
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynom.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const
> /proj.stand/klemm/evolFIR-MPI/src/MapPolynom.cpp:202: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynom.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const
> /proj.stand/klemm/evolFIR-MPI/src/MapPolynom.cpp:204: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynom.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynomIterator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pa
> /usr/include/boost/serialization/export.hpp:194: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynomIterator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pa
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynomIterator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pa

The full log of errors is at the end of this message. The command used
for linking is:

/opt/mpich/ch-p4//bin/mpiCC -shared
/proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o
/proj.stand/klemm/evolFIR-MPI/src/share/Component.o
/proj.stand/klemm/evolFIR-MPI/src/share/DelayOperator.o
/proj.stand/klemm/evolFIR-MPI/src/share/Iterator.o
/proj.stand/klemm/evolFIR-MPI/src/share/MapPolynom.o
/proj.stand/klemm/evolFIR-MPI/src/share/MapPolynomIterator.o
/proj.stand/klemm/evolFIR-MPI/src/share/MulOperator.o
/proj.stand/klemm/evolFIR-MPI/src/share/Operator.o
/proj.stand/klemm/evolFIR-MPI/src/share/PolyNormalizator.o
/proj.stand/klemm/evolFIR-MPI/src/share/Polynom.o
/proj.stand/klemm/evolFIR-MPI/src/share/ShiftOperator.o
/proj.stand/klemm/evolFIR-MPI/src/share/XExtractor.o
/proj.stand/klemm/evolFIR-MPI/src/share/NTLAdaptor.o
/proj.stand/klemm/evolFIR-MPI/src/share/polycommon.o
/proj.stand/klemm/evolFIR-MPI/src/share/RandomNumberPool.o -o
/proj.stand/klemm/evolFIR-MPI//lib/libpoly.so

Replacing mpiCC with g++ does not help either (and on IA32 this command
works well).

I also tried to use a self-compiled version of Boost on the AMD (Boost
1.34-rc1) but it showed the same compiler errors.

I don't think it's a problem with our program, as in IA32 everything
works as expected. Any hints? Thanks in advance!

Best regards
      -michael

Full log or error messages:

> proj.stand/klemm/evolFIR-MPI/src/share/Component.o:/proj.stand/klemm/evolFIR-MPI/src/Component.cpp:24: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/DelayOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /proj.stand/klemm/evolFIR-MPI/src/DelayOperator.cpp:25: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/DelayOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/DelayOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/Iterator.o:/usr/include/boost/serialization/export.hpp:194: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynom.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /proj.stand/klemm/evolFIR-MPI/src/MapPolynom.cpp:202: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynom.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /proj.stand/klemm/evolFIR-MPI/src/MapPolynom.cpp:204: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynom.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynomIterator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/serialization/export.hpp:194: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynomIterator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MapPolynomIterator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MulOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /proj.stand/klemm/evolFIR-MPI/src/MulOperator.cpp:255: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MulOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/MulOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/Operator.o:/proj.stand/klemm/evolFIR-MPI/src/Operator.cpp:14: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/Operator.o:/proj.stand/klemm/evolFIR-MPI/src/Operator.cpp:14: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/PolyNormalizator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /proj.stand/klemm/evolFIR-MPI/src/PolyNormalizator.cpp:22: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/PolyNormalizator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/PolyNormalizator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/Polynom.o:/proj.stand/klemm/evolFIR-MPI/include/Polynom.h:177: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/Polynom.o:/proj.stand/klemm/evolFIR-MPI/include/Polynom.h:177: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/ShiftOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /proj.stand/klemm/evolFIR-MPI/src/ShiftOperator.cpp:28: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/ShiftOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/ShiftOperator.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/XExtractor.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/serialization/export.hpp:194: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/XExtractor.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/XExtractor.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/NTLAdaptor.o: In function `NTLAdaptor':
> /proj.stand/klemm/evolFIR-MPI/src/NTLAdaptor.cpp:5: multiple definition of `boost::archive::detail::guid_initializer<Component>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/proj.stand/klemm/evolFIR-MPI/src/AddOperator.cpp:128: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/NTLAdaptor.o: In function `NTLAdaptor':
> /usr/include/boost/archive/detail/oserializer.hpp:148: multiple definition of `boost::archive::detail::guid_initializer<Polynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/boost/archive/detail/oserializer.hpp:148: first defined here
> /proj.stand/klemm/evolFIR-MPI/src/share/NTLAdaptor.o: In function `destroy<std::map<int, Component*, std::less<int>, std::allocator<std::pair<const int, Component*> > > >':
> /usr/include/c++/4.1.0/bits/stl_tree.h:1262: multiple definition of `boost::archive::detail::guid_initializer<MapPolynom>::instance'
> /proj.stand/klemm/evolFIR-MPI/src/share/AddOperator.o:/usr/include/c++/4.1.0/bits/stl_tree.h:1262: first defined here
> collect2: ld returned 1 exit status




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