Error building liblinphone for Android on Ubuntu 18.04

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Error building liblinphone for Android on Ubuntu 18.04

Ernesto Espinosa
Hi 
I'm traying to build the liblinphone for an Android project, but i get an error when Cmake is building the external library mbedtls, in specific the net.sockets.c file.
The output includes:

[ 89%] Building C object library/CMakeFiles/mbedtls.dir/net_sockets.c.o
/home/desarrollo/liblinphone/linphone-sdk/external/mbedtls/library/net_sockets.c:332:37: error:
      passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *')
      converts between pointers to integer types with different sign
      [-Werror,-Wpointer-sign]
                    (void *) &type, &type_len ) != 0 ||
                                    ^~~~~~~~~
/home/desarrollo/android_ndk/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/sys/socket.h:311:92: note:
      passing argument to parameter '__value_length' here
  ...__fd, int __level, int __option, void* __value, socklen_t* __value_length);
                                                                ^
/home/desarrollo/liblinphone/linphone-sdk/external/mbedtls/library/net_sockets.c:342:80: error:
      passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *')
      converts between pointers to integer types with different sign
      [-Werror,-Wpointer-sign]
  ...(struct sockaddr *) &client_addr, &n );
                                       ^~
/home/desarrollo/android_ndk/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/sys/socket.h:301:71: note:
      passing argument to parameter '__addr_length' here
  ...int accept(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
                                                              ^
/home/desarrollo/liblinphone/linphone-sdk/external/mbedtls/library/net_sockets.c:350:59: error:
      passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *')
      converts between pointers to integer types with different sign
      [-Werror,-Wpointer-sign]
                        (struct sockaddr *) &client_addr, &n );
                                                          ^~
/home/desarrollo/android_ndk/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/sys/socket.h:335:119: note:
      passing argument to parameter '__src_addr_length' here
  ...__n, int __flags, struct sockaddr* __src_addr, socklen_t* __src_addr_len...
                                                               ^
/home/desarrollo/liblinphone/linphone-sdk/external/mbedtls/library/net_sockets.c:385:59: error:
      passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *')
      converts between pointers to integer types with different sign
      [-Werror,-Wpointer-sign]
                         (struct sockaddr *) &local_addr, &n ) != 0 ||
                                                          ^~
/home/desarrollo/android_ndk/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/sys/socket.h:310:76: note:
      passing argument to parameter '__addr_length' here
  ...int getsockname(int __fd, struct sockaddr* __addr, socklen_t* __addr_len...
                                                                   ^
4 errors generated.
library/CMakeFiles/mbedtls.dir/build.make:86: recipe for target 'library/CMakeFiles/mbedtls.dir/net_sockets.c.o' failed
make[8]: *** [library/CMakeFiles/mbedtls.dir/net_sockets.c.o] Error 1
CMakeFiles/Makefile2:197: recipe for target 'library/CMakeFiles/mbedtls.dir/all' failed
make[7]: *** [library/CMakeFiles/mbedtls.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make[6]: *** [all] Error 2

I wonder if anyone can help me. Only the -DLINPHONESDK_PLATFORM=Android fails. I built succesfully liblinphone for Desktop but not for Android

Best Regards

_______________________________________________
Linphone-developers mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/linphone-developers