Boost C++ Libraries: Ticket #11381: Cross compilation with ARM gcc segmentation fault https://svn.boost.org/trac10/ticket/11381 <p> + ./b2 -j 6 --with-atomic --with-log --with-date_time --with-thread --with-filesystem --with-program_options --with-timer --link=static cxxflags=-fPIC -std=c++0x --build-type=minimal toolset=gcc-arm link.jam: No such file or directory </p> <p> Building the Boost C++ Libraries. </p> <p> Performing configuration checks </p> <ul><li>x86 : no (cached) </li><li>arm : yes (cached) </li><li>lockfree boost::atomic_flag : yes (cached) </li></ul><p> Component configuration: </p> <ul><li>atomic : building </li><li>chrono : not building </li><li>context : not building </li><li>coroutine : not building </li><li>date_time : building </li><li>exception : not building </li><li>filesystem : building </li><li>graph : not building </li><li>graph_parallel : not building </li><li>iostreams : not building </li><li>locale : not building </li><li>log : building </li><li>math : not building </li><li>mpi : not building </li><li>program_options : building </li><li>python : not building </li><li>random : not building </li><li>regex : not building </li><li>serialization : not building </li><li>signals : not building </li><li>system : not building </li><li>test : not building </li><li>thread : building </li><li>timer : building </li><li>wave : not building </li></ul><p> ...patience... ...patience... ...patience... ...found 3808 targets... ...updating 36 targets... gcc.compile.c++ bin.v2/libs/log/build/gcc-arm/release/build-no/log-api-unix/threading-multi/threadsafe_queue.o In file included from libs/log/src/threadsafe_queue.cpp:32: ./boost/log/detail/spin_mutex.hpp: In constructor ‘boost::log::v2_mt_posix::aux::spin_mutex::spin_mutex()’: ./boost/log/detail/spin_mutex.hpp:198: error: ‘pthread_spin_init’ was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In destructor ‘boost::log::v2_mt_posix::aux::spin_mutex::~spin_mutex()’: ./boost/log/detail/spin_mutex.hpp:205: error: ‘pthread_spin_destroy’ was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ‘bool boost::log::v2_mt_posix::aux::spin_mutex::try_lock()’: ./boost/log/detail/spin_mutex.hpp:210: error: ‘pthread_spin_trylock’ was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ‘void boost::log::v2_mt_posix::aux::spin_mutex::lock()’: ./boost/log/detail/spin_mutex.hpp:220: error: ‘pthread_spin_lock’ was not declared in this scope ./boost/log/detail/spin_mutex.hpp: In member function ‘void boost::log::v2_mt_posix::aux::spin_mutex::unlock()’: ./boost/log/detail/spin_mutex.hpp:227: error: ‘pthread_spin_unlock’ was not declared in this scope </p> <blockquote> <p> "arm-linux-g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -fPIC -std=c++0x -fno-strict-aliasing -ftemplate-depth-1024 -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_DATE_TIME_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_DLL -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/log/build/gcc-arm/release/build-no/log-api-unix/threading-multi/threadsafe_queue.o" "libs/log/src/threadsafe_queue.cpp" </p> </blockquote> <p> ...failed gcc.compile.c++ bin.v2/libs/log/build/gcc-arm/release/build-no/log-api-unix/threading-multi/threadsafe_queue.o... gcc.compile.c++ bin.v2/libs/log/build/gcc-arm/release/build-no/log-api-unix/threading-multi/spirit_encoding.o In file included from ./boost/phoenix/core.hpp:20, </p> <blockquote> <p> from ./boost/spirit/include/phoenix_core.hpp:16, from ./boost/spirit/home/support/terminal.hpp:16, from ./boost/spirit/home/support/common_terminals.hpp:15, from libs/log/src/spirit_encoding.hpp:23, from libs/log/src/spirit_encoding.cpp:18: </p> </blockquote> <p> ./boost/proto/transform/call.hpp: In instantiation of ‘boost::proto::call&lt;boost::phoenix::custom_terminal&lt;boost::phoenix::detail::nothing, void&gt; ()(boost::proto::_value, boost::phoenix::_context)&gt;::impl2&lt;const boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;&amp;, boost::phoenix::vector1&lt;const boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;*&gt;&amp;, const boost::phoenix::default_actions&amp;, false&gt;’: ./boost/proto/transform/call.hpp:313: instantiated from ‘boost::proto::call&lt;boost::phoenix::custom_terminal&lt;boost::phoenix::detail::nothing, void&gt; ()(boost::proto::_value, boost::phoenix::_context)&gt;::impl&lt;const boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;&amp;, boost::phoenix::vector1&lt;const boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;*&gt;&amp;, const boost::phoenix::default_actions&amp;&gt;’ ./boost/proto/transform/detail/preprocessed/lazy.hpp:84: instantiated from ‘boost::proto::lazy&lt;boost::phoenix::custom_terminal&lt;boost::proto::_value, void&gt; ()(boost::proto::_value, boost::phoenix::_context)&gt;::impl&lt;const boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;&amp;, boost::phoenix::vector1&lt;const boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;*&gt;&amp;, const boost::phoenix::default_actions&amp;&gt;’ ./boost/proto/transform/when.hpp:194: instantiated from ‘boost::proto::when&lt;boost::phoenix::rule::custom_terminal, boost::proto::external_transform&gt;::impl&lt;const boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;&amp;, boost::phoenix::vector1&lt;const boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;*&gt;&amp;, const boost::phoenix::default_actions&amp;&gt;’ ./boost/proto/matches.hpp:753: instantiated from ‘boost::proto::or_&lt;boost::phoenix::enable_rule&lt;boost::phoenix::rule::argument, void&gt;, boost::phoenix::enable_rule&lt;boost::phoenix::rule::custom_terminal, void&gt;, boost::phoenix::enable_rule&lt;boost::phoenix::rule::terminal, void&gt;, void, void, void, void, void, void, void&gt;::impl&lt;const boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;&amp;, boost::phoenix::vector1&lt;const boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;*&gt;&amp;, const boost::phoenix::default_actions&amp;&gt;’ ./boost/proto/matches.hpp:831: instantiated from ‘boost::proto::switch_&lt;boost::phoenix::meta_grammar, boost::proto::tag_of&lt;boost::proto::_&gt; ()()&gt;::impl&lt;const boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;&amp;, boost::phoenix::vector1&lt;const boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;*&gt;&amp;, const boost::phoenix::default_actions&amp;&gt;’ ./boost/phoenix/core/meta_grammar.hpp:66: instantiated from ‘boost::phoenix::evaluator::impl&lt;const boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;&amp;, const boost::phoenix::vector2&lt;boost::phoenix::vector1&lt;const boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;*&gt;&amp;, boost::phoenix::default_actions&gt;&amp;, boost::proto::envns_::empty_env&gt;’ ./boost/phoenix/core/detail/preprocessed/actor_result_of_10.hpp:26: instantiated from ‘boost::phoenix::result_of::nullary_actor_result&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;’ ./boost/mpl/eval_if.hpp:60: instantiated from ‘boost::mpl::eval_if_c&lt;true, boost::phoenix::result_of::nullary_actor_result&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;, boost::mpl::identity&lt;boost::phoenix::detail::error_expecting_arguments&gt; &gt;’ ./boost/phoenix/core/detail/preprocessed/actor_result_of_10.hpp:38: instantiated from ‘boost::phoenix::result_of::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt;, void, void, void, void, void, void, void, void, void, void, void&gt;’ ./boost/phoenix/core/actor.hpp:240: instantiated from ‘boost::phoenix::actor&lt;boost::proto::exprns_::basic_expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::phoenix::detail::nothing&gt;, 0l&gt; &gt;’ ./boost/phoenix/core/nothing.hpp:57: instantiated from here ./boost/proto/transform/call.hpp:246: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See &lt;<a class="ext-link" href="http://bugs.buildroot.net/"><span class="icon">​</span>http://bugs.buildroot.net/</a>&gt; for instructions. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11381 Trac 1.4.3 Vijay Pas <vijaypas@…> Mon, 08 Jun 2015 18:46:19 GMT version changed https://svn.boost.org/trac10/ticket/11381#comment:1 https://svn.boost.org/trac10/ticket/11381#comment:1 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost 1.57.0</span> → <span class="trac-field-new">Boost 1.55.0</span> </li> </ul> Ticket John Maddock Fri, 12 Jun 2015 18:14:29 GMT component changed; owner set https://svn.boost.org/trac10/ticket/11381#comment:2 https://svn.boost.org/trac10/ticket/11381#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Andrey Semashev</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">log</span> </li> </ul> <p> As the errors seem to be coming from Boost.Log, I'm assigning there for now. </p> Ticket Andrey Semashev Tue, 21 Jul 2015 16:01:30 GMT <link>https://svn.boost.org/trac10/ticket/11381#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11381#comment:3</guid> <description> <p> I can see two problems here. One is the absence of the pthread_spin* functions. The use of these functions is guarded with the _POSIX_SPIN_LOCKS system macro check, which must only be defined when the functions are available. What target platform are you building for and how can I detect it? </p> <p> The second problem is the compiler crash at the end. It's coming from Boost.Spirit and Boost.Phoenix, and I suggest you create a separate ticket for Boost.Phoenix on that problem. I can't fix it in Boost.Log. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Sun, 23 Aug 2015 17:45:06 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11381#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11381#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/11381#comment:3" title="Comment 3">andysem</a>: </p> <blockquote class="citation"> <p> What target platform are you building for and how can I detect it? </p> </blockquote> <p> Ping? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Thu, 15 Oct 2015 18:27:18 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11381#comment:5 https://svn.boost.org/trac10/ticket/11381#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">obsolete</span> </li> </ul> <p> No answer from the reporter. </p> Ticket