Opened 7 years ago
Closed 7 years ago
#11381 closed Bugs (obsolete)
Cross compilation with ARM gcc segmentation fault
Reported by: | Owned by: | Andrey Semashev | |
---|---|---|---|
Milestone: | To Be Determined | Component: | log |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description
+ ./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
Building the Boost C++ Libraries.
Performing configuration checks
- x86 : no (cached)
- arm : yes (cached)
- lockfree boost::atomic_flag : yes (cached)
Component configuration:
- atomic : building
- chrono : not building
- context : not building
- coroutine : not building
- date_time : building
- exception : not building
- filesystem : building
- graph : not building
- graph_parallel : not building
- iostreams : not building
- locale : not building
- log : building
- math : not building
- mpi : not building
- program_options : building
- python : not building
- random : not building
- regex : not building
- serialization : not building
- signals : not building
- system : not building
- test : not building
- thread : building
- timer : building
- wave : not building
...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
"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"
...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,
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:
./boost/proto/transform/call.hpp: In instantiation of ‘boost::proto::call<boost::phoenix::custom_terminal<boost::phoenix::detail::nothing, void> ()(boost::proto::_value, boost::phoenix::_context)>::impl2<const boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>&, boost::phoenix::vector1<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >*>&, const boost::phoenix::default_actions&, false>’: ./boost/proto/transform/call.hpp:313: instantiated from ‘boost::proto::call<boost::phoenix::custom_terminal<boost::phoenix::detail::nothing, void> ()(boost::proto::_value, boost::phoenix::_context)>::impl<const boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>&, boost::phoenix::vector1<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >*>&, const boost::phoenix::default_actions&>’ ./boost/proto/transform/detail/preprocessed/lazy.hpp:84: instantiated from ‘boost::proto::lazy<boost::phoenix::custom_terminal<boost::proto::_value, void> ()(boost::proto::_value, boost::phoenix::_context)>::impl<const boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>&, boost::phoenix::vector1<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >*>&, const boost::phoenix::default_actions&>’ ./boost/proto/transform/when.hpp:194: instantiated from ‘boost::proto::when<boost::phoenix::rule::custom_terminal, boost::proto::external_transform>::impl<const boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>&, boost::phoenix::vector1<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >*>&, const boost::phoenix::default_actions&>’ ./boost/proto/matches.hpp:753: instantiated from ‘boost::proto::or_<boost::phoenix::enable_rule<boost::phoenix::rule::argument, void>, boost::phoenix::enable_rule<boost::phoenix::rule::custom_terminal, void>, boost::phoenix::enable_rule<boost::phoenix::rule::terminal, void>, void, void, void, void, void, void, void>::impl<const boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>&, boost::phoenix::vector1<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >*>&, const boost::phoenix::default_actions&>’ ./boost/proto/matches.hpp:831: instantiated from ‘boost::proto::switch_<boost::phoenix::meta_grammar, boost::proto::tag_of<boost::proto::_> ()()>::impl<const boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>&, boost::phoenix::vector1<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >*>&, const boost::phoenix::default_actions&>’ ./boost/phoenix/core/meta_grammar.hpp:66: instantiated from ‘boost::phoenix::evaluator::impl<const boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>&, const boost::phoenix::vector2<boost::phoenix::vector1<const boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >*>&, boost::phoenix::default_actions>&, boost::proto::envns_::empty_env>’ ./boost/phoenix/core/detail/preprocessed/actor_result_of_10.hpp:26: instantiated from ‘boost::phoenix::result_of::nullary_actor_result<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >’ ./boost/mpl/eval_if.hpp:60: instantiated from ‘boost::mpl::eval_if_c<true, boost::phoenix::result_of::nullary_actor_result<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >, boost::mpl::identity<boost::phoenix::detail::error_expecting_arguments> >’ ./boost/phoenix/core/detail/preprocessed/actor_result_of_10.hpp:38: instantiated from ‘boost::phoenix::result_of::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l>, void, void, void, void, void, void, void, void, void, void, void>’ ./boost/phoenix/core/actor.hpp:240: instantiated from ‘boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::phoenix::detail::nothing>, 0l> >’ ./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 <http://bugs.buildroot.net/> for instructions.
Change History (5)
comment:1 by , 7 years ago
Version: | Boost 1.57.0 → Boost 1.55.0 |
---|
comment:2 by , 7 years ago
Component: | None → log |
---|---|
Owner: | set to |
follow-up: 4 comment:3 by , 7 years ago
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?
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.
As the errors seem to be coming from Boost.Log, I'm assigning there for now.