Error building coroutine_echo_client on Ubuntu 14.04.1

I got this error while running “make all”:

CMakeFiles/coroutine_echo_client.dir/example/coroutine/echo_client.cpp.o: In function push_coroutine_context_void<boost::coroutines::detail::push_coroutine_object<boost::coroutines::pull_coroutine<void>, void, boost::asio::detail::coro_entry_point<boost::asio::detail::wrapped_handler<boost::asio::io_service::strand, void (*)(), boost::asio::detail::is_continuation_if_running>, main(int, char**)::__lambda27>&, boost::coroutines::basic_standard_stack_allocator<boost::coroutines::stack_traits> > >': /home/odroid/build_maidsafe/boost_1_57_0_GNU_4_8_2/boost/coroutine/detail/push_coroutine_object.hpp:58: undefined reference to boost::coroutines::detail::coroutine_context::coroutine_context()’
/home/odroid/build_maidsafe/boost_1_57_0_GNU_4_8_2/boost/coroutine/detail/push_coroutine_object.hpp:58: undefined reference to boost::coroutines::detail::coroutine_context::coroutine_context(void (*)(int), boost::coroutines::stack_context const&)' CMakeFiles/coroutine_echo_client.dir/example/coroutine/echo_client.cpp.o: In function run’:
/home/odroid/build_maidsafe/boost_1_57_0_GNU_4_8_2/boost/coroutine/detail/push_coroutine_object.hpp:315: undefined reference to boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, int, bool)' CMakeFiles/coroutine_echo_client.dir/example/coroutine/echo_client.cpp.o: In function boost::coroutines::attributes::attributes()‘:
/home/odroid/build_maidsafe/boost_1_57_0_GNU_4_8_2/boost/coroutine/attributes.hpp:31: undefined reference to boost::coroutines::stack_traits::default_size()' CMakeFiles/coroutine_echo_client.dir/example/coroutine/echo_client.cpp.o: In function boost::coroutines::detail::pull_coroutine_impl::pull()’:
/home/odroid/build_maidsafe/boost_1_57_0_GNU_4_8_2/boost/coroutine/detail/pull_coroutine_impl.hpp:340: undefined reference to boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, int, bool)' CMakeFiles/coroutine_echo_client.dir/example/coroutine/echo_client.cpp.o: In function boost::coroutines::detail::push_coroutine_impl::unwind_stack()‘:
/home/odroid/build_maidsafe/boost_1_57_0_GNU_4_8_2/boost/coroutine/detail/push_coroutine_impl.hpp:261: undefined reference to boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, int, bool)' CMakeFiles/coroutine_echo_client.dir/example/coroutine/echo_client.cpp.o: In function boost::coroutines::detail::push_coroutine_impl::push()’:
/home/odroid/build_maidsafe/boost_1_57_0_GNU_4_8_2/boost/coroutine/detail/push_coroutine_impl.hpp:280: undefined reference to `boost::coroutines::detail::coroutine_context::jump(boost::coroutines::detail::coroutine_context&, int, bool)’
collect2: error: ld returned 1 exit status
make[2]: *** [coroutine_echo_client] Error 1
make[1]: *** [src/crux/CMakeFiles/coroutine_echo_client.dir/all] Error 2
make: *** [all] Error 2

Steps followed:

git clone git@github.com:maidsafe/MaidSafe
git -C MaidSafe submodule update --init
sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
sudo ln -s /usr/bin/g+±4.8 /usr/bin/g++

Reverted Arch specific patch as sugested here: Make error building on Ubuntu 14.04 - #2 by dirvine

vim MaidSafe/cmake_modules/add_boost.cmake

Removed line:
string(REGEX MATCH “[0-9]+\.[0-9]+\.[0-9]+” ToolsetVer “{CMAKE_CXX_COMPILER_VERSION}") Replaced with: string(REGEX MATCH "[0-9]+\\.[0-9]+" ToolsetVer "{CMAKE_CXX_COMPILER_VERSION}”)
cmake -HMaidSafe -Bbuild_maidsafe -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g+±4.8

cd build_maidsafe && cmake .
make all

GCC info:

odroid@odroid:~/build_maidsafe$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu/Linaro 4.8.2-19ubuntu1’ --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1)

Cmake version:

odroid@odroid:~/build_maidsafe$ cmake --version
cmake version 2.8.12.2

The issue persists compiling with gcc-4.8.4 or gcc-4.9 or clang 3.5 on Ubuntu x64 in a virtual machine. Any ideas on what is causing this issue?

I don’t believe ARM is supported with Boost.Context. That support comes in Boost v1.58 I believe, someone committed some patches there a few weeks ago.

Niall