1

次の構成で iOS 用の XBMC をコンパイルしています。

$ cd $HOME/XBMC $ cd tools/depends $ ./bootstrap $ ./configure --host=arm-apple-darwin $ make

次の出力が得られます。

>/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 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/dispatch/dispatch.h:49,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/dns_sd.h:140,
                 from 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

これでdispatch.h 49行を見つけます:

#include <dispatch/base.h>

この dns_sd.h 140 行:

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

これの base.h 103 行:

 #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 行:

 #define DISPATCH_SENTINEL __attribute__((__sentinel__))

この dnssd.c 62 行:

 #include <dns_sd.h>
 #define DNSSD_STDCALL

ここで二項演算子について不平を言っている理由がわかりません。これは XBMC のバグですか?

4

1 に答える 1