Error installing Python 2 via Homebrew on MacOS High Sierra - homebrew

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.

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

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.

bundle install fails installing ruby-oci8 on osx 10.9

I ran 'bundle install' with ruby 2.0 and when it gets to the ruby-oci8 gem it fails.
"xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin13 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -g -Os -pipe -I/opt/oracle_11_2/instantclient_11_2/rdbms/public conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L. -L/usr/local/lib -arch x86_64 -arch i386 -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/opt/oracle_11_2/instantclient_11_2/lib -lclntsh -lruby.2.0.0 -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/opt/oracle_11_2/instantclient_11_2/lib -lclntsh -lpthread -ldl -lobjc "
conftest.c:7:29: error: too few arguments to function call, expected 5, have 0
int t(void) { OCIInitialize(); return 0; }
~~~~~~~~~~~~~ ^
/opt/oracle_11_2/instantclient_11_2/rdbms/public/ociap.h:7085:1: note: 'OCIInitialize' declared here
sword OCIInitialize (ub4 mode, void *ctxp,
How do I fix this?
turns out I had the 32 bit instead of the 64 bit oracle instantclient

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

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.

issues installing gem install bcrypt-ruby -v '3.0.1' on Mac OSX 10.8.2

Trying to troubleshoot a web app and in doing so I am going through the steps in http://wiki.dreamhost.com/Rails_3. I am stuck on trying to get the console to run. It asks me to bundle and then when I get an error for bcrypt-ruby -v '3.0.1'. This is the error i get when i try to use gem install:
gem install bcrypt-ruby -v '3.0.1'
Building native extensions. This could take a while...
ERROR: Error installing bcrypt-ruby:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
creating Makefile
make
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c bcrypt_ext.c
xcrun: Error: failed to exec real xcrun. (No such file or directory)
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c crypt.c
xcrun: Error: failed to exec real xcrun. (No such file or directory)
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c crypt_blowfish.c
xcrun: Error: failed to exec real xcrun. (No such file or directory)
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c crypt_gensalt.c
xcrun: Error: failed to exec real xcrun. (No such file or directory)
xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c wrapper.c
xcrun: Error: failed to exec real xcrun. (No such file or directory)
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o bcrypt_ext.bundle bcrypt_ext.o crypt.o crypt_blowfish.o crypt_gensalt.o wrapper.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl -lobjc
clang: error: no such file or directory: 'bcrypt_ext.o'
clang: error: no such file or directory: 'crypt.o'
clang: error: no such file or directory: 'crypt_blowfish.o'
clang: error: no such file or directory: 'crypt_gensalt.o'
clang: error: no such file or directory: 'wrapper.o'
make: *** [bcrypt_ext.bundle] Error 1
Gem files will remain installed in /Users/karrde00/.gems/gems/bcrypt-ruby-3.0.1 for inspection.
Results logged to /Users/karrde00/.gems/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out

Resources