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

I'm compile XBMC for iOS with the following configuration:
$ cd $HOME/XBMC
$ cd tools/depends
$ ./bootstrap
$ ./configure --host=arm-apple-darwin
$ make
I get the 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 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
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 it is complaining about a binary operator here, is this a XBMC bug?

I'm new to clang, however I managed to fix this issue. Open the file:
dnssd.c
And paste the following code at the top of the file:
#ifndef __has_feature // Optional of course.
#define __has_feature(x) 0 // Compatibility with non-clang compilers.
#endif
#ifndef __has_extension
#define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
#endif
It will improve compatibility with some compilers as of Clang Language documentation.

Related

Unable to install johnson with gem

I am trying to install johnson, in order to install harmony with Centos 8.
gem install johnson
I keep getting the error that there is no such file as node.h. But I have clearly installed nodejs, and nodejs-devel (I used the latest packages from stream: nodejs:18)
I am using Discourse community software, so require a specific version or ruby
current directory: /usr/local/share/gems/gems/johnson-1.2.0/ext/spidermonkey
make "DESTDIR="
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey/Linux_All_DBG.OBJ -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DXP_UNIX -m64 -o context.o -c context.c
In file included from context.h:4,
from context.c:1:
spidermonkey.h:21: warning: "MAYBE_UNUSED" redefined
# define MAYBE_UNUSED(name) name __attribute__((unused))
In file included from /usr/include/ruby/config.h:18,
from /usr/include/ruby/ruby.h:24,
from /usr/include/ruby.h:33,
from spidermonkey.h:7,
from context.h:4,
from context.c:1:
/usr/include/ruby/config-x86_64.h:152: note: this is the location of the previous definition
#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey/Linux_All_DBG.OBJ -I/usr/local/share/gems/gems/johnson-1.2.0/vendor/spidermonkey -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -g -Wall -Wextra -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline -DXP_UNIX -m64 -o conversions.o -c conversions.c
In file included from conversions.h:4,
from conversions.c:1:
spidermonkey.h:21: warning: "MAYBE_UNUSED" redefined
# define MAYBE_UNUSED(name) name __attribute__((unused))
In file included from /usr/include/ruby/config.h:18,
from /usr/include/ruby/ruby.h:24,
from /usr/include/ruby.h:33,
from spidermonkey.h:7,
from conversions.h:4,
from conversions.c:1:
/usr/include/ruby/config-x86_64.h:152: note: this is the location of the previous definition
#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
In file included from conversions.c:2:
js_land_proxy.h:11:10: fatal error: node.h: No such file or directory
#include "node.h"
^~~~~~~~
compilation terminated.
make: *** [Makefile:245: conversions.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/share/gems/gems/johnson-1.2.0 for inspection.
Results logged to /usr/local/lib64/gems/ruby/johnson-1.2.0/gem_make.out

Error installing Python 2 via Homebrew on MacOS High Sierra

I experience troubles installing Python#2 via homebrew on MacOS High Sierra. During the make process it simply fails with the "expected function body after function declarator error" on several occasions.
Based on the messages from the make process it seems that it has to do something with the fact Command Line Tools on High Sierra are updated to MacOSX10.14.sdk. The question now is how to downgrade the SDK to 10.13?
clang -c -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/main.o Modules/main.c
clang -c -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/gcmodule.o Modules/gcmodule.c
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/threadmodule.c -o Modules/threadmodule.o
In file included from Python/mactoolboxglue.c:27:
In file included from Include/pymactoolbox.h:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:24:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:29:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AppleEvents.h:597:165: error: expected function body after function declarator
extern OSStatus AEDeterminePermissionToAutomateTarget( const AEAddressDesc* target, AEEventClass theAEEventClass, AEEventID theAEEventID, Boolean askUserIfNeeded ) __OSX_AVAILABLE_STARTING( __MAC_10_14, __IPHONE_NA );
^
/usr/include/Availability.h:216:50: note: expanded from macro '__OSX_AVAILABLE_STARTING'
#define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_osx
^
<scratch space>:95:1: note: expanded from here
__AVAILABILITY_INTERNAL__MAC_10_14
^
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/signalmodule.c -o Modules/signalmodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/posixmodule.c -o Modules/posixmodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/errnomodule.c -o Modules/errnomodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/pwdmodule.c -o Modules/pwdmodule.o
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_sre.c -o Modules/_sre.o
In file included from Python/mactoolboxglue.c:27:
In file included from clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_codecsmodule.c -o Modules/_codecsmodule.o
Include/pymactoolbox.h:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:67:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:200:51: error: expected ';' after top level declarator
typedef struct OpaqueInkTextRef* InkTextRef DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:222:53: error: expected ';' after top level declarator
typedef struct OpaqueInkStrokeRef* InkStrokeRef DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:251:49: error: expected ';' after top level declarator
typedef struct InkPoint InkPoint DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:252:52: error: expected ';' after top level declarator
typedef InkPoint * InkPointPtr DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:262:58: error: expected ';' after top level declarator
typedef CFIndex InkAlternateCount DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:274:63: error: expected ';' after top level declarator
typedef FourCharCode InkUserWritingModeType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:289:70: error: expected ';' after top level declarator
typedef FourCharCode InkApplicationWritingModeType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:303:34: error: expected ';' after top level declarator
typedef UInt32 InkDrawingModeType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:318:36: error: expected ';' after top level declarator
typedef UInt32 InkTextDrawFlagsType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:361:34: error: expected ';' after top level declarator
typedef UInt32 InkTerminationType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:427:29: error: expected ';' after top level declarator
typedef UInt32 InkSourceType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:454:34: error: expected ';' after top level declarator
typedef UInt32 InkRecognitionType DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:546:36: error: expected ';' after top level declarator
typedef FourCharCode InkGestureKind DEPRECATED_IN_MAC_OS_X_VERSION_10_14_AND_LATER;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:776:63: error: expected function body after function declarator
InkUserWritingMode(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:810:73: error: expected function body after function declarator
InkSetApplicationWritingMode(InkApplicationWritingModeType iWriteWhere) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:837:71: error: expected function body after function declarator
InkSetApplicationRecognitionMode(InkRecognitionType iRecognitionType) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:901:63: error: expected function body after function declarator
InkTerminationType iAllowedTerminationTypes) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/Ink.framework/Headers/Ink.h:934:63: error: expected function body after function declarator
InkIsPhraseInProgress(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_14;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -I/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_weakref.c -o Modules/_weakref.o
20 errors generated.
make: *** [Python/mactoolboxglue.o] Error 1
make: *** Waiting for unfinished jobs....
I know that Python is installed in the MacOS but this is dependency for two tools I wanted to install through Homebrew.
In order to resolve the problem the Command Line Tools should be reinstalled in two steps:
Remove the Command Line Tools
sudo rm -rf /Library/Developer/CommandLineTools
Installing Command Line Tools
xcode-select --install
The newly installed version creates a symlink for both versions, MacOSX10.13.sdk and MacOSX.14.sdk.

recipe for target 'cinset' failed

I am trying to install ace and tao following this tutorial and this one. But after i enter "make" command from TAO_wrapper directory, i get below error:
make[1]: Leaving directory '/home/robot/ACE_wrappers/apps/gperf'
make[1]: Entering directory '/home/robot/ACE_wrappers/apps/gperf/src'
GNUmakefile: /home/robot/ACE_wrappers/apps/gperf/src/GNUmakefile.gperf MAKEFLAGS=w
make[1]: Leaving directory '/home/robot/ACE_wrappers/apps/gperf/src'
make[1]: Entering directory '/home/robot/ACE_wrappers/apps/gperf/tests'
GNUmakefile: /home/robot/ACE_wrappers/apps/gperf/tests/GNUmakefile.cinset MAKEFLAGS=w
g++ -fvisibility=hidden -fvisibility-inlines-hidden -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -I/home/robot/ACE_wrappers -D__ACE_INLINE__ -I../../.. -c -o .obj/c.o /home/robot/ACE_wrappers/apps/gperf/tests/c.cpp
g++ -fvisibility=hidden -fvisibility-inlines-hidden -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -I/home/robot/ACE_wrappers -D__ACE_INLINE__ -I../../.. -c -o .obj/test.o /home/robot/ACE_wrappers/apps/gperf/tests/test.cpp
g++ -fvisibility=hidden -fvisibility-inlines-hidden -Wnon-virtual-dtor -O3 -ggdb -pthread -fno-strict-aliasing -Wall -W -Wpointer-arith -pipe -D_GNU_SOURCE -I/home/robot/ACE_wrappers -D__ACE_INLINE__ -I../../.. -Wl,-E -L/home/robot/ACE_wrappers/lib -L. -L../../../lib -o cout .obj/c.o .obj/test.o -lACE -ldl -lrt
.obj/test.o: In function `main':
/home/robot/ACE_wrappers/apps/gperf/tests/test.cpp:24: undefined reference to `in_word_set(char const*, unsigned int)'
/home/robot/ACE_wrappers/apps/gperf/tests/test.cpp:24: undefined reference to `in_word_set(char const*, unsigned int)'
collect2: error: ld returned 1 exit status
GNUmakefile.cinset:196: recipe for target 'cout' failed
make[1]: *** [cout] Error 1
make[1]: Leaving directory '/home/robot/ACE_wrappers/apps/gperf/tests'
GNUmakefile:1241: recipe for target 'cinset' failed
make: *** [cinset] Error 2
When i compile the gperf, ace packaes individually i didn't get any error. But when i try to compile the hole ACE_wrapper package i get the error.
Probably something got messed up on your file system. As this is just an unit test this should not be a problem to ignore. As alternative you can run make realclean and make.

Can't compile libjpeg-turbo for iOS on Xcode 5 / Clang toolchain with SIMD / NEON support

Looks like with Xcode 5 and the removal of LLVM-GCC-4.2 and its replacement by Clang, building libjpeg-turbo for iOS devices now fails during the compilation of NEON support.
Configure step:
export PLATFORM="iPhoneOS"
export IPHONE_SDK="7.0"
export IPHONE_MIN_VERSION="5.0"
export DEVELOPER=`xcode-select --print-path`
export DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export SDKROOT="${DEVROOT}/SDKs/${PLATFORM}${IPHONE_SDK}.sdk"
export CC=`xcrun -find gcc`
export LD=`xcrun -find ld`
export IOS_CFLAGS="-arch armv7"
export CFLAGS="-O3 ${IOS_CFLAGS} -isysroot ${SDKROOT}"
export LDFLAGS="${IOS_CFLAGS} -isysroot ${SDKROOT}"
export CPPFLAGS="${CFLAGS}"
export CFLAGS="${CFLAGS} -miphoneos-version-min=${IPHONE_MIN_VERSION}"
./configure --with-jpeg8 --host arm-apple-darwin --enable-static --disable-shared
...
checking if we have SIMD optimisations for cpu type... yes (arm)
checking if the assembler is GNU-compatible and can be used... yes
...
Build step:
make -j4
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in java
echo timestamp > classnodist_noinst.stamp
Making all in simd
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -E -I.. -I../simd ./jsimdcfg.inc.h | grep -E "^[\;%]|^\ %" | sed 's%_cpp_protection_%%' | sed 's#% define#%define#g' > jsimdcfg.inc
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
if /bin/sh ../libtool --mode=compile --tag=CC /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.0 -MT jsimd_arm.lo -MD -MP -MF ".deps/jsimd_arm.Tpo" -c -o jsimd_arm.lo jsimd_arm.c; \
then mv -f ".deps/jsimd_arm.Tpo" ".deps/jsimd_arm.Plo"; else rm -f ".deps/jsimd_arm.Tpo"; exit 1; fi
/bin/sh ../libtool --mode=compile gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.0 -c -o jsimd_arm_neon.lo jsimd_arm_neon.S
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[3]: *** [jsimd_arm_neon.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -O3 -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.0 -MT jsimd_arm.lo -MD -MP -MF .deps/jsimd_arm.Tpo -c jsimd_arm.c -o jsimd_arm.o
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Any idea how to fix this? The build succeeds if disabling SIMD support but that's obviously not great.
It has been fixed by the maintainer of libjpeg-turbo:
http://sourceforge.net/mailarchive/message.php?msg_id=31902025
What is needed is a special CLANG compatible version of gas-preprocessor:
http://sourceforge.net/p/libjpeg-turbo/code/HEAD/tree/gas-preprocessor/
There is a known issue when cross-compiling for iOS on OSX:
http://sourceforge.net/mailarchive/message.php?msg_id=30462917
In short, you need to run
$ autoreconf -fiv
in the libjpeg-turbo directory before running configure.
On OSX 10.9 and Xcode 5, below are the versions of tools that you will need to compile the lib successfully. Newer versions will not work.
autoconf 2.69
nasm 2.08.01
automake 1.13
Alternatively, you can just use the prebuilt binaries that comes with the DMG:
http://sourceforge.net/mailarchive/forum.php?thread_name=5255ABCE.8070705%40users.sourceforge.net&forum_name=libjpeg-turbo-users

invalid value '' in '-std=' when switch from GCC 4.2 to LLVM 2.0

I'd like to change from using GCC version 4.2 to LLVM version 2.0 in XCode4.
When I change the compiler flag to to LLVM I get an error: invalid value '' in '-std='. Was having it in the *_prefix.pch file, but after turning off the GCC_Precompile_prefix_header the error moved to a new point in my code.
The initial value use seems to refer to an empty string.
What's going on here.
The full error message is below.
Many thanks
CompileC /Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/Objects-normal/i386/GameViewController.o Classes/GameViewController.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/cram/Projects/MightyMemory
setenv LANG en_US.US-ASCII
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/usr/local/git/bin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std= -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -fexceptions -fasm-blocks -mmacosx-version-min=10.6 -gdwarf-2 -fvisibility=hidden -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -iquote /Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/MightyMemory-generated-files.hmap -I/Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/MightyMemory-own-target-headers.hmap -I/Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/MightyMemory-all-target-headers.hmap -iquote /Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/MightyMemory-project-headers.hmap -I/Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Products/Debug-iphonesimulator/include -I/Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/DerivedSources/i386 -I/Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/DerivedSources -F/Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Products/Debug-iphonesimulator -include /Users/cram/Projects/MightyMemory/MaxMemory_Prefix.pch -c /Users/cram/Projects/MightyMemory/Classes/GameViewController.m -o /Users/cram/Library/Developer/Xcode/DerivedData/MightyMemory-cceuiavwfpmibiczfvlodqgugfnb/Build/Intermediates/MightyMemory.build/Debug-iphonesimulator/MightyMemory.build/Objects-normal/i386/GameViewController.o
error: invalid value '' in '-std='
I solved the problem. For the next person to run up against this: It turns out that the options that were passed to the compiler were incorrect; not that I changed them from what they were when using gcc. The error was that the GCC_C_LANGUAGE_STANDARD was not set, i.e. the argument that XCode4 put is was '' (a blank string). I set it to compiler default and all was good.

Resources