Boost C++ Libraries: Ticket #13525: Boost Test 1.67.0: Compilation error with GCC 4.6.3 https://svn.boost.org/trac10/ticket/13525 <p> I was just testing 1.67.0 and ran into the following issue (1.66.0 works). Used compiler: g++ (<a class="missing wiki">Ubuntu/Linaro</a>?? 4.6.3-1ubuntu5) 4.6.3 </p> <p> Boost build commands: </p> <pre class="wiki">./bootstrap.sh --with-libraries=filesystem,exception,program_options,test,signals --prefix=/usr ./b2 link=shared runtime-link=shared optimization=speed variant=release cxxflags="-std=c++0x" install </pre><p> The error message: </p> <pre class="wiki">gcc.compile.c++ bin.v2/libs/test/build/gcc-4.6/release/link-static/threading-multi/test_main.o In file included from ./boost/test/unit_test_suite.hpp:18:0, from ./boost/test/impl/test_main.ipp:19, from libs/test/src/test_main.cpp:13: ./boost/test/tree/test_case_template.hpp: In constructor ‘boost::unit_test::ut_detail::template_test_case_gen&lt;TestCaseTemplate, std::tuple&lt;_Elements ...&gt; &gt;::template_test_case_gen(boost::unit_test::const_string, boost::unit_test::const_string, std::size_t)’: ./boost/test/tree/test_case_template.hpp:172:15: error: expected nested-name-specifier before ‘tuple_t’ ./boost/test/tree/test_case_template.hpp:172:15: error: ‘tuple_t’ has not been declared ./boost/test/tree/test_case_template.hpp:172:23: error: expected ‘;’ before ‘=’ token ./boost/test/tree/test_case_template.hpp:172:23: error: expected primary-expression before ‘=’ token ./boost/test/tree/test_case_template.hpp:172:60: error: expected primary-expression before ‘;’ token ./boost/test/tree/test_case_template.hpp:173:15: error: expected nested-name-specifier before ‘this_type’ ./boost/test/tree/test_case_template.hpp:173:15: error: ‘this_type’ has not been declared ./boost/test/tree/test_case_template.hpp:173:25: error: expected ‘;’ before ‘=’ token ./boost/test/tree/test_case_template.hpp:173:25: error: expected primary-expression before ‘=’ token ./boost/test/tree/test_case_template.hpp:173:68: error: ‘tuple_t’ was not declared in this scope ./boost/test/tree/test_case_template.hpp:173:76: error: template argument 2 is invalid ./boost/test/tree/test_case_template.hpp:174:15: error: expected nested-name-specifier before ‘single_test_gen’ ./boost/test/tree/test_case_template.hpp:174:15: error: ‘single_test_gen’ has not been declared ./boost/test/tree/test_case_template.hpp:174:31: error: expected ‘;’ before ‘=’ token ./boost/test/tree/test_case_template.hpp:174:31: error: expected primary-expression before ‘=’ token ./boost/test/tree/test_case_template.hpp:174:59: error: ‘this_type’ was not declared in this scope ./boost/test/tree/test_case_template.hpp:174:86: error: template argument 1 is invalid ./boost/test/tree/test_case_template.hpp:176:9: error: ‘single_test_gen’ was not declared in this scope ./boost/test/tree/test_case_template.hpp:176:25: error: expected ‘;’ before ‘op’ ./boost/test/tree/test_case_template.hpp:178:24: error: the value of ‘tuple_t’ is not usable in a constant expression ./boost/test/tree/test_case_template.hpp:173:68: note: ‘tuple_t’ was not declared ‘constexpr’ ./boost/test/tree/test_case_template.hpp:178:33: error: ‘op’ was not declared in this scope ./boost/test/tree/test_case_template.hpp:178:33: note: suggested alternative: ./boost/test/tools/assertion.hpp:65:14: note: ‘boost::test_tools::assertion::op’ "g++" -m32 -pthread -O3 -finline-functions -Wno-inline -Wall -pedantic -march=i686 -std=c++0x -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_TIMER_STATIC_LINK=1 -DNDEBUG -I"." -c -o "bin.v2/libs/test/build/gcc-4.6/release/link-static/threading-multi/test_main.o" "libs/test/src/test_main.cpp" ...failed gcc.compile.c++ bin.v2/libs/test/build/gcc-4.6/release/link-static/threading-multi/test_main.o... </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13525 Trac 1.4.3 Raffi Enficiaud Tue, 24 Apr 2018 20:29:16 GMT owner, status changed https://svn.boost.org/trac10/ticket/13525#comment:1 https://svn.boost.org/trac10/ticket/13525#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> This is apparently a defect in gcc. Does this patch fix the error for you? <a class="ext-link" href="https://github.com/boostorg/test/pull/140"><span class="icon">​</span>https://github.com/boostorg/test/pull/140</a> </p> Ticket kratz00@… Thu, 26 Apr 2018 19:50:52 GMT <link>https://svn.boost.org/trac10/ticket/13525#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13525#comment:2</guid> <description> <p> Hi Raffi </p> <p> Thanks for your feedback. Yes, this patch fixes the error for me. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Fri, 27 Apr 2018 16:09:50 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13525#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13525#comment:3</guid> <description> <p> I applied a different patch to the branch <code>topic/13525-compilation-error-GCC-4-6-3</code>. Would you have a chance to try this out? </p> <p> Thanks Raffi </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Fri, 27 Apr 2018 16:11:40 GMT</pubDate> <title>severity, milestone changed https://svn.boost.org/trac10/ticket/13525#comment:4 https://svn.boost.org/trac10/ticket/13525#comment:4 <ul> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Regression</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.68.0</span> </li> </ul> Ticket kratz00@… Fri, 11 May 2018 07:07:27 GMT <link>https://svn.boost.org/trac10/ticket/13525#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13525#comment:5</guid> <description> <p> Hi Raffi </p> <p> I have tested the branch you mentioned and it fixes the error too. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Thu, 21 Jun 2018 23:07:24 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13525#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13525#comment:6</guid> <description> <p> Merged to develop </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Wed, 01 Aug 2018 17:07:06 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/13525#comment:7 https://svn.boost.org/trac10/ticket/13525#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket