build - compile XBMC for iOS error with missing binary operator before token "(" -


i'm compile xbmc ios following configuration:

$ cd $home/xbmc $ cd tools/depends $ ./bootstrap $ ./configure --host=arm-apple-darwin $ make

i following output:

>/bin/sh ../../libtool  --tag=cc   --mode=compile /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/usr/bin/llvm-gcc-4.2 -dhave_config_h -i. -i../..  -i../../include/shairplay  -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -wno-trigraphs -fpascal-strings -o3 -wreturn-type -wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2  -isysroot /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk -i/users/shared/xbmc-depends/iphoneos6.1_armv7-target/include   -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -wno-trigraphs -fpascal-strings -o3 -wreturn-type -wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2  -isysroot /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk -i/users/shared/xbmc-depends/iphoneos6.1_armv7-target/include  -mt libshairplay_la-dnssd.lo -md -mp -mf .deps/libshairplay_la-dnssd.tpo -c -o libshairplay_la-dnssd.lo `test -f 'dnssd.c' || echo './'`dnssd.c libtool: compile:  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/usr/bin/llvm-gcc-4.2 -dhave_config_h -i. -i../.. -i../../include/shairplay -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -wno-trigraphs -fpascal-strings -o3 -wreturn-type -wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2 -isysroot /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk -i/users/shared/xbmc-depends/iphoneos6.1_armv7-target/include -std=gnu99 -no_compact_linkedit -no-cpp-precomp -mcpu=cortex-a8 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -pipe -wno-trigraphs -fpascal-strings -o3 -wreturn-type -wunused-variable -fmessage-length=0 -gdwarf-2 -arch armv7 -miphoneos-version-min=4.2 -isysroot /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk -i/users/shared/xbmc-depends/iphoneos6.1_armv7-target/include -mt libshairplay_la-dnssd.lo -md -mp -mf .deps/libshairplay_la-dnssd.tpo -c dnssd.c  -fno-common -dpic -o .libs/libshairplay_la-dnssd.o in file included /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk/usr/include/dispatch/dispatch.h:49,                  /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk/usr/include/dns_sd.h:140,                  dnssd.c:62: /applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos6.1.sdk/usr/include/dispatch/base.h:103:44: error: missing binary operator before token "(" make[7]: *** [libshairplay_la-dnssd.lo] error 1 make[6]: *** [all-recursive] error 1 make[5]: *** [all-recursive] error 1 make[4]: *** [all-recursive] error 1 make[3]: *** [all] error 2 make[2]: *** [iphoneos6.1_armv7-target/src/lib/.libs/libshairplay.so.0.0.0] error 2 make[1]: *** [libshairplay] error 2 make: *** [target/.installed-iphoneos6.1_armv7-target] error 2 

i find dispatch.h 49 line in this:

#include <dispatch/base.h> 

dns_sd.h 140 line in this:

 #if _dns_sd_libdispatch  #include <dispatch/dispatch.h>  #endif 

base.h 103 line in this:

 #if defined(__has_feature) && __has_feature(objc_fixed_enum)  #define dispatch_enum(name, type, ...) \       typedef enum : type { __va_args__ } name##_t  #else  #define dispatch_enum(name, type, ...) \       enum { __va_args__ }; typedef type name##_t  #endif 

base.h 44 line in this:

 #define dispatch_sentinel __attribute__((__sentinel__)) 

dnssd.c 62 line in this:

 #include <dns_sd.h>  #define dnssd_stdcall 

i don't understand why complaining binary operator here, xbmc bug?

i'm new clang, managed fix issue. open file:

dnssd.c 

and paste following code @ top of file:

#ifndef __has_feature         // optional of course.   #define __has_feature(x) 0  // compatibility non-clang compilers. #endif #ifndef __has_extension   #define __has_extension __has_feature // compatibility pre-3.0 compilers. #endif 

it improve compatibility compilers of clang language documentation.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -