Issue Summary
I am attempting to compile OCLINT 0.13.1 on MacOS 10.13.6, it keeps failing at 61%
Environment
- Operation system name and version: MacOS 10.13.6
- OCLint version:0.13.1
- How OCLint is installed: prebuilt binary downloaded from github
Reproduction Steps
Simply compile using the ./make script in oclint-scipts directory.
Sample code
The end of the output from the compile.
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_iossim_dynamic.dir/rtl/tsan_libdispatch_mac.cc.o
[ 61%] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.ios.dir/asan_suppressions.cc.o
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:227:27: error: conflicting types for 'dispatch_sync'
DISPATCH_INTERCEPT_SYNC_B(dispatch_sync, false)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/dispatch/queue.h:292:1: note: previous declaration
is here
dispatch_sync(dispatch_queue_t queue, DISPATCH_NOESCAPE dispatch_block_t block);
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:228:27: error: conflicting types for 'dispatch_barrier_sync'
DISPATCH_INTERCEPT_SYNC_B(dispatch_barrier_sync, true)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/dispatch/queue.h:1278:1: note: previous declaration
is here
dispatch_barrier_sync(dispatch_queue_t queue,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:268:24: error: conflicting types for 'dispatch_once'
TSAN_INTERCEPTOR(void, dispatch_once, dispatch_once_t *predicate,
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/dispatch/once.h:73:1: note: previous declaration is
here
dispatch_once(dispatch_once_t *predicate,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:478:24: error: conflicting types for 'dispatch_apply'
TSAN_INTERCEPTOR(void, dispatch_apply, size_t iterations,
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk/usr/include/dispatch/queue.h:389:1: note: previous declaration
is here
dispatch_apply(size_t iterations,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:522:47: warning: cast from 'const void *' to 'void *' drops const qualifier
[-Wcast-qual]
destructor = ^(void) { WRAP(free)((void *)buffer); };
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:524:49: warning: cast from 'const void *' to 'void *' drops const qualifier
[-Wcast-qual]
destructor = ^(void) { WRAP(munmap)((void *)buffer, size); };
^
2 warnings and 4 errors generated.
make[2]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_iossim_dynamic.dir/rtl/tsan_libdispatch_mac.cc.o] Error 1
make[1]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_iossim_dynamic.dir/all] Error 2
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_stack_trace.cc.o
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
[ 61%] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.ios.dir/asan_thread.cc.o
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_stat.cc.o
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_suppressions.cc.o
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
[ 61%] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.ios.dir/asan_win.cc.o
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_symbolize.cc.o
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
[ 61%] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic.ios.dir/asan_new_delete.cc.o
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_sync.cc.o
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_interceptors_mac.cc.o
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:115:1: warning: cast from 'volatile int *' to 'unsigned int *' drops volatile
qualifier [-Wcast-qual]
OSATOMIC_INTERCEPTORS_CAS(OSAtomicCompareAndSwapInt, tsan_atomic32, a32, int)
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:103:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:115:1: warning: cast from 'volatile int *' to 'unsigned int *' drops volatile
qualifier [-Wcast-qual]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:111:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:116:1: warning: cast from 'volatile long *' to 'unsigned long long *' drops
volatile qualifier [-Wcast-qual]
OSATOMIC_INTERCEPTORS_CAS(OSAtomicCompareAndSwapLong, tsan_atomic64, a64,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:103:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:116:1: warning: cast from 'volatile long *' to 'unsigned long long *' drops
volatile qualifier [-Wcast-qual]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:111:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:118:1: warning: cast from 'void *volatile *' to 'unsigned long long *' drops
volatile qualifier [-Wcast-qual]
OSATOMIC_INTERCEPTORS_CAS(OSAtomicCompareAndSwapPtr, tsan_atomic64, a64,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:103:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:118:1: warning: cast from 'void *volatile *' to 'unsigned long long *' drops
volatile qualifier [-Wcast-qual]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:111:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:120:1: warning: cast from 'volatile int *' to 'unsigned int *' drops volatile
qualifier [-Wcast-qual]
OSATOMIC_INTERCEPTORS_CAS(OSAtomicCompareAndSwap32, tsan_atomic32, a32,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:103:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:120:1: warning: cast from 'volatile int *' to 'unsigned int *' drops volatile
qualifier [-Wcast-qual]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:111:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:122:1: warning: cast from 'volatile long long *' to 'unsigned long long *'
drops volatile qualifier [-Wcast-qual]
OSATOMIC_INTERCEPTORS_CAS(OSAtomicCompareAndSwap64, tsan_atomic64, a64,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:103:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:122:1: warning: cast from 'volatile long long *' to 'unsigned long long *'
drops volatile qualifier [-Wcast-qual]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:111:19: note: expanded from macro 'OSATOMIC_INTERCEPTORS_CAS'
(tsan_t *)ptr, (tsan_t *)&old_value, (tsan_t)new_value,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:139:1: warning: cast from 'volatile void *' to 'char *' drops volatile
qualifier [-Wcast-qual]
OSATOMIC_INTERCEPTORS_BITOP(OSAtomicTestAndSet, tsan_atomic8_fetch_or, false)
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:136:3: note: expanded from macro 'OSATOMIC_INTERCEPTORS_BITOP'
OSATOMIC_INTERCEPTOR_BITOP(f, op, clear, kMacOrderNonBarrier)
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:128:31: note: expanded from macro 'OSATOMIC_INTERCEPTOR_BITOP'
char *byte_ptr = ((char *)ptr) + (n >> 3);
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:139:1: warning: cast from 'volatile void *' to 'char *' drops volatile
qualifier [-Wcast-qual]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:137:3: note: expanded from macro 'OSATOMIC_INTERCEPTORS_BITOP'
OSATOMIC_INTERCEPTOR_BITOP(f##Barrier, op, clear, kMacOrderBarrier)
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:128:31: note: expanded from macro 'OSATOMIC_INTERCEPTOR_BITOP'
char *byte_ptr = ((char *)ptr) + (n >> 3);
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:140:1: warning: cast from 'volatile void *' to 'char *' drops volatile
qualifier [-Wcast-qual]
OSATOMIC_INTERCEPTORS_BITOP(OSAtomicTestAndClear, tsan_atomic8_fetch_and,
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:136:3: note: expanded from macro 'OSATOMIC_INTERCEPTORS_BITOP'
OSATOMIC_INTERCEPTOR_BITOP(f, op, clear, kMacOrderNonBarrier)
^
/Users/laiyoung/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:128:31: note: expanded from macro 'OSATOMIC_INTERCEPTOR_BITOP'
char *byte_ptr = ((char *)ptr) + (n >> 3);
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:140:1: warning: cast from 'volatile void *' to 'char *' drops volatile
qualifier [-Wcast-qual]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:137:3: note: expanded from macro 'OSATOMIC_INTERCEPTORS_BITOP'
OSATOMIC_INTERCEPTOR_BITOP(f##Barrier, op, clear, kMacOrderBarrier)
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc:128:31: note: expanded from macro 'OSATOMIC_INTERCEPTOR_BITOP'
char *byte_ptr = ((char *)ptr) + (n >> 3);
^
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_libdispatch_mac.cc.o
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
14 warnings generated.
[ 61%] Building CXX object projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_platform_mac.cc.o
clang: warning: argument unused during compilation: '-msse3' [-Wunused-command-line-argument]
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:227:27: error: conflicting types for 'dispatch_sync'
DISPATCH_INTERCEPT_SYNC_B(dispatch_sync, false)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/dispatch/queue.h:292:1: note: previous declaration is here
dispatch_sync(dispatch_queue_t queue, DISPATCH_NOESCAPE dispatch_block_t block);
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:228:27: error: conflicting types for 'dispatch_barrier_sync'
DISPATCH_INTERCEPT_SYNC_B(dispatch_barrier_sync, true)
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/dispatch/queue.h:1278:1: note: previous declaration is here
dispatch_barrier_sync(dispatch_queue_t queue,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:268:24: error: conflicting types for 'dispatch_once'
TSAN_INTERCEPTOR(void, dispatch_once, dispatch_once_t *predicate,
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/dispatch/once.h:73:1: note: previous declaration is here
dispatch_once(dispatch_once_t *predicate,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:478:24: error: conflicting types for 'dispatch_apply'
TSAN_INTERCEPTOR(void, dispatch_apply, size_t iterations,
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/dispatch/queue.h:389:1: note: previous declaration is here
dispatch_apply(size_t iterations,
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:522:47: warning: cast from 'const void *' to 'void *' drops const qualifier
[-Wcast-qual]
destructor = ^(void) { WRAP(free)((void *)buffer); };
^
/Users/laiyoung_/OCLint/oclint-0.13.1/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc:524:49: warning: cast from 'const void *' to 'void *' drops const qualifier
[-Wcast-qual]
destructor = ^(void) { WRAP(munmap)((void *)buffer, size); };
^
2 warnings and 4 errors generated.
make[2]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/rtl/tsan_libdispatch_mac.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan_ios_dynamic.dir/all] Error 2
[ 61%] Built target RTAsan_dynamic.ios
make: *** [all] Error 2
Expected Behavior
compile success
Actual Behavior
compile fail
Even Better
~/OCLint/oclint-0.13.1/oclint-scripts
is I'm in the current path ,execute command ./make
,I try again several times, is an error in 61% of the time, and are in the same place.
Thank you very much for check my problem,I wish you a happy work。