2017-05-03 24 views
0

문서에 따르면, Mac을 지원해야하지만, iotivity를 만들려고 할 때 posix 특정 인 것으로 생각되는 일부 헤더가 사용됩니다.Mac에서 건물 iotivity

➜ iotivity git:(master) ✗ scons SYS_VERSION=10.12 
scons: Reading SConscript files ... 
Checking for POSIX Thread Support...(cached) yes 
HEAD is now at acf202a Fix stack corruption due to calling convention mismatch 

*********************************** Info: ***************************************** 
* Using FORKED copy of libCoap located in:          * 
* resource/csdk/connectivity/lib/libcoap-4.1.1         * 
*********************************************************************************** 
Given Transport is ALL 
Given OS is darwin 
BUILD_SAMPLE is ON 
MQ flag is OFF 
Reading ca script ALL 
Reading common folder script 
Reading util folder script 
Copied IoTivity version of config.h to /Users/zcourts/projects/iotivity/extlibs/mbedtls/mbedtls/include/mbedtls/config.h 
Reading IP adapter script 
Reading IP adapter script 
Include path is ['../api', '/usr/local/include', '/Users/zcourts/projects/iotivity/deps/darwin/include', '/Users/zcourts/projects/iotivity/extlibs/tinycbor/tinycbor/src', '/Users/zcourts/projects/iotivity/resource/c_common', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/oic_malloc/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/oic_string/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/oic_time/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/ocatomic/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/ocrandom/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/octhread/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/oic_platform/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/c_common/octimer/include', '#/extlibs/mbedtls/mbedtls/include', '/Users/zcourts/projects/iotivity/out/darwin/x86_64/release/resource/csdk/logger/include', '#/resource/c_common', '#resource/csdk/connectivity/lib/libcoap-4.1.1/include', '../inc', '/Users/zcourts/projects/iotivity/resource/csdk/logger/include', '../common/inc', '../util/inc', '#resource/c_common/octhread/include/', '#resource/csdk/connectivity/common/inc/', '#resource/csdk/logger/include/', '#extlibs/mbedtls/mbedtls/include', '#/resource/c_common/octimer/include', '/Users/zcourts/projects/iotivity/resource/csdk/security/include', '../external/inc'] 
Files path is ['/Users/zcourts/projects/iotivity/resource/csdk/connectivity/common/src/uarraylist.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/common/src/ulinklist.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/common/src/uqueue.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/common/src/caremotehandler.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/common/src/cathreadpool_pthreads.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/util/src/cautilinterface.c', './adapter_util/caadapterutils.c', './adapter_util/cafragmentation.c', './adapter_util/ca_adapter_net_ssl.c', './cablockwisetransfer.c', './caconnectivitymanager.c', './cainterfacecontroller.c', './camessagehandler.c', './canetworkconfigurator.c', './caprotocolmessage.c', './caqueueingthread.c', './caretransmission.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/src/ip_adapter/caipadapter.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/src/ip_adapter/caipserver.c', '/Users/zcourts/projects/iotivity/resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c'] 
*** Checking for installation of google unit test 1.7.0 *** 
scons: done reading SConscript files. 
scons: Building targets ... 
scons: building associated VariantDir targets: out/darwin/x86_64/release 
Compiling out/darwin/x86_64/release/resource/c_common/octhread/src/posix/octhread.o 
resource/c_common/octhread/src/posix/octhread.c:90:5: error: unknown type name 'pthread_mutex_t'; did you mean 'pthread_attr_t'? 
    pthread_mutex_t mutex; 
    ^~~~~~~~~~~~~~~ 
    pthread_attr_t 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk//usr/include/sys/_pthread/_pthread_attr_t.h:30:33: note: 'pthread_attr_t' declared here 
typedef __darwin_pthread_attr_t pthread_attr_t; 
           ^
resource/c_common/octhread/src/posix/octhread.c:103:5: error: unknown type name 'pthread_cond_t'; did you mean 'pthread_attr_t'? 
    pthread_cond_t cond; 
    ^~~~~~~~~~~~~~ 
    pthread_attr_t 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk//usr/include/sys/_pthread/_pthread_attr_t.h:30:33: note: 'pthread_attr_t' declared here 
typedef __darwin_pthread_attr_t pthread_attr_t; 
           ^
resource/c_common/octhread/src/posix/octhread.c:104:5: error: unknown type name 'pthread_condattr_t'; did you mean 'pthread_attr_t'? 
    pthread_condattr_t condattr; 
    ^~~~~~~~~~~~~~~~~~ 
    pthread_attr_t 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk//usr/include/sys/_pthread/_pthread_attr_t.h:30:33: note: 'pthread_attr_t' declared here 
typedef __darwin_pthread_attr_t pthread_attr_t; 
           ^
resource/c_common/octhread/src/posix/octhread.c:109:5: error: unknown type name 'pthread_t' 
    pthread_t thread; 
    ^
resource/c_common/octhread/src/posix/octhread.c:128:22: warning: implicit declaration of function 'pthread_create' is invalid in C99 [-Wimplicit-function-declaration] 
     int result = pthread_create(&threadInfo->thread, NULL, start_routine, arg); 
        ^
resource/c_common/octhread/src/posix/octhread.c:170:19: warning: implicit declaration of function 'pthread_join' is invalid in C99 [-Wimplicit-function-declaration] 
    int joinres = pthread_join(threadInfo->thread, NULL); 
       ^
resource/c_common/octhread/src/posix/octhread.c:187:17: warning: implicit declaration of function 'pthread_mutex_init' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret=pthread_mutex_init(&(mutexInfo->mutex), PTHREAD_MUTEX_DEFAULT); 
       ^
resource/c_common/octhread/src/posix/octhread.c:187:57: error: use of undeclared identifier 'PTHREAD_MUTEX_DEFAULT' 
     int ret=pthread_mutex_init(&(mutexInfo->mutex), PTHREAD_MUTEX_DEFAULT); 
                 ^
resource/c_common/octhread/src/posix/octhread.c:215:19: warning: implicit declaration of function 'pthread_mutex_destroy' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_mutex_destroy(&mutexInfo->mutex); 
       ^
resource/c_common/octhread/src/posix/octhread.c:239:19: warning: implicit declaration of function 'pthread_mutex_lock' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_mutex_lock(&mutexInfo->mutex); 
       ^
resource/c_common/octhread/src/posix/octhread.c:273:19: warning: implicit declaration of function 'pthread_mutex_unlock' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_mutex_unlock(&mutexInfo->mutex); 
       ^
resource/c_common/octhread/src/posix/octhread.c:314:19: warning: implicit declaration of function 'pthread_condattr_init' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_condattr_init(&(eventInfo->condattr)); 
       ^
resource/c_common/octhread/src/posix/octhread.c:342:15: warning: implicit declaration of function 'pthread_cond_init' is invalid in C99 [-Wimplicit-function-declaration] 
     ret = pthread_cond_init(&(eventInfo->cond), &(eventInfo->condattr)); 
      ^
resource/c_common/octhread/src/posix/octhread.c:350:13: warning: implicit declaration of function 'pthread_condattr_destroy' is invalid in C99 [-Wimplicit-function-declaration] 
      pthread_condattr_destroy(&(eventInfo->condattr)); 
      ^
resource/c_common/octhread/src/posix/octhread.c:367:19: warning: implicit declaration of function 'pthread_cond_destroy' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_cond_destroy(&(eventInfo->cond)); 
       ^
resource/c_common/octhread/src/posix/octhread.c:390:19: warning: implicit declaration of function 'pthread_cond_signal' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_cond_signal(&(eventInfo->cond)); 
       ^
resource/c_common/octhread/src/posix/octhread.c:407:19: warning: implicit declaration of function 'pthread_cond_broadcast' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_cond_broadcast(&(eventInfo->cond)); 
       ^
resource/c_common/octhread/src/posix/octhread.c:431:17: error: incomplete result type 'struct timespec' in function definition 
struct timespec oc_get_current_time() 
       ^
resource/c_common/octhread/src/posix/octhread.c:431:8: note: forward declaration of 'struct timespec' 
struct timespec oc_get_current_time() 
    ^
resource/c_common/octhread/src/posix/octhread.c:439:5: warning: implicit declaration of function 'gettimeofday' is invalid in C99 [-Wimplicit-function-declaration] 
    gettimeofday(&tv, NULL); 
    ^
resource/c_common/octhread/src/posix/octhread.c:440:21: error: variable has incomplete type 'struct timespec' 
    struct timespec ts; 
        ^
resource/c_common/octhread/src/posix/octhread.c:431:8: note: forward declaration of 'struct timespec' 
struct timespec oc_get_current_time() 
    ^
resource/c_common/octhread/src/posix/octhread.c:448:5: error: unknown type name 'time_t'; did you mean 'size_t'? 
    time_t secPart = microseconds/USECS_PER_SEC; 
    ^~~~~~ 
    size_t 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk//usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here 
typedef __darwin_size_t  size_t; 
          ^
resource/c_common/octhread/src/posix/octhread.c:450:26: error: incomplete definition of type 'struct timespec' 
    uint64_t totalNs = ts->tv_nsec + nsecPart; 
         ~~^ 
resource/c_common/octhread/src/posix/octhread.c:431:8: note: forward declaration of 'struct timespec' 
struct timespec oc_get_current_time() 
    ^
resource/c_common/octhread/src/posix/octhread.c:451:5: error: unknown type name 'time_t'; did you mean 'size_t'? 
    time_t secOfNs = totalNs/NANOSECS_PER_SEC; 
    ^~~~~~ 
    size_t 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk//usr/include/sys/_types/_size_t.h:30:32: note: 'size_t' declared here 
typedef __darwin_size_t  size_t; 
          ^
resource/c_common/octhread/src/posix/octhread.c:453:7: error: incomplete definition of type 'struct timespec' 
    ts->tv_nsec = (totalNs)% NANOSECS_PER_SEC; 
    ~~^ 
resource/c_common/octhread/src/posix/octhread.c:431:8: note: forward declaration of 'struct timespec' 
struct timespec oc_get_current_time() 
    ^
resource/c_common/octhread/src/posix/octhread.c:454:7: error: incomplete definition of type 'struct timespec' 
    ts->tv_sec += secPart + secOfNs; 
    ~~^ 
resource/c_common/octhread/src/posix/octhread.c:431:8: note: forward declaration of 'struct timespec' 
struct timespec oc_get_current_time() 
    ^
resource/c_common/octhread/src/posix/octhread.c:479:25: error: variable has incomplete type 'struct timespec' 
     struct timespec abstime = { .tv_sec = 0 }; 
         ^
resource/c_common/octhread/src/posix/octhread.c:431:8: note: forward declaration of 'struct timespec' 
struct timespec oc_get_current_time() 
    ^
resource/c_common/octhread/src/posix/octhread.c:495:19: warning: implicit declaration of function 'pthread_cond_timedwait' is invalid in C99 [-Wimplicit-function-declaration] 
      ret = pthread_cond_timedwait(&(eventInfo->cond), &(mutexInfo->mutex), &abstime); 
       ^
resource/c_common/octhread/src/posix/octhread.c:520:19: warning: implicit declaration of function 'pthread_cond_wait' is invalid in C99 [-Wimplicit-function-declaration] 
     int ret = pthread_cond_wait(&eventInfo->cond, &mutexInfo->mutex); 
       ^
15 warnings and 13 errors generated. 
scons: *** [out/darwin/x86_64/release/resource/c_common/octhread/src/posix/octhread.o] Error 1 
scons: building terminated because of errors. 
➜ iotivity git:(master) ✗ 

것은 내가 https://wiki.iotivity.org/macosx_build_instructions의 지침

https://wiki.iotivity.org/build_for_your_system이보고했다가 가리키는하지만, 명시 적으로 맥 지원을 활성화 할 것 플래그를 볼 수 없습니다 다음과 같은거야. 누구나 이것이 실제로 지원되고 최근 커밋에서 깨진 지 알고 있습니까? 이틀 전에 건물 주인을 확인 했어.

windows-port 브랜치가 있지만 브랜치라는 이름의 브랜치는 없습니다. remotes/origin/1.3-rel도 같은 문제가 있습니다.

https://stackoverflow.com/a/24947106/400048을 찾았습니다. 사용중인 posix 특정 헤더에 대한 나의 주장이 나옵니다.

이렇게 Mac에 Mac을 설치할 수 있는지 누가 알 수 있습니까?

답변

1

이 시점에서 "공식적으로 지원되는"플랫폼 또는 대상이 아니므로 과거의 건강 상태를 수집했습니다. 어떤 사람들은 Mac을 위해 괜찮은 행운을 빕니다. 그것을 개선하기위한 변화는 확실히 고려 될 것이며, "맥 포트 관리자"가 다시 부패하지 않도록 할 수있는 여지가있다. (그리고 맥 빌드 가능을 추가 한 github 프로젝트가있다. 그러나 오히려 시대에 뒤떨어지기 때문에 - 거기에서 픽스를 시작할 수 있습니다 : https://github.com/OpenOCF/iochibity)

+0

슬랙/irc 채팅에서 그 점을 지적했습니다. 지금 우분투로 테스트하기 – zcourts