Coroutine2 examples - Cannot link properly.

Hello to all. I'm having trouble in compiling the coroutine2 examples. For the fibonacci example, the following linking error occurs: /usr/include/boost/coroutine2/detail/pull_control_block.ipp:62: undefined reference to `boost::context::execution_context::current()' Now, I know that I have to link against boost context, something that I'm already doing, but for some reason, it is not enough. Can anyone help me with this? Thank you. -- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

The example was built using GNU C++ 14 support. (-std=gnu++14) On 31 March 2016 at 13:34, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
Did you build the examples with C++11 support enabled?
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

(main::{lambda(boost::coroutines2::detail::push_coroutine<int>&)#1}, boost::context::preallocated, boost::coroutines2::detail::pull_coroutine<int>::control_block::control_block<boost::context::basic_fixedsize_stack<boost::context::stack_traits>,
Trying to keep it simple. [claymore@Claymore boost_test]$ g++ -o fibonacci_example -std=gnu++14 -fsplit-stack -l boost_context fibonacci.cpp /tmp/ccjaVkdi.o: In function `boost::coroutines2::detail::pull_coroutine<int>::control_block::control_block<boost::context::basic_fixedsize_stack<boost::context::stack_traits>, main::{lambda(boost::coroutines2::detail::push_coroutine<int>&)#1}>(boost::context::preallocated, boost::context::basic_fixedsize_stack<boost::context::stack_traits>, main::{lambda(boost::coroutines2::detail::push_coroutine<int>&)#1}&&, bool)': fibonacci.cpp:(.text+0x5fc): undefined reference to `boost::context::execution_context::current()' /tmp/ccjaVkdi.o: In function `boost::context::detail::activation_record* boost::context::execution_context::create_context<boost::context::basic_fixedsize_stack<boost::context::stack_traits>, boost::coroutines2::detail::pull_coroutine<int>::control_block::control_block<boost::context::basic_fixedsize_stack<boost::context::stack_traits>, main::{lambda(boost::coroutines2::detail::push_coroutine<int>&)#1}>(boost::context::preallocated, boost::context::basic_fixedsize_stack<boost::context::stack_traits>, main::{lambda(boost::coroutines2::detail::push_coroutine<int>&)#1}&&, bool)::{lambda(void*)#1}, std::tuple<> main::{lambda(boost::coroutines2::detail::push_coroutine<int>&)#1}>(boost::context::preallocated, boost::context::basic_fixedsize_stack<boost::context::stack_traits>, main::{lambda(boost::coroutines2::detail::push_coroutine<int>&)#1}&&, bool)::{lambda(void*)#1}, std::tuple<>&&)': fibonacci.cpp:(.text+0x8e4): undefined reference to `boost::context::execution_context::current()' /tmp/ccjaVkdi.o: In function `TLS wrapper function for boost::context::detail::activation_record::current_rec': fibonacci.cpp:(.text._ZTWN5boost7context6detail17activation_record11current_recE[_ZTWN5boost7context6detail17activation_record11current_recE]+0x22): undefined reference to `TLS init function for boost::context::detail::activation_record::current_rec' fibonacci.cpp:(.text._ZTWN5boost7context6detail17activation_record11current_recE[_ZTWN5boost7context6detail17activation_record11current_recE]+0x32): undefined reference to `boost::context::detail::activation_record::current_rec' /tmp/ccjaVkdi.o: In function `boost::coroutines2::detail::push_coroutine<int>::control_block::resume(int const&)': fibonacci.cpp:(.text._ZN5boost11coroutines26detail14push_coroutineIiE13control_block6resumeERKi[_ZN5boost11coroutines26detail14push_coroutineIiE13control_block6resumeERKi]+0x36): undefined reference to `boost::context::execution_context::current()' /tmp/ccjaVkdi.o: In function `boost::coroutines2::detail::pull_coroutine<int>::control_block::resume()': fibonacci.cpp:(.text._ZN5boost11coroutines26detail14pull_coroutineIiE13control_block6resumeEv[_ZN5boost11coroutines26detail14pull_coroutineIiE13control_block6resumeEv]+0x32): undefined reference to `boost::context::execution_context::current()' collect2: error: ld returned 1 exit status [claymore@Claymore boost_test]$ [claymore@Claymore boost_test]$ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /build/gcc/src/gcc-5-20160209/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release Thread model: posix gcc version 5.3.0 (GCC) What am I doing wrong? On 31 March 2016 at 13:44, Carlos Ferreira <carlosmf.pt@gmail.com> wrote:
The example was built using GNU C++ 14 support. (-std=gnu++14)
On 31 March 2016 at 13:34, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
Did you build the examples with C++11 support enabled?
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
--
Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

Could you execute b2 toolset=gcc cxxflags="-std=c++11" or bjam toolset=gcc cxxflags="-std=c++11" in <boost-root>/libs/coroutine2/examples?

It fails. Check the result here: http://pastebin.com/wCLYD3Kw On 31 March 2016 at 16:11, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
Could you execute b2 toolset=gcc cxxflags="-std=c++11" or bjam toolset=gcc cxxflags="-std=c++11" in <boost-root>/libs/coroutine2/examples?
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

could you run and post the output of boost.context' unit-tests (<bosot-root>/libs/context/test): b2 --reconfigure toolset=gcc cxxflags="-std=c++11"

Here is the result: http://pastebin.com/AVvgXJJV The machine where I executed the requested command, is different from the previous, but the system (Manjaro Linux 64bits) and the coroutine2 problems remain the same. On 31 March 2016 at 19:41, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
could you run and post the output of boost.context' unit-tests (<bosot-root>/libs/context/test): b2 --reconfigure toolset=gcc cxxflags="-std=c++11"
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

if one of the defect macros below seams to be defined - prevents including execution_context: BOOST_NO_CXX11_AUTO_DECLARATIONS BOOST_NO_CXX11_CONSTEXPR BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_NO_CXX11_FINAL BOOST_NO_CXX11_HDR_TUPLE BOOST_NO_CXX11_NOEXCEPT BOOST_NO_CXX11_NULLPTR BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_NO_CXX11_TEMPLATE_ALIASES BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX BOOST_NO_CXX11_VARIADIC_TEMPLATES BOOST_NO_HDR_ATOMIC BOOST_NO_HDR_TUPLE

None of them seem to be defined. I have checked one by one using the header files included in the fibonacci example and none of those macros seem to be defined. Is there a test or a "boost" way for me to confirm and to be sure that none of those macros are defined? On 31 March 2016 at 22:20, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
if one of the defect macros below seams to be defined - prevents including execution_context:
BOOST_NO_CXX11_AUTO_DECLARATIONS BOOST_NO_CXX11_CONSTEXPR BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_NO_CXX11_FINAL BOOST_NO_CXX11_HDR_TUPLE BOOST_NO_CXX11_NOEXCEPT BOOST_NO_CXX11_NULLPTR BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_NO_CXX11_TEMPLATE_ALIASES BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX BOOST_NO_CXX11_VARIADIC_TEMPLATES BOOST_NO_HDR_ATOMIC BOOST_NO_HDR_TUPLE
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

On 3/31/2016 6:09 PM, Carlos Ferreira wrote:
None of them seem to be defined. I have checked one by one using the header files included in the fibonacci example and none of those macros seem to be defined.
Is there a test or a "boost" way for me to confirm and to be sure that none of those macros are defined?
Just a C++ way <g>. Add to an included header file: #include <boost/config.hpp> #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \ defined(BOOST_NO_CXX11_CONSTEXPR) || \ defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ defined(BOOST_NO_CXX11_FINAL) || \ defined(BOOST_NO_CXX11_HDR_TUPLE) || \ defined(BOOST_NO_CXX11_NOEXCEPT) || \ defined(BOOST_NO_CXX11_NULLPTR) || \ defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \ defined(BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX) || \ defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \ defined(BOOST_NO_HDR_ATOMIC) || \ defined(BOOST_NO_HDR_TUPLE) #error Your message here #endif
On 31 March 2016 at 22:20, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
if one of the defect macros below seams to be defined - prevents including execution_context:
BOOST_NO_CXX11_AUTO_DECLARATIONS BOOST_NO_CXX11_CONSTEXPR BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_NO_CXX11_FINAL BOOST_NO_CXX11_HDR_TUPLE BOOST_NO_CXX11_NOEXCEPT BOOST_NO_CXX11_NULLPTR BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_NO_CXX11_TEMPLATE_ALIASES BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX BOOST_NO_CXX11_VARIADIC_TEMPLATES BOOST_NO_HDR_ATOMIC BOOST_NO_HDR_TUPLE
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

As I though, none of the macros are defined. I don't really understand what is going on. I thought the Boost-libs package from Arch Linux might have been compiled without C++14 support, but GCC 5.3 uses -std=c++14 by default, if no standard is provided by the client. On 1 April 2016 at 00:44, Edward Diener <eldiener@tropicsoft.com> wrote:
On 3/31/2016 6:09 PM, Carlos Ferreira wrote:
None of them seem to be defined. I have checked one by one using the header files included in the fibonacci example and none of those macros seem to be defined.
Is there a test or a "boost" way for me to confirm and to be sure that none of those macros are defined?
Just a C++ way <g>. Add to an included header file:
#include <boost/config.hpp>
#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \ defined(BOOST_NO_CXX11_CONSTEXPR) || \ defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ defined(BOOST_NO_CXX11_FINAL) || \ defined(BOOST_NO_CXX11_HDR_TUPLE) || \ defined(BOOST_NO_CXX11_NOEXCEPT) || \ defined(BOOST_NO_CXX11_NULLPTR) || \ defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \ defined(BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX) || \ defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \ defined(BOOST_NO_HDR_ATOMIC) || \ defined(BOOST_NO_HDR_TUPLE) #error Your message here #endif
On 31 March 2016 at 22:20, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
if one of the defect macros below seams to be defined - prevents including
execution_context:
BOOST_NO_CXX11_AUTO_DECLARATIONS BOOST_NO_CXX11_CONSTEXPR BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_NO_CXX11_FINAL BOOST_NO_CXX11_HDR_TUPLE BOOST_NO_CXX11_NOEXCEPT BOOST_NO_CXX11_NULLPTR BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_NO_CXX11_TEMPLATE_ALIASES BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX BOOST_NO_CXX11_VARIADIC_TEMPLATES BOOST_NO_HDR_ATOMIC BOOST_NO_HDR_TUPLE
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

Ok I was mistaken. It seems that the gnu++14 standard is only used by default for GCC 6 release, which means that Boost.Context for Arch Linux was probably not compiled using the C++14 standard. The macro BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES is defined if a standard bellow c++14 is used and consequently, BOOST_CONTEXT_NO_EXECUTION_CONTEXT macro is defined. This is probably the reason why GCC is unable to successfully link the Fibonacci example with the Boost.context system lib. I will try to compile Boost for Arch linux, forcing the C++14 standard and then report here my results. On 1 April 2016 at 01:05, Carlos Ferreira <carlosmf.pt@gmail.com> wrote:
As I though, none of the macros are defined. I don't really understand what is going on. I thought the Boost-libs package from Arch Linux might have been compiled without C++14 support, but GCC 5.3 uses -std=c++14 by default, if no standard is provided by the client.
On 1 April 2016 at 00:44, Edward Diener <eldiener@tropicsoft.com> wrote:
On 3/31/2016 6:09 PM, Carlos Ferreira wrote:
None of them seem to be defined. I have checked one by one using the header files included in the fibonacci example and none of those macros seem to be defined.
Is there a test or a "boost" way for me to confirm and to be sure that none of those macros are defined?
Just a C++ way <g>. Add to an included header file:
#include <boost/config.hpp>
#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \ defined(BOOST_NO_CXX11_CONSTEXPR) || \ defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ defined(BOOST_NO_CXX11_FINAL) || \ defined(BOOST_NO_CXX11_HDR_TUPLE) || \ defined(BOOST_NO_CXX11_NOEXCEPT) || \ defined(BOOST_NO_CXX11_NULLPTR) || \ defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \ defined(BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX) || \ defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \ defined(BOOST_NO_HDR_ATOMIC) || \ defined(BOOST_NO_HDR_TUPLE) #error Your message here #endif
On 31 March 2016 at 22:20, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
if one of the defect macros below seams to be defined - prevents
including execution_context:
BOOST_NO_CXX11_AUTO_DECLARATIONS BOOST_NO_CXX11_CONSTEXPR BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_NO_CXX11_FINAL BOOST_NO_CXX11_HDR_TUPLE BOOST_NO_CXX11_NOEXCEPT BOOST_NO_CXX11_NULLPTR BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_NO_CXX11_TEMPLATE_ALIASES BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX BOOST_NO_CXX11_VARIADIC_TEMPLATES BOOST_NO_HDR_ATOMIC BOOST_NO_HDR_TUPLE
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
--
Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

It seems I was right. Boost libs for Arch Linux are not compiled using the standard C++14. Because of this, Boost.Context cannot support Boost.Coroutine2. I recompiled Boost-libs with C++14, then reinstalled and now the Fibonacci example compiles and links correctly with the system libs. I hope this helps other developers with similar problems. On 1 April 2016 at 01:29, Carlos Ferreira <carlosmf.pt@gmail.com> wrote:
Ok I was mistaken. It seems that the gnu++14 standard is only used by default for GCC 6 release, which means that Boost.Context for Arch Linux was probably not compiled using the C++14 standard. The macro BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES is defined if a standard bellow c++14 is used and consequently, BOOST_CONTEXT_NO_EXECUTION_CONTEXT macro is defined.
This is probably the reason why GCC is unable to successfully link the Fibonacci example with the Boost.context system lib. I will try to compile Boost for Arch linux, forcing the C++14 standard and then report here my results.
On 1 April 2016 at 01:05, Carlos Ferreira <carlosmf.pt@gmail.com> wrote:
As I though, none of the macros are defined. I don't really understand what is going on. I thought the Boost-libs package from Arch Linux might have been compiled without C++14 support, but GCC 5.3 uses -std=c++14 by default, if no standard is provided by the client.
On 1 April 2016 at 00:44, Edward Diener <eldiener@tropicsoft.com> wrote:
On 3/31/2016 6:09 PM, Carlos Ferreira wrote:
None of them seem to be defined. I have checked one by one using the header files included in the fibonacci example and none of those macros seem to be defined.
Is there a test or a "boost" way for me to confirm and to be sure that none of those macros are defined?
Just a C++ way <g>. Add to an included header file:
#include <boost/config.hpp>
#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \ defined(BOOST_NO_CXX11_CONSTEXPR) || \ defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ defined(BOOST_NO_CXX11_FINAL) || \ defined(BOOST_NO_CXX11_HDR_TUPLE) || \ defined(BOOST_NO_CXX11_NOEXCEPT) || \ defined(BOOST_NO_CXX11_NULLPTR) || \ defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \ defined(BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX) || \ defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \ defined(BOOST_NO_HDR_ATOMIC) || \ defined(BOOST_NO_HDR_TUPLE) #error Your message here #endif
On 31 March 2016 at 22:20, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
if one of the defect macros below seams to be defined - prevents
including execution_context:
BOOST_NO_CXX11_AUTO_DECLARATIONS BOOST_NO_CXX11_CONSTEXPR BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_NO_CXX11_FINAL BOOST_NO_CXX11_HDR_TUPLE BOOST_NO_CXX11_NOEXCEPT BOOST_NO_CXX11_NULLPTR BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_NO_CXX11_TEMPLATE_ALIASES BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX BOOST_NO_CXX11_VARIADIC_TEMPLATES BOOST_NO_HDR_ATOMIC BOOST_NO_HDR_TUPLE
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
--
Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
--
Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
-- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira

thx, Carlos for verifying this issue 2016-04-01 4:21 GMT+02:00 Carlos Ferreira <carlosmf.pt@gmail.com>:
It seems I was right. Boost libs for Arch Linux are not compiled using the standard C++14. Because of this, Boost.Context cannot support Boost.Coroutine2.
I recompiled Boost-libs with C++14, then reinstalled and now the Fibonacci example compiles and links correctly with the system libs.
I hope this helps other developers with similar problems.
On 1 April 2016 at 01:29, Carlos Ferreira <carlosmf.pt@gmail.com> wrote:
Ok I was mistaken. It seems that the gnu++14 standard is only used by default for GCC 6 release, which means that Boost.Context for Arch Linux was probably not compiled using the C++14 standard. The macro BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES is defined if a standard bellow c++14 is used and consequently, BOOST_CONTEXT_NO_EXECUTION_CONTEXT macro is defined.
This is probably the reason why GCC is unable to successfully link the Fibonacci example with the Boost.context system lib. I will try to compile Boost for Arch linux, forcing the C++14 standard and then report here my results.
On 1 April 2016 at 01:05, Carlos Ferreira <carlosmf.pt@gmail.com> wrote:
As I though, none of the macros are defined. I don't really understand what is going on. I thought the Boost-libs package from Arch Linux might have been compiled without C++14 support, but GCC 5.3 uses -std=c++14 by default, if no standard is provided by the client.
On 1 April 2016 at 00:44, Edward Diener <eldiener@tropicsoft.com> wrote:
On 3/31/2016 6:09 PM, Carlos Ferreira wrote:
None of them seem to be defined. I have checked one by one using the header files included in the fibonacci example and none of those macros seem to be defined.
Is there a test or a "boost" way for me to confirm and to be sure that none of those macros are defined?
Just a C++ way <g>. Add to an included header file:
#include <boost/config.hpp>
#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) || \ defined(BOOST_NO_CXX11_CONSTEXPR) || \ defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || \ defined(BOOST_NO_CXX11_FINAL) || \ defined(BOOST_NO_CXX11_HDR_TUPLE) || \ defined(BOOST_NO_CXX11_NOEXCEPT) || \ defined(BOOST_NO_CXX11_NULLPTR) || \ defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || \ defined(BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX) || \ defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \ defined(BOOST_NO_HDR_ATOMIC) || \ defined(BOOST_NO_HDR_TUPLE) #error Your message here #endif
On 31 March 2016 at 22:20, Oliver Kowalke <oliver.kowalke@gmail.com> wrote:
if one of the defect macros below seams to be defined - prevents
including execution_context:
BOOST_NO_CXX11_AUTO_DECLARATIONS BOOST_NO_CXX11_CONSTEXPR BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_NO_CXX11_FINAL BOOST_NO_CXX11_HDR_TUPLE BOOST_NO_CXX11_NOEXCEPT BOOST_NO_CXX11_NULLPTR BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_NO_CXX11_TEMPLATE_ALIASES BOOST_NO_CXX11_UNIFIED_INITIALISATION_SYNTAX BOOST_NO_CXX11_VARIADIC_TEMPLATES BOOST_NO_HDR_ATOMIC BOOST_NO_HDR_TUPLE
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
--
Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
--
Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
--
Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Carlos Ferreira
-
Edward Diener
-
Oliver Kowalke