Boost C++ Libraries: Ticket #12205: FTBFS boost.serialization 1.61: undefined reference to boost::archive::codecvt_null<wchar_t> https://svn.boost.org/trac10/ticket/12205 <p> hello, </p> <p> I cannot compile boost 1.61 (1.60 is fine with the same setup): </p> <pre class="wiki">boost/archive/codecvt_null.hpp:93: undefined reference to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt; </pre><p> The incriminated package seems serialization, as it goes on with '--without-serialization' flag. </p> <p> The setup is mingw-w64 on linux, with gcc 6.1. </p> <p> See full log attached. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12205 Trac 1.4.3 xantares Sat, 14 May 2016 13:19:26 GMT <link>https://svn.boost.org/trac10/ticket/12205#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:1</guid> <description> <p> Log was too big: </p> <pre class="wiki">Performing configuration checks - 32-bit : yes - arm : no - mips1 : no - power : no - sparc : no - x86 : yes - symlinks supported : yes - C++11 mutex : yes - has_icu builds : no - zlib : yes - iconv (libc) : no - iconv (separate) : yes - icu : no - icu (lib64) : no - g++ -shared-* supported : no - compiler-supports-visibility : yes - message-compiler : no - compiler-supports-ssse3 : yes - compiler-supports-avx2 : yes - gcc visibility : yes - long double support : yes - zlib : yes Component configuration: - atomic : building - chrono : building - container : building - context : building - coroutine : building - coroutine2 : building - date_time : building - exception : building - filesystem : building - graph : building - graph_parallel : not building - iostreams : building - locale : building - log : building - math : building - metaparse : building - mpi : not building - program_options : building - python : not building - random : building - regex : building - serialization : building - signals : building - system : building - test : building - thread : building - timer : building - type_erasure : building - wave : building </pre><pre class="wiki">bin.v2/libs/serialization/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/basic_text_wiprimitive.o: In function `ZN5boost7archive12codecvt_nullIwED4Ev': /home/xantares/projects/aur-scripts/mingw-w64-boost/src/build-i686-w64-mingw32/./boost/archive/codecvt_null.hpp:95: undefined reference to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt;' /home/xantares/projects/aur-scripts/mingw-w64-boost/src/build-i686-w64-mingw32/./boost/archive/codecvt_null.hpp:95: undefined reference to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt;' bin.v2/libs/serialization/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/basic_text_wiprimitive.o: In function `ZN5boost7archive12codecvt_nullIwEC4Ej': /home/xantares/projects/aur-scripts/mingw-w64-boost/src/build-i686-w64-mingw32/./boost/archive/codecvt_null.hpp:93: undefined reference to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt;' bin.v2/libs/serialization/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/basic_text_wiprimitive.o: In function `ZN5boost7archive12codecvt_nullIwED4Ev': /home/xantares/projects/aur-scripts/mingw-w64-boost/src/build-i686-w64-mingw32/./boost/archive/codecvt_null.hpp:95: undefined reference to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt;' bin.v2/libs/serialization/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/basic_text_wiprimitive.o: In function `ZN5boost7archive12codecvt_nullIwEC4Ej': /home/xantares/projects/aur-scripts/mingw-w64-boost/src/build-i686-w64-mingw32/./boost/archive/codecvt_null.hpp:93: undefined reference to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt;' bin.v2/libs/serialization/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/basic_text_wiprimitive.o:/home/xantares/projects/aur-scripts/mingw-w64-boost/src/build-i686-w64-mingw32/./boost/archive/codecvt_null.hpp:95: more undefined references to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt;' follow collect2: error: ld returned 1 exit status ...removing bin.v2/libs/serialization/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/libboost_wserialization-mt.dll.a ...skipped &lt;p/home/xantares/projects/aur-scripts/mingw-w64-boost/pkg/mingw-w64-boost/usr/i686-w64-mingw32/lib&gt;libboost_wserialization-mt.dll for lack of &lt;pbin.v2/libs/serialization/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi&gt;libboost_wserialization-mt.dll... gcc.compile.c++ bin.v2/libs/signals/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/connection.o "i686-w64-mingw32-g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -march=i686 -mthreads -m32 -std=c++11 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -DBOOST_ALL_NO_LIB=1 -DBOOST_SIGNALS_DYN_LINK=1 -DBOOST_SIGNALS_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/signals/build/gcc-mingw-mingw64/release/target-os-windows/threading-multi/connection.o" "libs/signals/src/connection.cpp" </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 14 May 2016 13:40:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:2</guid> <description> <p> Could it be related to <a class="ext-link" href="https://github.com/boostorg/serialization/pull/31"><span class="icon">​</span>https://github.com/boostorg/serialization/pull/31</a> ? Or <a class="ext-link" href="https://github.com/boostorg/serialization/commit/a64bf6e4d55970dbc7b92e9fcbdd596cdbc32564"><span class="icon">​</span>https://github.com/boostorg/serialization/commit/a64bf6e4d55970dbc7b92e9fcbdd596cdbc32564</a> ? </p> <p> If I move codecvt_null to WSOURCES to compilation continues, but in that case maybe BOOST_ARCHIVE_DECL should be changed to BOOST_WARCHIVE_DECL. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>xantares</dc:creator> <pubDate>Sat, 14 May 2016 13:53:49 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:3</guid> <description> <p> In 1.61 and develop branch, codecvt_null is compiled in archive: <a class="ext-link" href="https://github.com/boostorg/serialization/blob/develop/build/Jamfile.v2"><span class="icon">​</span>https://github.com/boostorg/serialization/blob/develop/build/Jamfile.v2</a> whereas in codecvt_null.hpp uses BOOST_WARCHIVE_DECL: <a class="ext-link" href="https://github.com/boostorg/serialization/blob/develop/include/boost/archive/codecvt_null.hpp"><span class="icon">​</span>https://github.com/boostorg/serialization/blob/develop/include/boost/archive/codecvt_null.hpp</a> </p> <p> If I move codecvt_null from SOURCES to WSOURCES in Jamfile.v2, the build passes. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>xantares</dc:creator> <pubDate>Sat, 14 May 2016 14:13:56 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:4</guid> <description> <p> If I replace BOOST_WARCHIVE_DECL by BOOST_ARCHIVE_DECL it works too. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>xantares</dc:creator> <pubDate>Sat, 14 May 2016 14:15:29 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:5</guid> <description> <p> Ah nope, ignore the last comment. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>xantares</dc:creator> <pubDate>Sat, 14 May 2016 14:17:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:6</guid> <description> <p> <a class="ext-link" href="https://github.com/boostorg/serialization/pull/42"><span class="icon">​</span>https://github.com/boostorg/serialization/pull/42</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 21 May 2016 10:02:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:7</guid> <description> <p> +1, same on Windows for Mingw-w64 <strong>&lt;Debug,Release&gt;+shared</strong> configurations; not reproduced for ICC or MSVC. </p> <p> with <a class="ext-link" href="https://github.com/boostorg/serialization/pull/42"><span class="icon">​</span>PR: #42</a> applied, build error gone for <strong>Release+shared</strong> configuration only, while still reproduce for <strong>Debug+shared</strong>. </p> </description> <category>Ticket</category> </item> <item> <author>sav_ix@…</author> <pubDate>Tue, 22 Aug 2017 12:15:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:8</guid> <description> <p> reproduced for <a class="ext-link" href="https://dl.bintray.com/boostorg/release/1.65.0/source/boost_1_65_0.tar.gz"><span class="icon">​</span>Boost-1.65.0</a> builds too. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Fri, 08 Sep 2017 14:54:26 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:9 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:9</guid> <description> <p> I can reproduce this with an appveyor build of uuid, which depends on serialization: </p> <p> <a class="ext-link" href="https://ci.appveyor.com/project/jeking3/uuid/build/job/8h9yd8425mydtaqt"><span class="icon">​</span>https://ci.appveyor.com/project/jeking3/uuid/build/job/8h9yd8425mydtaqt</a> </p> <p> PR with the appveyor file: </p> <p> <a class="ext-link" href="https://github.com/boostorg/uuid/pull/27"><span class="icon">​</span>https://github.com/boostorg/uuid/pull/27</a> </p> <p> Also this looks a lot like <a class="assigned ticket" href="https://svn.boost.org/trac10/ticket/12741" title="#12741: Bugs: Linker error in cross compiling with x86_64-w64-mingw32-g++ (assigned)">#12741</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>James E. King, III</dc:creator> <pubDate>Fri, 08 Sep 2017 15:05:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:10 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:10</guid> <description> <p> I am also able to reproduce this locally by installing msys2 and then running the build like: </p> <blockquote> <p> Jim.King@Jking-P70 MINGW64 /c/boost/libs/serialization $ ../../b2.exe test toolset=gcc </p> </blockquote> <p> gcc.link ..\..\bin.v2\libs\serialization\test\test_bitset_text_archive.test\gcc- mingw-6.3.0\debug\test_bitset_text_archive.exe ..\..\bin.v2\libs\serialization\test\test_bitset_text_archive.test\gcc-mingw-6.3 .0\debug\test_bitset.o:test_bitset.cpp:(.rdata$.refptr._ZTVN5boost7archive12code cvt_nullIwEE[.refptr._ZTVN5boost7archive12codecvt_nullIwEE]+0x0): undefined refe rence to `vtable for boost::archive::codecvt_null&lt;wchar_t&gt;' collect2.exe: error: ld returned 1 exit status </p> </description> <category>Ticket</category> </item> <item> <author>hanetzer@…</author> <pubDate>Tue, 17 Oct 2017 02:42:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:11 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:11</guid> <description> <p> Still a problem in boost-1.65.1 on with mingw-w64/gcc-6.4.0 on gentoo. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sun, 26 Nov 2017 18:42:05 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12205#comment:12 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12205#comment:12</guid> <description> <p> Still a problem in boost-1.65.1 on with mingw32/gcc 6.3.0 on Windows 7 </p> </description> <category>Ticket</category> </item> </channel> </rss>