I'm trying to build cURL from sources for the device (armv7). Here's what I do (part of the build script):
export CC="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/usr/bin/gcc"
export CFLAGS="-arch ${ARCH} -isysroot ${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDKVERS ION}.sdk -I${OPENSSL}/include -L${OPENSSL}"
./configure -prefix=${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk --host=${ARCH}-apple-darwin --disable-shared -with-random=/dev/urandom --with-ssl > "${LOG}" 2>&1
make
make install
make clean
However, make fails with following error:
netrc.c: In function 'Curl_parsenetrc':
netrc.c:90: warning: assignment makes pointer from integer without a cast
netrc.c:95: error: dereferencing pointer to incomplete type
make[2]: *** [libcurl_la-netrc.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
Also, I see errors in config.log like:
configure:5177: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Develope r/usr/bin/gcc -c -arch armv7 -isysroot /Applications/Xcode45-DP1.app/Contents/Developer/Platforms/iPhoneOS.platform/De veloper/SDKs/iPhoneOS5.0.sdk -I/OpenSSL/include -L/OpenSSL conftest.c >&5
conftest.c: In function 'main':
conftest.c:60: error: size of array 'test_array' is negative
configure:5177: $? = 1
configure: failed program was:
| /* confdefs.h */
By the way, this builds and works fine for i386 architecture, i.e., on the iOS simulator.
What can I do to get it to build for the iPhone (armv7)?