{Ubuntu 14.04 64 bits, arm-g++ compiler 4.9 one that comes with google's ndk r10c) (The compiler has --sysroot pointing to platform android-14, and -march=armv7-a) on using arm cross-compiler for compiling boost I get the following error in "*socket_ops.ipp*": *<1> for all function (templates) of this type:* template <typename SockLenType> inline int call_getsockname(SockLenType msghdr::*, socket_type s, socket_addr_type* addr, std::size_t* addrlen) { SockLenType tmp_addrlen = (SockLenType)*addrlen; int result = ::getsockname(s, addr, &tmp_addrlen); *addrlen = (std::size_t)tmp_addrlen; return result; } /some-path/thirdparty/boost/boost_1_55_0_Android/boost/asio/detail/impl/socket_ops.ipp:1639: error: invalid conversion from 'int*' to 'socklen_t* {aka unsigned int*}' [-fpermissive] int result = ::getsockname(s, addr, &tmp_addrlen); ^ On changing the line to: int result = ::getsockname(s, addr, (socklen_t*)tmp_addrlen); it compiles fine ofcourse but i don't know if this is what is to be done. *<2> And in "mapped_region.hpp": /some-path/thirdparty/boost/boost_1_55_0_Android/boost/interprocess/mapped_region.hpp:49: error: sys/shm.h: No such file or directory # include <sys/shm.h> //System V shared memory... ^ * and points to: # if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) # include <sys/shm.h> //System V shared memory... # endif in that file. Here are the flags in my user-config.jam file: using gcc : android : @AndroidNDKSrcDir@/bin/arm-linux-androideabi-g++ : <archiver>@AndroidNDKSrcDir@/bin/arm-linux-androideabi-ar <compileflags>-fexceptions <compileflags>-frtti <compileflags>-fPIC <compileflags>-std=c++11 <compileflags>-ffunction-sections <compileflags>-funwind-tables <compileflags>-D__ARM_ARCH_5__ <compileflags>-D__ARM_ARCH_5T__ <compileflags>-D__ARM_ARCH_5E__ <compileflags>-D__ARM_ARCH_5TE__ <compileflags>-Wno-psabi <compileflags>-march=armv5te <compileflags>-mtune=xscale <compileflags>-msoft-float <compileflags>-mthumb <compileflags>-Os <compileflags>-fomit-frame-pointer <compileflags>-fno-strict-aliasing <compileflags>-finline-limit=64 <compileflags>-I@AndroidNDKSrcDir@/include/c++/4.9 <compileflags>-Wa,--noexecstack <compileflags>-DANDROID <compileflags>-D__ANDROID__ <compileflags>-DNDEBUG <compileflags>-O2 <compileflags>-g <compileflags>-I@AndroidNDKSrcDir@/sysroot/usr/include <architecture>arm <compileflags>-fvisibility=hidden <compileflags>-fvisibility-inlines-hidden <compileflags>-fdata-sections <cxxflags>-D__arm__ <cxxflags>-D_REENTRANT <cxxflags>-D_GLIBCXX__PTHREADS ; *What is the way forward for those two errors - <1> and <2> above ?* -- View this message in context: http://boost.2283326.n4.nabble.com/Boost-not-compiling-with-arm-cross-compil... Sent from the Boost - Users mailing list archive at Nabble.com.
On 16/11/2014 19:00, ustulation wrote:
{Ubuntu 14.04 64 bits, arm-g++ compiler 4.9 one that comes with google's ndk r10c) (The compiler has --sysroot pointing to platform android-14, and -march=armv7-a)
on using arm cross-compiler for compiling boost I get the following error in "*socket_ops.ipp*":
*<1> for all function (templates) of this type:* template <typename SockLenType> inline int call_getsockname(SockLenType msghdr::*, socket_type s, socket_addr_type* addr, std::size_t* addrlen) { SockLenType tmp_addrlen = (SockLenType)*addrlen; int result = ::getsockname(s, addr, &tmp_addrlen); *addrlen = (std::size_t)tmp_addrlen; return result; }
/some-path/thirdparty/boost/boost_1_55_0_Android/boost/asio/detail/impl/socket_ops.ipp:1639: error: invalid conversion from 'int*' to 'socklen_t* {aka unsigned int*}' [-fpermissive] int result = ::getsockname(s, addr, &tmp_addrlen); ^
On changing the line to: int result = ::getsockname(s, addr, (socklen_t*)tmp_addrlen);
it compiles fine ofcourse but i don't know if this is what is to be done.
That's not the correct fix. You should leave that line as-is but instead find where the tmp_addrlen variable is declared and change it from "int" to "socklen_t".
participants (2)
-
Gavin Lambert
-
ustulation