|
Boost Users : |
Subject: Re: [Boost-users] Boost not compiling with arm-cross-compiler
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2014-11-26 23:39:31
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".
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net