Boost logo

Boost :

From: Bernd Speiser (bernd.speiser_at_[hidden])
Date: 2008-03-23 15:44:44


Dear all,

I apologize for cross-posting (part of this was already reported on
boost-users), but maybe this list is better suited for the problem. I
also have some additional information from some more experimentation.

Here are the facts:

(1) We use several machines for development, all under openSuSE 10.2,
some of them 32-, some 64-bit systems. Recently, we have installed gcc
4.3.0. We employ several boost libraries, most notably serialization.

(2) boost 1.35.0 (RC2) compiles and installs fine on 32-bit with gcc
4.3.0. Serialization code works fine, as far as we use it.

(3) On the 64-bit system, however, version 1.35.0 does not compile with
gcc 4.3.0:

MkDir1 bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi
gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/polymorphic_iarchive.o
In file included from libs/serialization/src/polymorphic_iarchive.cpp:18:
./boost/archive/polymorphic_iarchive.hpp:88: error: ‘virtual void
boost::archive::polymorphic_iarchive_impl::load(int64_t&)’ cannot be
overloaded
./boost/archive/polymorphic_iarchive.hpp:84: error: with ‘virtual void
boost::archive::polymorphic_iarchive_impl::load(long int&)’
./boost/archive/polymorphic_iarchive.hpp:89: error: ‘virtual void
boost::archive::polymorphic_iarchive_impl::load(uint64_t&)’ cannot be
overloaded
./boost/archive/polymorphic_iarchive.hpp:85: error: with ‘virtual void
boost::archive::polymorphic_iarchive_impl::load(long unsigned int&)’

      "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC -pthread
   -DBOOST_ALL_NO_LIB=1 -DBOOST_SERIALIZATION_DYN_LINK=1 -I"." -c -o
"bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/polymorphic_iarchive.o"

"libs/serialization/src/polymorphic_iarchive.cpp"

...failed gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/polymorphic_iarchive.o...
gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/polymorphic_oarchive.o
In file included from libs/serialization/src/polymorphic_oarchive.cpp:18:
./boost/archive/polymorphic_oarchive.hpp:86: error: ‘virtual void
boost::archive::polymorphic_oarchive_impl::save(int64_t)’ cannot be
overloaded
./boost/archive/polymorphic_oarchive.hpp:83: error: with ‘virtual void
boost::archive::polymorphic_oarchive_impl::save(long int)’
./boost/archive/polymorphic_oarchive.hpp:87: error: ‘virtual void
boost::archive::polymorphic_oarchive_impl::save(uint64_t)’ cannot be
overloaded
./boost/archive/polymorphic_oarchive.hpp:84: error: with ‘virtual void
boost::archive::polymorphic_oarchive_impl::save(long unsigned int)’

      "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -fPIC -pthread
   -DBOOST_ALL_NO_LIB=1 -DBOOST_SERIALIZATION_DYN_LINK=1 -I"." -c -o
"bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/polymorphic_oarchive.o"

"libs/serialization/src/polymorphic_oarchive.cpp"

...failed gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/polymorphic_oarchive.o...
gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/stl_port.o
gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/text_iarchive.o
gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/text_oarchive.o
gcc.compile.c++
bin.v2/libs/serialization/build/gcc-4.3.0/debug/threading-multi/void_cast.o

(4) Moreover, when compiling (on a 64-bit machine; on 32-bit this is ok)
our application code with boost 1.34.1 and gcc 4.3.0, as soon as we
#include "boost/serialization/vector.hpp" (even without using any
serialization functionality)

we receive error messages:
/usr/local/include/boost-1_34_1/boost/serialization/vector.hpp:126:
error: redefinition of 'struct
boost::serialization::implementation_level<std::vector<long int,
std::allocator<long int> > >'

/usr/local/include/boost-1_34_1/boost/serialization/vector.hpp:126:
error: previous definition of 'struct
boost::serialization::implementation_level<std::vector<long int,
std::allocator<long int> > >'

/usr/local/include/boost-1_34_1/boost/serialization/vector.hpp:126:
error: redefinition of 'struct
boost::serialization::implementation_level<std::vector<long unsigned
int, std::allocator<long unsigned int> > >'

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

On the same machine the code compiles well with boost 1.33.1. Note
that 1.34.1 was compiled with an earlier gcc version.

Best regards
Bernd

-- 
=======================================================================
Bernd Speiser
Institut für Organische Chemie
Auf der Morgenstelle 18
temporary address: Auf der Morgenstelle 15
D-72076 Tübingen
Germany
phone: +49-7071-2976205 (office) +49-7071-2976242 (laboratory)
        +49-7071-2972098 (secretary)
fax:   +49-7071-295518
e-mail: bernd.speiser_at_[hidden]
Internet: http://www.uni-tuebingen.de/speiser
=======================================================================

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk