Boost C++ Libraries: Ticket #11548: Crosscompiling 1.59 with i686-w64-mingw32-g++ fails https://svn.boost.org/trac10/ticket/11548 <p> Using </p> <blockquote> <p> using gcc : i686 : i686-w64-mingw32-g++ ; </p> </blockquote> <p> in tools/build/src/user-config.jam </p> <p> with i686-w64-mingw32-g++ (GCC) 4.8.2 </p> <p> and calling </p> <p> ./b2 toolset=gcc-i686 address-model=32 link=shared --stagedir=Win32 target-os=windows threading=multi threadapi=win32 variant=release --with-date_time --with-filesystem --with-graph --with-math --with-program_options --with-serialization --with-system --with-thread --with-timer </p> <p> gives compiler errors </p> <p> gcc.compile.c++ bin.v2/libs/serialization/build/gcc-mingw-i686/release/target-os-windows/threadapi-win32/threading-multi/text_woarchive.o In file included from ./boost/archive/detail/common_oarchive.hpp:21:0, </p> <blockquote> <p> from ./boost/archive/basic_text_oarchive.hpp:29, from ./boost/archive/text_woarchive.hpp:36, from libs/serialization/src/text_woarchive.cpp:17: </p> </blockquote> <p> ./boost/archive/detail/basic_oarchive.hpp:64:5: error: function ‘boost::archive::detail::helper_collection&amp; boost::archive::detail::basic_oarchive::get_helper_collection()’ definition is marked dllimport </p> <blockquote> <p> get_helper_collection(){ <sup> </sup></p> </blockquote> <p> In file included from ./boost/archive/detail/common_oarchive.hpp:22:0, </p> <blockquote> <p> from ./boost/archive/basic_text_oarchive.hpp:29, from ./boost/archive/text_woarchive.hpp:36, from libs/serialization/src/text_woarchive.cpp:17: </p> </blockquote> <p> ./boost/archive/detail/interface_oarchive.hpp:32:38: warning: type attributes ignored after type is already defined [-Wattributes] </p> <blockquote> <p> class BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_pointer_oserializer; </p> <blockquote> <p> <sup> </sup></p> </blockquote> </blockquote> <p> Crosscompiling 64bit version with x86_64-w64-mingw32-g++ (GCC) 4.8.2 also fails. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11548 Trac 1.4.3 zimmermann@… Thu, 20 Aug 2015 06:38:30 GMT <link>https://svn.boost.org/trac10/ticket/11548#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11548#comment:1</guid> <description> <p> This patch resolves this problem: </p> <pre class="wiki">--- a/include/boost/archive/detail/basic_oarchive.hpp +++ b/include/boost/archive/detail/basic_oarchive.hpp @@ -60,7 +60,7 @@ class BOOST_SYMBOL_VISIBLE basic_oarchive : virtual void vsave(const tracking_type t) = 0; protected: BOOST_ARCHIVE_DECL basic_oarchive(unsigned int flags = 0); - BOOST_ARCHIVE_DECL boost::archive::detail::helper_collection &amp; + virtual boost::archive::detail::helper_collection &amp; get_helper_collection(){ return *this; } </pre> </description> <category>Ticket</category> </item> <item> <author>zimmermann@…</author> <pubDate>Thu, 20 Aug 2015 06:44:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11548#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11548#comment:2</guid> <description> <p> With the above patch compiling works, but there is a linking error: </p> <pre class="wiki">gcc.link.dll bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/libboost_wserialization.dll.a bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/basic_text_wiprimitive.o:basic_text_wiprimitive.cpp:(.text$_ZN5boost13serialization15throw_exceptionINS_7archive17archive_exceptionEEEvRKT_[_ZN5boost13serialization15throw_exceptionINS_7archive17archive_exceptionEEEvRKT_]+0x19): Nicht definierter Verweis auf `vtable for boost::archive::archive_exception' bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/xml_wgrammar.o:xml_wgrammar.cpp:(.rdata$_ZTCN5boost7archive21xml_archive_exceptionE8_NS0_17archive_exceptionE[_ZTCN5boost7archive21xml_archive_exceptionE8_NS0_17archive_exceptionE]+0x60): Nicht definierter Verweis auf `virtual thunk to boost::archive::archive_exception::~archive_exception()' bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/xml_wgrammar.o:xml_wgrammar.cpp:(.rdata$_ZTCN5boost7archive21xml_archive_exceptionE8_NS0_17archive_exceptionE[_ZTCN5boost7archive21xml_archive_exceptionE8_NS0_17archive_exceptionE]+0x68): Nicht definierter Verweis auf `virtual thunk to boost::archive::archive_exception::~archive_exception()' /usr/bin/x86_64-w64-mingw32-ld: bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/xml_wgrammar.o: Falsche Verschiebungsadresse 0x68 in Abschnitt `.rdata$_ZTCN5boost7archive21xml_archive_exceptionE8_NS0_17archive_exceptionE[_ZTCN5boost7archive21xml_archive_exceptionE8_NS0_17archive_exceptionE]' </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 26 Aug 2015 05:38:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11548#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11548#comment:3</guid> <description> <p> I am facing the same error. </p> <p> There is a "fix" (pull request) here: <a class="ext-link" href="https://github.com/boostorg/serialization/pull/19"><span class="icon">​</span>https://github.com/boostorg/serialization/pull/19</a> </p> <p> (But I cannot get the sources from that page?!) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Kohei Takahashi</dc:creator> <pubDate>Fri, 18 Nov 2016 10:27:42 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/11548#comment:4 https://svn.boost.org/trac10/ticket/11548#comment:4 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket