Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1865

Thrift don't build on Android

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • None
    • None
    • C++ - Library
    • Debian Gnu/linux, using Android NDK r8d.

    Description

      Cross-compiling Thrift development version to Android give me the following error:
      ""In file included from /android-ndk-r8d/platforms/android-9/arch-arm/usr/include/sys/un.h:31:0,
      from /thrift/lib/cpp/src/thrift/transport/TSocket.cpp:26:
      /android-ndk-r8d/platforms/android-9/arch-arm/usr/include/linux/un.h:18:2: error: 'sa_family_t' does not name a type
      /thrift/lib/cpp/src/thrift/transport/TSocket.cpp: In member function 'void apache::thrift::transport::TSocket::openConnection(addrinfo*)':
      /thrift/lib/cpp/src/thrift/transport/TSocket.cpp:250:13: error: 'struct sockaddr_un' has no member named 'sun_family'
      make[1]: *** [obj/local/armeabi/objs/thrift-static/src/thrift/transport/TSocket.o] Error 1""

      Looking throught the git repository I found this commit: "THRIFT-1740 Make C++ library build on OS X and iOS".
      It removes the import 'sys/socket.h' from socket.ccp needed by the struct 'sockaddr_un'. The problems arises because on some kernels versions the header 'linux/un.h' didn't include 'linux/socket.h' and didnt have sa_family_t defined.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              deiv David
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: