Error while compiling GnuPG for iOS Simulator + iOS - ios

So I've stumbled across this link today: https://github.com/jmstone617/gnutls-gpg-gpgme-for-ios
Now I want to compile the static framework for both the iOS Simulator and the Device. I'm running OS X Yosemite beta 3 and have Xcode 5 as well as Xcode 6 beta 3 installed. I am using the Developer tools of Xcode 6. I also modified the SDKVERSION flag inside build-pgp.sh to 8.0, since I want to compile for the beta. When running sudo ./build-gpg.sh, it finishes really fast but doesn't compile anything.
This is the shell script output:
Downloading gnupg-1.4.16.tar.bz2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3571k 100 3571k 0 0 984k 0 0:00:03 0:00:03 --:--:-- 984k
Building gnupg for iPhoneSimulator 8.0 i386
Follow the build log with: tail -f /Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/bin/iPhoneSimulator8.0-i386.sdk/build-gnupg-1.4.16.log
Please stand by...
When looking at the log file, I saw this:
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... i386-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i386-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... scripts/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
configure: autobuild project... gnupg
configure: autobuild revision... 1.4.16
configure: autobuild hostname... GLaDOS
configure: autobuild timestamp... 20140717-002358
checking for style of include used by make... GNU
checking for i386-apple-darwin-gcc... /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions
checking whether the C compiler works... no
configure: error: in `/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16':
configure: error: C compiler cannot create executables
See `config.log' for more details
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... i386-apple-darwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for i386-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... scripts/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
configure: autobuild project... gnupg
configure: autobuild revision... 1.4.16
configure: autobuild hostname... GLaDOS
configure: autobuild timestamp... 20140717-004756
checking for style of include used by make... GNU
checking for i386-apple-darwin-gcc... /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions
checking whether the C compiler works... no
configure: error: in `/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16':
configure: error: C compiler cannot create executables
See `config.log' for more details
Looking inside config.logI saw this:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by gnupg configure 1.4.16, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --host=i386-apple-darwin --prefix=/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/bin/iPhoneSimulator8.0-i386.sdk --disable-dependency-tracking
## --------- ##
## Platform. ##
## --------- ##
hostname = GLaDOS
uname -m = x86_64
uname -r = 14.0.0
uname -s = Darwin
uname -v = Darwin Kernel Version 14.0.0: Mon Jun 30 11:54:42 PDT 2014; root:xnu-2782.1.20~3/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 14.0.0: Mon Jun 30 11:54:42 PDT 2014; root:xnu-2782.1.20~3/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 8.00 gigabytes
Default processor set: 241 tasks, 1056 threads, 8 processors
Load average: 2.19, Mach factor: 5.80
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/MacGPG2/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2744: checking build system type
configure:2758: result: x86_64-apple-darwin14.0.0
configure:2778: checking host system type
configure:2791: result: i386-apple-darwin
configure:2827: checking for a BSD-compatible install
configure:2895: result: /usr/bin/install -c
configure:2906: checking whether build environment is sane
configure:2956: result: yes
configure:3005: checking for i386-apple-darwin-strip
configure:3035: result: no
configure:3045: checking for strip
configure:3061: found /usr/bin/strip
configure:3072: result: strip
configure:3097: checking for a thread-safe mkdir -p
configure:3136: result: scripts/install-sh -c -d
configure:3149: checking for gawk
configure:3179: result: no
configure:3149: checking for mawk
configure:3179: result: no
configure:3149: checking for nawk
configure:3179: result: no
configure:3149: checking for awk
configure:3165: found /usr/bin/awk
configure:3176: result: awk
configure:3187: checking whether make sets $(MAKE)
configure:3209: result: yes
configure:3293: autobuild project... gnupg
configure:3295: autobuild revision... 1.4.16
configure:3299: autobuild hostname... GLaDOS
configure:3308: autobuild timestamp... 20140717-004756
configure:3327: checking for style of include used by make
configure:3355: result: GNU
configure:3386: checking for i386-apple-darwin-gcc
configure:3413: result: /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions
configure:3682: checking for C compiler version
configure:3691: /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions --version >&5
Apple LLVM version 6.0 (clang-600.0.38) (based on LLVM 3.5svn)
Target: i386-apple-darwin14.0.0
Thread model: posix
configure:3702: $? = 0
configure:3691: /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions -v >&5
Apple LLVM version 6.0 (clang-600.0.38) (based on LLVM 3.5svn)
Target: i386-apple-darwin14.0.0
Thread model: posix
clang: warning: argument unused during compilation: '-fheinous-gnu-extensions'
configure:3702: $? = 0
configure:3691: /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3702: $? = 1
configure:3691: /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:3702: $? = 1
configure:3722: checking whether the C compiler works
configure:3744: /Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -I/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/include -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/usr/local/opt/gcc48/lib conftest.c >&5
ld: warning: directory not found for option '-L/usr/local/opt/gcc48/lib'
ld: building for MacOSX, but linking against dylib built for iOS Simulator file '/Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/lib/libSystem.dylib' for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:3748: $? = 1
configure:3786: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "gnupg"
| #define PACKAGE_TARNAME "gnupg"
| #define PACKAGE_VERSION "1.4.16"
| #define PACKAGE_STRING "gnupg 1.4.16"
| #define PACKAGE_BUGREPORT "http://bugs.gnupg.org"
| #define PACKAGE_URL ""
| #define PACKAGE "gnupg"
| #define VERSION "1.4.16"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3791: error: in `/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16':
configure:3793: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-apple-darwin14.0.0
ac_cv_env_CCASFLAGS_set=
ac_cv_env_CCASFLAGS_value=
ac_cv_env_CCAS_set=
ac_cv_env_CCAS_value=
ac_cv_env_CC_FOR_BUILD_set=
ac_cv_env_CC_FOR_BUILD_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -I/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/include'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/usr/local/opt/gcc48/lib'
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i386-apple-darwin
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i386-apple-darwin
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=awk
ac_cv_prog_CC='/Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions'
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16/scripts/missing --run aclocal-1.11'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE='#'
AMTAR='$${TAR-tar}'
AR='/Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar'
AUTOCONF='${SHELL} /Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16/scripts/missing --run autoconf'
AUTOHEADER='${SHELL} /Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16/scripts/missing --run autoheader'
AUTOMAKE='${SHELL} /Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16/scripts/missing --run automake-1.11'
AWK='awk'
BUILD_INCLUDED_LIBINTL=''
CAPLIBS=''
CATOBJEXT=''
CC='/Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin/gcc -arch i386 -fheinous-gnu-extensions'
CCAS=''
CCASDEPMODE=''
CCASFLAGS=''
CCDEPMODE=''
CC_FOR_BUILD=''
CFLAGS='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -I/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/include'
CFLAG_VISIBILITY=''
CPP=''
CPPFLAGS=''
CROSS_COMPILING_FALSE=''
CROSS_COMPILING_TRUE=''
CYGPATH_W='echo'
DATADIRNAME=''
DEFS=''
DEPDIR='.deps'
DLLIBS=''
DNSLIBS=''
DOCBOOK_TO_MAN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
ENABLE_AGENT_SUPPORT_FALSE=''
ENABLE_AGENT_SUPPORT_TRUE=''
ENABLE_BZIP2_SUPPORT_FALSE=''
ENABLE_BZIP2_SUPPORT_TRUE=''
ENABLE_CARD_SUPPORT_FALSE=''
ENABLE_CARD_SUPPORT_TRUE=''
ENABLE_LOCAL_ZLIB_FALSE=''
ENABLE_LOCAL_ZLIB_TRUE=''
ENABLE_SELINUX_HACKS_FALSE=''
ENABLE_SELINUX_HACKS_TRUE=''
EXEEXT=''
FAKE_CURL_FALSE=''
FAKE_CURL_TRUE=''
GENCAT=''
GETOPT=''
GETTEXT_MACRO_VERSION=''
GLIBC21=''
GLIBC2=''
GMSGFMT=''
GMSGFMT_015=''
GPGKEYS_CURL=''
GPGKEYS_FINGER=''
GPGKEYS_HKP=''
GPGKEYS_LDAP=''
GPGKEYS_MAILTO=''
GREP=''
HAVE_ASPRINTF=''
HAVE_DOCBOOK_TO_MAN_FALSE=''
HAVE_DOCBOOK_TO_MAN_TRUE=''
HAVE_DOSISH_SYSTEM_FALSE=''
HAVE_DOSISH_SYSTEM_TRUE=''
HAVE_NEWLOCALE=''
HAVE_POSIX_PRINTF=''
HAVE_SHM_FALSE=''
HAVE_SHM_TRUE=''
HAVE_SNPRINTF=''
HAVE_USTAR_FALSE=''
HAVE_USTAR_TRUE=''
HAVE_VISIBILITY=''
HAVE_W32_SYSTEM_FALSE=''
HAVE_W32_SYSTEM_TRUE=''
HAVE_WPRINTF=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
INSTOBJEXT=''
INTLBISON=''
INTLLIBS=''
INTLOBJS=''
INTL_DEFAULT_VERBOSITY=''
INTL_LIBTOOL_SUFFIX_PREFIX=''
INTL_MACOSX_LIBS=''
LDAPLIBS=''
LDAP_CPPFLAGS=''
LDFLAGS='-arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/usr/local/opt/gcc48/lib'
LIBCURL=''
LIBCURL_CPPFLAGS=''
LIBICONV=''
LIBINTL=''
LIBMULTITHREAD=''
LIBOBJS=''
LIBPTH=''
LIBPTH_PREFIX=''
LIBREADLINE=''
LIBS=''
LIBTHREAD=''
LIBUSB=''
LIBUSB_CPPFLAGS=''
LTLIBC=''
LTLIBICONV=''
LTLIBINTL=''
LTLIBMULTITHREAD=''
LTLIBOBJS=''
LTLIBPTH=''
LTLIBTHREAD=''
MAINT=''
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE=''
MAKEINFO='${SHELL} /Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16/scripts/missing --run makeinfo'
MKDIR_P='scripts/install-sh -c -d'
MPI_EXTRA_ASM_OBJS=''
MPI_OPT_FLAGS=''
MPI_SFLAGS=''
MSGFMT=''
MSGFMT_015=''
MSGMERGE=''
NETLIBS=''
NM='/Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm'
NOEXECSTACK_FLAGS=''
OBJEXT=''
PACKAGE='gnupg'
PACKAGE_BUGREPORT='http://bugs.gnupg.org'
PACKAGE_NAME='gnupg'
PACKAGE_STRING='gnupg 1.4.16'
PACKAGE_TARNAME='gnupg'
PACKAGE_URL=''
PACKAGE_VERSION='1.4.16'
PATH_SEPARATOR=':'
PERL=''
POSUB=''
PRI_MACROS_BROKEN=''
RANLIB='/Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib'
SENDMAIL=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP='strip'
TAR=''
USE_DNS_SRV_FALSE=''
USE_DNS_SRV_TRUE=''
USE_INCLUDED_LIBINTL=''
USE_INTERNAL_REGEX_FALSE=''
USE_INTERNAL_REGEX_TRUE=''
USE_NLS=''
USE_RNDEGD_FALSE=''
USE_RNDEGD_TRUE=''
USE_RNDLINUX_FALSE=''
USE_RNDLINUX_TRUE=''
USE_RNDUNIX_FALSE=''
USE_RNDUNIX_TRUE=''
USE_RNDW32_FALSE=''
USE_RNDW32_TRUE=''
USE_SHA512_FALSE=''
USE_SHA512_TRUE=''
USE_SIMPLE_GETTEXT_FALSE=''
USE_SIMPLE_GETTEXT_TRUE=''
VERSION='1.4.16'
W32LIBS=''
WINDRES=''
WOE32=''
WOE32DLL=''
XGETTEXT=''
XGETTEXT_015=''
XGETTEXT_EXTRA_OPTIONS=''
ZLIBS=''
_libcurl_config=''
_usb_config=''
ac_ct_CC=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCCAS_FALSE=''
am__fastdepCCAS_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include='include'
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-apple-darwin14.0.0'
build_alias=''
build_cpu='x86_64'
build_os='darwin14.0.0'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i386-apple-darwin'
host_alias='i386-apple-darwin'
host_cpu='i386'
host_os='darwin'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/src/gnupg-1.4.16/scripts/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(top_builddir)/scripts/install-sh -c -d'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/Users/lars/Documents/Development/SecureMailIOS/gnutls-gpg-gpgme-for-ios/bin/iPhoneSimulator8.0-i386.sdk'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "gnupg"
#define PACKAGE_TARNAME "gnupg"
#define PACKAGE_VERSION "1.4.16"
#define PACKAGE_STRING "gnupg 1.4.16"
#define PACKAGE_BUGREPORT "http://bugs.gnupg.org"
#define PACKAGE_URL ""
#define PACKAGE "gnupg"
#define VERSION "1.4.16"
configure: exit 77
I tried changing my command line tools to the old Xcode 5 installation and set the SDKVERSION back to iOS 7, but that gave me the same error.
I don't really see where the problem lies here, so I'd appreciate any help I can get!
Thanks in advance!

Edit the file build-gpg.sh and change line number 87 from:
export LDFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -L/usr/local/opt/gcc48/lib"
to:
export LDFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -L/usr/local/opt/gcc48/lib -miphoneos-version-min=7.0"
i.e. add -miphoneos-version-min=7.0 to the end.
Before you run build-gpg.sh again make sure you delete the src directory (if it exists) to create a clean build.
Also:
Run build-libgpg-error.sh before running build-gpg.sh.
Change the last cp command in build-gpg.sh from include/g to include/*.

Related

Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template

I am getting this when trying to install React Native for MacOS.
$ npx react-native init myproject
ld: warning: dylib (/usr/local/opt/llvm/lib/libc++.dylib) was built for newer macOS version (10.15) than being linked (10.13)
ld: warning: dylib (/usr/local/opt/llvm/lib/libunwind.dylib) was built for newer macOS version (10.15) than being linked (10.13)
ld: warning: dylib (/usr/local/opt/llvm/lib/libunwind.dylib) was built for newer macOS version (10.15) than being linked (10.13)
ld: warning: dylib (/usr/local/opt/llvm/lib/libc++.dylib) was built for newer macOS version (10.15) than being linked (10.13)
ld: warning: dylib (/usr/local/opt/llvm/lib/libunwind.dylib) was built for newer macOS version (10.15) than being linked (10.13)
ld: warning: dylib (/usr/local/opt/llvm/lib/libunwind.dylib) was built for newer macOS version (10.15) than being linked (10.13)
...
✔ Downloading template
✔ Copying template
✔ Processing template
✖ Installing CocoaPods dependencies (this may take a few minutes)
✖ Installing CocoaPods dependencies (this may take a few minutes)
error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./myproject/ios && pod install".
CocoaPods documentation: https://cocoapods.org/
$ cd ./myproject/ios && pod install
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Downloading dependencies
Installing CocoaAsyncSocket (7.6.5)
Installing CocoaLibEvent (1.0.0)
Installing DoubleConversion (1.1.6)
Installing FBLazyVector (0.63.4)
Installing FBReactNativeSpec (0.63.4)
Installing Flipper (0.54.0)
Installing Flipper-DoubleConversion (1.1.7)
Installing Flipper-Folly (2.3.0)
Installing Flipper-Glog (0.3.6)
[!] /bin/bash -c
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"
if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
# Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
# it's better to rely on platform name as fallback because architecture differs between simulator and device
if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
CURRENT_ARCH="x86_64"
else
CURRENT_ARCH="armv7"
fi
fi
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"
# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
rm test-driver
fi
./configure --host arm-apple-darwin
# Fix build for tvOS
cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif
/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif
/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF
# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk
checking whether the C compiler works... no
/Users/lancepollard/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
Try `/Users/lancepollard/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/lancepollard/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
See `config.log' for more details
A snippet from config.log says:
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3685: $? = 1
configure:3674: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:3685: $? = 1
configure:3705: checking whether the C compiler works
configure:3727: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk -I/usr/local/opt/llvm/include -L/usr/local/opt/llvm/lib conftest.c >&5
ld: in '/usr/local/opt/llvm/lib/libunwind.dylib', building for iOS-armv7 but attempting to link with file built for macOS-x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:3731: $? = 1
configure:3769: result: no
configure: failed program was:
...
configure: exit 77
My Mac version is Catalina 10.15.7 (19H2). XCode is version 12.
I tried everything from React-Native: Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template, but nothing worked. I invoked brew install cocoapods as well.
Any ideas how to get past this? Could it be something to do with the fact that I have a node_modules folder higher up in the directory structure (above where I am running the commands)? I don't know what this error means.
Here is also output from the missing command:
$ /Users/lancepollard/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help
/Users/lancepollard/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing [OPTION]... PROGRAM [ARGUMENT]...
Handle `PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file `aclocal.m4'
autoconf touch file `configure'
autoheader touch file `config.h.in'
autom4te touch the output file, or create a stub one
automake touch all `Makefile.in' files
bison create `y.tab.[ch]', if possible, from existing .[ch]
flex create `lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create `lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create `y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake#gnu.org>.
Removing LDFLAGS and CPPFLAGS in my bashrc fixed it for me!
This error happened to me as well. It was because of old CocoaPods version. I used version 1.8.0. After upgrading it to version 1.10.1, the error was gone
I was able to fix my error by upgrading:
MacOS to Monterrey 12.0.1
XCODE to 13.1
Setting the location on XCODE
Install additional tools when prompted the first time you open XCODE
Here is my RN current configuration
react-native info
info Fetching system and libraries information...
System:
OS: macOS 12.0.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU # 2.60GHz
Memory: 104.32 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.4 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - /usr/local/bin/npm
Watchman: 2021.10.18.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
Android SDK:
API Levels: 29, 30
Build Tools: 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3
System Images: android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7199119
Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
Languages:
Java: javac 16 - /usr/bin/javac
Python: 2.7.18 - /usr/bin/python
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.0 => 0.66.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
HERE IS MY ORIGINAL ERROR - when unable to install PODs
Installing Flipper-Glog (0.3.6)
[!] /usr/local/bin/bash -c
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"
if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
# Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
# it's better to rely on platform name as fallback because architecture differs between simulator and device
if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
CURRENT_ARCH="x86_64"
else
CURRENT_ARCH="armv7"
fi
fi
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"
# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
rm test-driver
fi
./configure --host arm-apple-darwin
# Fix build for tvOS
cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif
/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif
/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
EOF
# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Applications/Xcode 12.5.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -arch armv7 -isysroot /Applications/Xcode 12.5.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk
checking whether the C compiler works... no
/Users/jonathans/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing: Unknown `--is-lightweight' option
Try `/Users/jonathans/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/jonathans/Library/Caches/CocoaPods/Pods/Release/Flipper-Glog/0.3.6-1dfd6':
configure: error: C compiler cannot create executables
See `config.log' for more details
[1]: https://i.stack.imgur.com/YAYsL.png
Issue seems to be that since the IOS 15 release, RN, simulators and XCODE need to be upgraded together.
After I upgraded MacOS & XCODE, then pods installed and was able run the simulator properly.

Why clang produced "argument unused" warning for -nostdinc++ for executables, but not for libraries

I'm needing to use custom libc++ so I'm passing -nostdinc++ for CMAKE_CXX_FLAGS. This works fine for libraries but for executables, I get this warning:
clang: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
Question: Why?
More details
My CMAKE_CXX_FLAGS flags passed to compiler are:
set(CMAKE_CXX_FLAGS "-nostdinc++ -isystem ${LIBCXX_INC_PATH}")
My CMAKE_EXE_LINKER_FLAGS flags passed to linked are:
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi -lm -lc -lgcc_s -lgcc -ldl -Wl,-rpath,${LIBCXX_LIB_PATH}")
Clang verbos output:
Scanning dependencies of target DroneServer
[ 98%] Building CXX object DroneServer/CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o
clang version 3.9.1-4ubuntu3~16.04.1 (tags/RELEASE_391/rc2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;#m64
Selected multilib: .;#m64
"/usr/lib/llvm-3.9/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -v -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-file /home/shitals/GitHubSrc/AirSim/build_debug/DroneServer/CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o -nostdinc++ -resource-dir /usr/lib/llvm-3.9/bin/../lib/clang/3.9.1 -isystem /home/shitals/GitHubSrc/AirSim/llvm-build/output/include/c++/v1 -I /home/shitals/GitHubSrc/AirSim/eigen/eigen3 -I /home/shitals/GitHubSrc/AirSim/DroneServer -I /home/shitals/GitHubSrc/AirSim/MavLinkCom/include -I /home/shitals/GitHubSrc/AirSim/external/rpclib/include -I /home/shitals/GitHubSrc/AirSim/AirLib/include -D __CLANG__ -D MSGPACK_PP_VARIADICS_MSVC=0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -Wextra -Wstrict-aliasing -Wunreachable-code -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Wswitch-default -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-variadic-macros -Wno-parentheses -Wno-unused-function -Wno-unused -Wno-documentation -std=c++14 -fdeprecated-macro -fdebug-compilation-dir /home/shitals/GitHubSrc/AirSim/build_debug/DroneServer -ferror-limit 10 -fmessage-length 286 -pthread -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o -x c++ /home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp
clang -cc1 version 3.9.1 based upon LLVM 3.9.1 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/home/shitals/GitHubSrc/AirSim/eigen/eigen3
/home/shitals/GitHubSrc/AirSim/DroneServer
/home/shitals/GitHubSrc/AirSim/MavLinkCom/include
/home/shitals/GitHubSrc/AirSim/external/rpclib/include
/home/shitals/GitHubSrc/AirSim/AirLib/include
/home/shitals/GitHubSrc/AirSim/llvm-build/output/include/c++/v1
/usr/local/include
/usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
[100%] Linking CXX executable ../output/bin/DroneServer
clang version 3.9.1-4ubuntu3~16.04.1 (tags/RELEASE_391/rc2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;#m64
Selected multilib: .;#m64
clang: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
"/usr/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../output/bin/DroneServer /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../.. -L/usr/lib/llvm-3.9/bin/../lib -L/lib -L/usr/lib -lc++ -lc++abi -lm -lc -lgcc_s -lgcc -ldl -rpath /home/shitals/GitHubSrc/AirSim/llvm-build/output/lib CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o -lpthread ../output/lib/libAirLib.a ../output/lib/libMavLinkCom.a ../output/lib/libAirSim-rpclib.a -lpthread -lpthread -lc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crtn.o
[100%] Built target DroneServer

Libupnp for iOS - Armv7, Arm64

I have problem to commpile libupnp for iOS.
Commpilation for i386 and x86_64 works very good.
configre can not be passed for armv7, arm64. inttypes.h is missing for iPhoneOS.
Can anybody help me out ?
Configure LOG:
./build-libupnp.sh
Using libupnp-1.6.6.tar.bz2
Building ibupnp for iPhoneOS 8.4 armv7s
Please stand by...
patching file upnp/src/genlib/net/http/httpreadwrite.c
patching file upnp/src/api/upnpapi.c
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.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for armv7-apple-darwin-strip... no
checking for strip... strip
checking build system type... i386-apple-darwin15.0.0
checking host system type... armv7-apple-darwin
checking for --enable-debug... no
checking for --enable-client... yes
checking for --enable-device... yes
checking for --enable-webserver... yes
checking for --enable-tools... no
checking for --enable-samples... no
checking for documentation directory... ${datarootdir}/doc/libupnp-1.6.6
checking for armv7-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/usr/bin/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /Applications/Xcode.app/Contents/Developer/usr/bin/gcc accepts -g... yes
checking for /Applications/Xcode.app/Contents/Developer/usr/bin/gcc option to accept ISO C89... unsupported
checking for style of include used by make... GNU
checking dependency style of /Applications/Xcode.app/Contents/Developer/usr/bin/gcc... gcc3
checking whether /Applications/Xcode.app/Contents/Developer/usr/bin/gcc and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by /Applications/Xcode.app/Contents/Developer/usr/bin/gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... /Applications/Xcode.app/Contents/Developer/usr/bin/gcc -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking dlfcn.h usability... no
checking dlfcn.h presence... yes
configure: WARNING: dlfcn.h: present but cannot be compiled
configure: WARNING: dlfcn.h: check for missing prerequisite headers?
configure: WARNING: dlfcn.h: see the Autoconf documentation
configure: WARNING: dlfcn.h: section "Present But Cannot Be Compiled"
configure: WARNING: dlfcn.h: proceeding with the preprocessor's result
configure: WARNING: dlfcn.h: in the future, the compiler will take precedence
configure: WARNING: ## --------------------------------------------- ##
configure: WARNING: ## Report this to mroberto#users.sourceforge.net ##
configure: WARNING: ## --------------------------------------------- ##
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... yes
checking whether /Applications/Xcode.app/Contents/Developer/usr/bin/g++ accepts -g... yes
checking dependency style of /Applications/Xcode.app/Contents/Developer/usr/bin/g++... gcc3
checking how to run the C++ preprocessor... /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -E
checking for armv7-apple-darwin-g77... no
checking for armv7-apple-darwin-f77... no
checking for armv7-apple-darwin-xlf... no
checking for armv7-apple-darwin-frt... no
checking for armv7-apple-darwin-pgf77... no
checking for armv7-apple-darwin-cf77... no
checking for armv7-apple-darwin-fort77... no
checking for armv7-apple-darwin-fl32... no
checking for armv7-apple-darwin-af77... no
checking for armv7-apple-darwin-f90... no
checking for armv7-apple-darwin-xlf90... no
checking for armv7-apple-darwin-pgf90... no
checking for armv7-apple-darwin-pghpf... no
checking for armv7-apple-darwin-epcf90... no
checking for armv7-apple-darwin-gfortran... no
checking for armv7-apple-darwin-g95... no
checking for armv7-apple-darwin-f95... no
checking for armv7-apple-darwin-fort... no
checking for armv7-apple-darwin-xlf95... no
checking for armv7-apple-darwin-ifort... no
checking for armv7-apple-darwin-ifc... no
checking for armv7-apple-darwin-efc... no
checking for armv7-apple-darwin-pgf95... no
checking for armv7-apple-darwin-lf95... no
checking for armv7-apple-darwin-ftn... no
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm output from /Applications/Xcode.app/Contents/Developer/usr/bin/gcc object... ok
checking for objdir... .libs
checking for armv7-apple-darwin-ar... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
checking for armv7-apple-darwin-ranlib... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
checking for armv7-apple-darwin-strip... strip
checking if /Applications/Xcode.app/Contents/Developer/usr/bin/gcc supports -fno-rtti -fno-exceptions... yes
checking for /Applications/Xcode.app/Contents/Developer/usr/bin/gcc option to produce PIC... -fno-common
checking if /Applications/Xcode.app/Contents/Developer/usr/bin/gcc PIC flag -fno-common works... yes
checking if /Applications/Xcode.app/Contents/Developer/usr/bin/gcc static flag -static works... no
checking if /Applications/Xcode.app/Contents/Developer/usr/bin/gcc supports -c -o file.o... yes
checking whether the /Applications/Xcode.app/Contents/Developer/usr/bin/gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by /Applications/Xcode.app/Contents/Developer/usr/bin/g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the /Applications/Xcode.app/Contents/Developer/usr/bin/g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for /Applications/Xcode.app/Contents/Developer/usr/bin/g++ option to produce PIC... -fno-common
checking if /Applications/Xcode.app/Contents/Developer/usr/bin/g++ PIC flag -fno-common works... yes
checking if /Applications/Xcode.app/Contents/Developer/usr/bin/g++ static flag -static works... no
checking if /Applications/Xcode.app/Contents/Developer/usr/bin/g++ supports -c -o file.o... yes
checking whether the /Applications/Xcode.app/Contents/Developer/usr/bin/g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin dyld
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for egrep... (cached) /usr/bin/grep -E
--------------------- Default compilation flags -------------------------------
host is armv7-apple-darwin
host_os is darwin
Using non-specific system compiler settings
checking CFLAGS for gcc -Os... -Os
checking CFLAGS for maximum warnings... -Wall
-------------------------------------------------------------------------------
checking for size_t... no
checking for off_t... no
checking for ANSI C header files... (cached) no
checking arpa/inet.h usability... no
checking arpa/inet.h presence... yes
configure: WARNING: arpa/inet.h: present but cannot be compiled
configure: WARNING: arpa/inet.h: check for missing prerequisite headers?
configure: WARNING: arpa/inet.h: see the Autoconf documentation
configure: WARNING: arpa/inet.h: section "Present But Cannot Be Compiled"
configure: WARNING: arpa/inet.h: proceeding with the preprocessor's result
configure: WARNING: arpa/inet.h: in the future, the compiler will take precedence
configure: WARNING: ## --------------------------------------------- ##
configure: WARNING: ## Report this to mroberto#users.sourceforge.net ##
configure: WARNING: ## --------------------------------------------- ##
checking for arpa/inet.h... yes
checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h: check for missing prerequisite headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h: section "Present But Cannot Be Compiled"
configure: WARNING: fcntl.h: proceeding with the preprocessor's result
configure: WARNING: fcntl.h: in the future, the compiler will take precedence
configure: WARNING: ## --------------------------------------------- ##
configure: WARNING: ## Report this to mroberto#users.sourceforge.net ##
configure: WARNING: ## --------------------------------------------- ##
checking for fcntl.h... yes
checking for inttypes.h... (cached) no
configure: error: required header file missing
Here is my script for building.
#!/bin/bash
# Automatic build script for libupnp
# for iPhoneOS and iPhoneSimulator
#
###########################################################################
# Change values here
#libupnp
VERSION="1.6.19"
###########################################################################
#
# Don't change anything here
SDKVERSION=`xcrun -sdk iphoneos --show-sdk-version`
CURRENTPATH=`pwd`
ARCHS="x86_64 i386 armv7s arm64"
DEVELOPER=`xcode-select -print-path`
##########
set -e
if [ ! -e libupnp-${VERSION}.tar.bz2 ]; then
echo "Downloading libupnp-${VERSION}.tar.bz2"
curl -O http://pkgs.fedoraproject.org/repo/pkgs/libupnp/libupnp-1.6.6.tar.bz2/8918dcf7428cd119d0c8275765ff2833/libupnp-${VERSION}.tar.bz2
else
echo "Using libupnp-${VERSION}.tar.bz2"
fi
mkdir -p bin
mkdir -p lib
mkdir -p src
for ARCH in ${ARCHS}
do
if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]];
then
PLATFORM="iPhoneSimulator"
else
PLATFORM="iPhoneOS"
fi
echo "Building libupnp for ${PLATFORM} ${SDKVERSION} ${ARCH}"
echo "Please stand by..."
rm -rf src/libupnp-${VERSION}
tar zxf libupnp-${VERSION}.tar.bz2 -C src
if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]] ; then
export BUILD_DEVROOT="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export BUILD_SDKROOT="${BUILD_DEVROOT}/SDKs/${PLATFORM}${SDKVERSION}.sdk"
else
export BUILD_DEVROOT="${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain"
export BUILD_SDKROOT="${DEVELOPER}/Platforms/iPhoneOS.platform/Developer/SDKs/${PLATFORM}${SDKVERSION}.sdk"
fi
export LD=${BUILD_DEVROOT}/usr/bin/ld
export CC=${DEVELOPER}/usr/bin/gcc
export CXX=${DEVELOPER}/usr/bin/g++
if [[ "${ARCH}" == "i386" || "${ARCH}" == "x86_64" ]];
then
export AR=${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
export AS=${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain/usr/bin/as
export NM=${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm
export RANLIB=${DEVELOPER}/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
else
export AR=${BUILD_DEVROOT}/usr/bin/ar
export AS=${BUILD_DEVROOT}/usr/bin/as
export NM=${BUILD_DEVROOT}/usr/bin/nm
export RANLIB=${DEVROOT}/usr/bin/ranlib
fi
export LDFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -L${CURRENTPATH}/lib -miphoneos-version-min=7.0"
export CFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -I${CURRENTPATH}/include -I/usr/include -miphoneos-version-min=7.0"
export CXXFLAGS="-arch ${ARCH} -pipe -no-cpp-precomp -isysroot ${BUILD_SDKROOT} -I${CURRENTPATH}/include -miphoneos-version-min=7.0"
mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk"
LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-libupnp-error-${VERSION}.log"
HOST=${ARCH}
if [ "${ARCH}" == "arm64" ];
then
HOST="aarch64"
fi
./configure --host=${HOST}-apple-darwin --prefix="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" --disable-shared --enable-static --disable-assembly
make
make install
cd ${CURRENTPATH}
rm -rf src/libupnp-${VERSION}
done
echo "Build library..."
lipo -create ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/lib/liblibupnp.a ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-x86_64.sdk/lib/liblibupnp.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7.sdk/lib/liblibupnp.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-armv7s.sdk/lib/liblibupnp.a ${CURRENTPATH}/bin/iPhoneOS${SDKVERSION}-arm64.sdk/lib/liblibupnp.a -output ${CURRENTPATH}/lib/liblibupnp.a
mkdir -p ${CURRENTPATH}/include/libupnp
cp -R ${CURRENTPATH}/bin/iPhoneSimulator${SDKVERSION}-i386.sdk/include/ ${CURRENTPATH}/include/libupnp/
echo "Building done."

"C Compiler not working" While building trying to build VLC in iOS

Here is part of my compilation result:
===============================================================================
You are ready to build VLC and its contribs
make: '.gas' is up to date.
[info] Building contrib for iOS in '/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/iPhoneOS-arm64'
[info] LD FLAGS SELECTED = '-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.1'
/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc
error: invalid deployment target '5.1.0' for architecture 'arm64' (requires
'7.0.0' or later)
1 error generated.
make: Nothing to be done for `fetch'.
error: invalid deployment target '5.1.0' for architecture 'arm64' (requires
'7.0.0' or later)
1 error generated.
sed -i.orig s/-ansi// freetype/builds/unix/configure
cd freetype && GNUMAKE=make CC="xcrun clang" CXX="xcrun clang++" LD="xcrun ld" AR="xcrun ar" CCAS="gas-preprocessor.pl xcrun clang -c" RANLIB="xcrun ranlib" STRIP="xcrun strip" PATH="/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64/bin:/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin:/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/extras/tools/build/bin:/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" CPPFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -arch arm64 -miphoneos-version-min=5.1 -O3 -g -arch arm64 -miphoneos-version-min=5.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -arch arm64 -miphoneos-version-min=5.1 -O3 -g -I/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64/include" CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -arch arm64 -miphoneos-version-min=5.1 -O3 -g -arch arm64 -miphoneos-version-min=5.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -arch arm64 -miphoneos-version-min=5.1 -O3 -g -I/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64/include -g" CXXFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -arch arm64 -miphoneos-version-min=5.1 -O3 -g -arch arm64 -miphoneos-version-min=5.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -arch arm64 -miphoneos-version-min=5.1 -O3 -g -arch arm64 -miphoneos-version-min=5.1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -arch arm64 -miphoneos-version-min=5.1 -O3 -g -I/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64/include -g -I/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64/include -g" LDFLAGS="-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.1 -arch arm64 -miphoneos-version-min=5.1 -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/lib -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -miphoneos-version-min=5.1 -L/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64/lib" ./configure --without-png --prefix="/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64" --build="arm-apple-darwin11" --host="x86_64-apple-darwin11" --target="x86_64-apple-darwin11" --program-prefix="" --enable-static --disable-shared --disable-dependency-tracking --with-pic
FreeType build system -- automatic system detection
The following settings are used:
platform unix
compiler xcrun clang
configuration directory ./builds/unix
configuration rules ./builds/unix/unix.mk
If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.
Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).
cd builds/unix; /bin/sh ./configure '--without-png' '--prefix=/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/arm-apple-darwin11-arm64' '--build=arm-apple-darwin11' '--host=x86_64-apple-darwin11' '--target=x86_64-apple-darwin11' '--program-prefix=' '--enable-static' '--disable-shared' '--disable-dependency-tracking' '--with-pic'
configure: WARNING: unrecognized options: --disable-dependency-tracking
checking build system type... arm-apple-darwin11
checking host system type... x86_64-apple-darwin11
checking for x86_64-apple-darwin11-gcc... xcrun clang
checking whether the C compiler works... no
configure: error: in `/Users/nikhil.t/VLCKit/MobileVLCKit/ImportedSources/vlc/contrib/iPhoneOS-arm64/freetype/builds/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [setup] Error 77
make: *** [.freetype2] Error 2
===================================================================
I am using guideline provided by VLC
I tried to change the xcrun path in build.sh (ImportedSources/vlc/extras/package/ios/build.sh) but it resets to original once I build the script.
Is there another way I could change this, so that c compiler works for me?
I am stuck on this for the last 9 days, please provide some guidance.
Thanks,
Albin.K.J
The first error is:
error: invalid deployment target '5.1.0' for architecture 'arm64' (requires
'7.0.0' or later)
... so I would suggest trying what it suggests: bumping the deployment target up from 5.1.0 to 7.0.0, or remove arm64 support.
May be wrong compiler path.
Check the CC points to the correct path also it is as expected in the script file.
I also have the same issue, setting CC correctly did the trick for me.
The required compilers are missing from your system. You need both a C++ compiler and a C compiler.
You can install the compilers (GCC and G++) using apt-get install gcc g++.

Compiling expat for iOS - Command /bin/sh failed with exit code 2

PS: My earlier question was different, that could be fixed, now I am running into new problem
I am trying to import the libkml library into my iOS project. I realised that expat libraries cannot be linked (?) and so have to build the expat sources for it again.
I found a SO link where a gentleman mentions that he could successfully link expat with his iOS SDK 5.1: How to compile expat with iOS SDK 5.1?
I tried the same using the [script available in github][2] as mentioned in the above link.
But, I am getting an error in the Run phase of the script. I could not make the most out of it but I need help to fix this.
The script used is the same as from github link. C++ standard library in the project is set to "Compiler default" which I presume is LLVM C++. Below is the output from config.log which I am not able to make out with my level of understanding. Please help me out in resolving this problem and build the library to link it across with my project:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by expat configure 2.0.1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --prefix=/Users/raj/Projects/test/bin/iPhoneSimulator5.0-i386.sdk --host=i386-apple-darwin --enable-static
## --------- ##
## Platform. ##
## --------- ##
hostname = Rajs-MacBook-Pro.local
uname -m = x86_64
uname -r = 12.3.0
uname -s = Darwin
uname -v = Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = Mach kernel version:
Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 4.00 gigabytes
Default processor set: 124 tasks, 641 threads, 8 processors
Load average: 1.70, Mach factor: 6.28
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
PATH: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/local/bin
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/bin
PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/usr/local/bin
PATH: /Applications/Xcode.app/Contents/Developer/usr/bin
PATH: /Applications/Xcode.app/Contents/Developer/usr/local/bin
PATH: /Applications/Xcode.app/Contents/Developer/Tools
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2092: checking build system type
configure:2110: result: i386-apple-darwin12.3.0
configure:2118: checking host system type
configure:2132: result: i386-apple-darwin
configure:2148: checking for i386-apple-darwin-gcc
configure:2174: result: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
configure:2456: checking for C compiler version
configure:2459: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --version </dev/null >&5
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2462: $? = 0
configure:2464: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -v </dev/null >&5
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
configure:2467: $? = 0
configure:2469: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -V </dev/null >&5
llvm-gcc-4.2: argument to `-V' is missing
configure:2472: $? = 1
configure:2495: checking for C compiler default output file name
configure:2498: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/raj/Projects/test/lib conftest.c >&5
configure:2501: $? = 0
configure:2547: result: a.out
configure:2552: checking whether the C compiler works
configure:2558: ./a.out
configure:2561: $? = 0
configure:2578: result: yes
configure:2585: checking whether we are cross compiling
configure:2587: result: no
configure:2590: checking for suffix of executables
configure:2592: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -o conftest -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/raj/Projects/test/lib conftest.c >&5
configure:2595: $? = 0
configure:2620: result:
configure:2626: checking for suffix of object files
configure:2647: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -c -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include conftest.c >&5
configure:2650: $? = 0
configure:2672: result: o
configure:2676: checking whether we are using the GNU C compiler
configure:2700: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -c -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include conftest.c >&5
configure:2706: $? = 0
configure:2710: test -z
|| test ! -s conftest.err
configure:2713: $? = 0
configure:2716: test -s conftest.o
configure:2719: $? = 0
configure:2732: result: yes
configure:2738: checking whether /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc accepts -g
configure:2759: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -c -g conftest.c >&5
configure:2765: $? = 0
configure:2769: test -z
|| test ! -s conftest.err
configure:2772: $? = 0
configure:2775: test -s conftest.o
configure:2778: $? = 0
configure:2789: result: yes
configure:2806: checking for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc option to accept ANSI C
configure:2876: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -c -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include conftest.c >&5
conftest.c:10:19: error: stdio.h: No such file or directory
conftest.c:11:23: error: sys/types.h: No such file or directory
conftest.c:12:22: error: sys/stat.h: No such file or directory
conftest.c:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
conftest.c:44: error: expected declaration specifiers or '...' before 'FILE'
configure:2882: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "expat"
| #define PACKAGE_TARNAME "expat"
| #define PACKAGE_VERSION "2.0.1"
| #define PACKAGE_STRING "expat 2.0.1"
| #define PACKAGE_BUGREPORT "expat-bugs#libexpat.org"
| /* end confdefs.h. */
| #include <stdarg.h>
| #include <stdio.h>
| #include <sys/types.h>
| #include <sys/stat.h>
| /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
| struct buf { int x; };
| FILE * (*rcsopen) (struct buf *, struct stat *, int);
| static char *e (p, i)
| char **p;
| int i;
| {
| return p[i];
| }
| static char *f (char * (*g) (char **, int), char **p, ...)
| {
| char *s;
| va_list v;
| va_start (v,p);
| s = g (p, va_arg (v,int));
| va_end (v);
| return s;
| }
.
.
.
.
.
configure: exit 0
In addition to the above config.log file, I could find a build log too.
Details of the build-expat-2.0.1.log file:
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.
checking build system type... i386-apple-darwin12.3.0
checking host system type... i386-apple-darwin
checking for i386-apple-darwin-gcc... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc accepts -g... yes
checking for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -E
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking dlfcn.h usability... no
checking dlfcn.h presence... yes
configure: WARNING: dlfcn.h: present but cannot be compiled
configure: WARNING: dlfcn.h: check for missing prerequisite headers?
configure: WARNING: dlfcn.h: see the Autoconf documentation
configure: WARNING: dlfcn.h: section "Present But Cannot Be Compiled"
configure: WARNING: dlfcn.h: proceeding with the preprocessor's result
configure: WARNING: dlfcn.h: in the future, the compiler will take precedence
configure: WARNING: ## -------------------------------------- ##
configure: WARNING: ## Report this to expat-bugs#libexpat.org ##
configure: WARNING: ## -------------------------------------- ##
checking for dlfcn.h... yes
checking for i386-apple-darwin-g++... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++
checking whether we are using the GNU C++ compiler... yes
checking whether /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ accepts -g... yes
checking how to run the C++ preprocessor... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-cpp-4.2
checking for i386-apple-darwin-g77... no
checking for i386-apple-darwin-f77... no
checking for i386-apple-darwin-xlf... no
checking for i386-apple-darwin-frt... no
checking for i386-apple-darwin-pgf77... no
checking for i386-apple-darwin-fort77... no
checking for i386-apple-darwin-fl32... no
checking for i386-apple-darwin-af77... no
checking for i386-apple-darwin-f90... no
checking for i386-apple-darwin-xlf90... no
checking for i386-apple-darwin-pgf90... no
checking for i386-apple-darwin-epcf90... no
checking for i386-apple-darwin-f95... no
checking for i386-apple-darwin-fort... no
checking for i386-apple-darwin-xlf95... no
checking for i386-apple-darwin-ifc... no
checking for i386-apple-darwin-efc... no
checking for i386-apple-darwin-pgf95... no
checking for i386-apple-darwin-lf95... no
checking for i386-apple-darwin-gfortran... no
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/nm output from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc object... ok
checking for objdir... .libs
checking for i386-apple-darwin-ar... no
checking for ar... ar
checking for i386-apple-darwin-ranlib... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ranlib
checking for i386-apple-darwin-strip... no
checking for strip... strip
checking if /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc supports -fno-rtti -fno-exceptions... no
checking for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc option to produce PIC... -fno-common
checking if /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc PIC flag -fno-common works... yes
checking if /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc static flag -static works... no
checking if /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc supports -c -o file.o... yes
checking whether the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc linker (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld) is GNU ld... no
checking whether the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ linker (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld) supports shared libraries... yes
checking for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ option to produce PIC... -fno-common
checking if /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ PIC flag -fno-common works... yes
checking if /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ static flag -static works... no
checking if /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ supports -c -o file.o... yes
checking whether the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ linker (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin dyld
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for i386-apple-darwin-gcc... (cached) /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc accepts -g... (cached) yes
checking for /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc option to accept ANSI C... (cached) none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc accepts -fexceptions... yes
checking for ANSI C header files... (cached) no
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking for size_t... no
checking for memmove... no
checking for bcopy... no
checking fcntl.h usability... no
checking fcntl.h presence... yes
configure: WARNING: fcntl.h: present but cannot be compiled
configure: WARNING: fcntl.h: check for missing prerequisite headers?
configure: WARNING: fcntl.h: see the Autoconf documentation
configure: WARNING: fcntl.h: section "Present But Cannot Be Compiled"
configure: WARNING: fcntl.h: proceeding with the preprocessor's result
configure: WARNING: fcntl.h: in the future, the compiler will take precedence
configure: WARNING: ## -------------------------------------- ##
configure: WARNING: ## Report this to expat-bugs#libexpat.org ##
configure: WARNING: ## -------------------------------------- ##
checking for fcntl.h... yes
checking for unistd.h... (cached) no
checking for off_t... no
checking for stdlib.h... (cached) no
checking for unistd.h... (cached) no
checking for getpagesize... no
checking for working mmap... no
checking for an ANSI C99-conforming __func__... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating expat_config.h
config.status: expat_config.h is unchanged
/bin/sh ./libtool --silent --mode=compile /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -I./lib -I. -arch i386 -pipe -no-cpp-precomp -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -I/Users/raj/Projects/test/include -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o lib/xmlparse.lo -c lib/xmlparse.c
lib/xmlparse.c:6:65: error: string.h: No such file or directory
lib/xmlparse.c:7:20: error: assert.h: No such file or directory
In file included from lib/xmlparse.c:24:
lib/expat.h:17:20: error: stdlib.h: No such file or directory
lib/xmlparse.c:81:2: error: #error memmove does not exist on this platform, nor is a substitute available
lib/xmlparse.c: In function 'parserCreate':
lib/xmlparse.c:719: warning: implicit declaration of function 'malloc'
lib/xmlparse.c:719: warning: incompatible implicit declaration of built-in function 'malloc'
lib/xmlparse.c:722: warning: assignment from incompatible pointer type
lib/xmlparse.c:723: error: 'realloc' undeclared (first use in this function)
lib/xmlparse.c:723: error: (Each undeclared identifier is reported only once
lib/xmlparse.c:723: error: for each function it appears in.)
lib/xmlparse.c:724: error: 'free' undeclared (first use in this function)
lib/xmlparse.c: In function 'parserInit':
lib/xmlparse.c:848: warning: implicit declaration of function 'memset'
lib/xmlparse.c:848: warning: incompatible implicit declaration of built-in function 'memset'
lib/xmlparse.c: In function 'XML_Parse':
lib/xmlparse.c:1543: warning: implicit declaration of function 'memcpy'
lib/xmlparse.c:1543: warning: incompatible implicit declaration of built-in function 'memcpy'
lib/xmlparse.c: In function 'XML_GetBuffer':
lib/xmlparse.c:1627: warning: implicit declaration of function 'memmove'
lib/xmlparse.c:1627: warning: incompatible implicit declaration of built-in function 'memmove'
lib/xmlparse.c:1656: warning: incompatible implicit declaration of built-in function 'memcpy'
lib/xmlparse.c: In function 'XML_GetParsingStatus':
lib/xmlparse.c:1750: warning: implicit declaration of function 'assert'
lib/xmlparse.c: In function 'storeRawNames':
lib/xmlparse.c:2009: warning: incompatible implicit declaration of built-in function 'memcpy'
lib/xmlparse.c: In function 'doContent':
lib/xmlparse.c:2424: warning: implicit declaration of function 'memcmp'
lib/xmlparse.c: In function 'storeAtts':
lib/xmlparse.c:2922: warning: incompatible implicit declaration of built-in function 'memcpy'
lib/xmlparse.c:2931: warning: incompatible implicit declaration of built-in function 'memcpy'
lib/xmlparse.c: In function 'addBinding':
lib/xmlparse.c:3039: warning: incompatible implicit declaration of built-in function 'memcpy'
lib/xmlparse.c: In function 'lookup':
lib/xmlparse.c:5871: warning: incompatible implicit declaration of built-in function 'memset'
lib/xmlparse.c:5898: warning: incompatible implicit declaration of built-in function 'memset'
lib/xmlparse.c:5927: warning: incompatible implicit declaration of built-in function 'memset'
lib/xmlparse.c: In function 'poolGrow':
lib/xmlparse.c:6112: warning: incompatible implicit declaration of built-in function 'memcpy'
lib/xmlparse.c:6148: warning: incompatible implicit declaration of built-in function 'memcpy'
make: *** [lib/xmlparse.lo] Error 1
Two suggestions:
1) build the library for OSX, that is run ./configure and make. If that works, construct a Xcode library project, add all the library source files, and the created congig.h etc. get this project to compile, then add the project to your app. I have done this and it's often the easiest (in the end) solution.
2) if you cannot get that to work offer a 100 to 250 bounty and someone else will do it. That's a clear benefit of building up points here - you can use them for something when you really need to!

Resources