Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] does not compile on PPC or Intel Macwith architecture=combined
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-11-18 12:18:56


Philipp Münzel wrote:
> Hi folks,
>
> the build of serialization in boost 1.44 fails when compiling for PPC
> Mac.
>
> On a native Power PC with gcc 4.0.1 the build fails:
>
> darwin.compile.c++
> bin.v2/libs/serialization/build/darwin-4.0.1/release/link-static/
> threading-multi/basic_xml_archive.o
> darwin.compile.c++
> bin.v2/libs/serialization/build/darwin-4.0.1/release/link-static/
> threading-multi/binary_iarchive.o
> ./boost/archive/basic_binary_iarchive.hpp:74: error: invalid
> application of 'sizeof' to incomplete type
> 'boost::STATIC_ASSERTION_FAILURE<false>'
>
> "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline
> -Wall -no-cpp-precomp -gdwarf-2 -Wno-long-double -DBOOST_ALL_NO_LIB=1
> -DNDEBUG -I"." -c -o
> "bin.v2/libs/serialization/build/darwin-4.0.1/release/link-static/
> threading-multi/binary_iarchive.o"
> "libs/serialization/src/binary_iarchive.cpp"
>
> ...failed darwin.compile.c++
> bin.v2/libs/serialization/build/darwin-4.0.1/release/link-static/
> threading-multi/binary_iarchive.o...
> ...failed updating 1 target...
> ...updated 74 targets...
>
>
>
> On an Intel Mac, with OSX 10.5 and gcc 4.2.1 the build fails when
> architecture=combined is added to the bjam command:
>
> bin.v2/libs/serialization/build/darwin-4.2.1/release/
> architecture-combined/link-static/threading-multi/binary_iarchive.o
> In file included from ./boost/archive/binary_iarchive_impl.hpp:22,
> from ./boost/archive/binary_iarchive.hpp:20,
> from libs/serialization/src/binary_iarchive.cpp:14:
> ./boost/archive/basic_binary_iarchive.hpp:74: error:
> invalid application of 'sizeof' to incomplete
> type 'boost::STATIC_ASSERTION_FAILURE<false>'
> lipo: can't figure out the architecture type of:
> /var/tmp//cc5y68Un.out
>
> "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall
> -no-cpp-precomp -gdwarf-2 -arch i386 -arch ppc -DBOOST_ALL_NO_LIB=1
> -DNDEBUG -I"." -c -o
> "bin.v2/libs/serialization/build/darwin-4.2.1/release/architecture-
> combined/link-static/threading-multi/binary_iarchive.o"
> "libs/serialization/src/binary_iarchive.cpp"
>
> ...failed darwin.compile.c++
> bin.v2/libs/serialization/build/darwin-4.2.1/release/architecture-
> combined/link-static/threading-multi/binary_iarchive.o...
> ...failed updating 1 target...
> ...updated 96 targets...
>
>
> When using bjam without architecture=combined on an Intel Mac,
> the build succeeds.
>
> That makes boost.serialization unusable on PCC, because it can neither
> be build native, nor for a universal binary.
>
> I wonder how this could slip through the rigid testing
> procedures of boost...

OK - I can fix this, I'll upload the change to the trunk

The fix consists of eliminating the line 75 in
./boost/archive/basic_binary_iarchive.hpp
BOOST_STATIC_ASSERT(sizeof(tracking_type) == sizeof(bool));

For now you could just edit your own copy.

Note that this configuration is not explicitly tested by boost. maybe you
want to become a boost tester for it. This would guarentee that in the
future your configuration would be "pre-tested" for you.

Robert Ramey


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