My ffi installation failed with a pretty similar error message:
mkdir -p "/Library/Ruby/Gems/1.8/gems/ffi-1.9.0/ext/ffi_c"/libffi-i386; (if [ ! -f "/Library/Ruby/Gems/1.8/gems/ffi-1.9.0/ext/ffi_c"/libffi-i386/Makefile ]; then echo "Configuring libffi for i386"; cd "/Library/Ruby/Gems/1.8/gems/ffi-1.9.0/ext/ffi_c"/libffi-i386 && env CC=" xcrun cc" CFLAGS="-arch i386 " LDFLAGS="-arch i386" "/Library/Ruby/Gems/1.8/gems/ffi-1.9.0/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --host=i386-apple-darwin > /dev/null; fi); env MACOSX_DEPLOYMENT_TARGET=10.4 make -C "/Library/Ruby/Gems/1.8/gems/ffi-1.9.0/ext/ffi_c"/libffi-i386 Configuring libffi for i386 configure: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used configure: error: in `/Library/Ruby/Gems/1.8/gems/ffi-1.9.0/ext/ffi_c/libffi-i386': configure: error: C compiler cannot create executables
I noticed xcrun cc in the command and tried to start it manually, gave me an Apple message that I did not agree with the Xcode command line license agreement. After sudo xcrun cc, the installation was successful.
$ xcrun cc Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo. $ sudo xcrun cc You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode. Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf' ...
`` ``
T Kurki
source share