biasedbit / curl-ios-build-scripts

Build libcurl with HTTP(S)-only support to use on iOS and OSX development
http://biasedbit.com/
185 stars 69 forks source link

Errors building with Ruby on OSX #13

Closed jwheaton closed 11 years ago

jwheaton commented 11 years ago

I've updated to Ruby 1.9.3. I'm running the build_curl ruby script under sudo.

I run

sudo ./build_curl --archs armv7 --verbose --no-cleanup

I get an error:

configure: error: in `/Users/jim/ammf/iOS/libcurl/curl-ios-build-scripts-master/build/source/curl-7.28.1':
configure: error: C compiler cannot create executables
See `config.log' for more details.

Looking at config.log I see:

$ ./configure --host=armv7-apple-darwin --disable-shared --enable-static --with-darwinssl --without-ssl --without-libssh2 --without-librtmp --without-libidn --without-ca-bundle --enable-http --disable-rtsp --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher --prefix=/Users/jim/ammf/iOS/libcurl/curl-ios-build-scripts-master/build/out/armv7

and the problem:

configure:4241: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -arch armv7 -pipe -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=5.0  -arch armv7 -pipe -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk conftest.c  >&5
conftest.c:12:19: error: stdio.h: No such file or directory
conftest.c: In function 'main':
conftest.c:15: error: 'FILE' undeclared (first use in this function)
conftest.c:15: error: (Each undeclared identifier is reported only once

So, is there some problem with -isysroot not being set for my gcc? It can't seem to find stdio.h?

biasedbit commented 11 years ago

Just out of sheer curiosity, do you really need to be using sudo?

biasedbit commented 11 years ago

Anyway, getting on-topic, if you...

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include

... is stdio.h there?

jwheaton commented 11 years ago

Shoot. My fault (as usual). I didn't have the 6.0 sdk installed! When I tried the --sdk-version 5.1 option, it worked fine. Thanks. Will test out now with apple Store regarding public API issues.

biasedbit commented 11 years ago

Happens ;)

Lemme know how it goes with the App Store... crossing fingers