biasedbit / curl-ios-build-scripts Goto Github PK
View Code? Open in Web Editor NEWBuild libcurl with HTTP(S)-only support to use on iOS and OSX development
Home Page: http://biasedbit.com/
Build libcurl with HTTP(S)-only support to use on iOS and OSX development
Home Page: http://biasedbit.com/
Xcode 7.2.1 can't find x86_64 architecture (iOS simulator) in libcurl.a. It seems the latest XCode ignores i386...
Would you like to add x86_64 support?
Thanks a lot.
I run ./build_curl and got some error
[COMPILE] WARN - Configuration for architecture 'i386-apple-darwin' failed.
[COMPILE] WARN - Configuration for architecture 'armv7-apple-darwin' failed.
[COMPILE] WARN - Configuration for architecture 'armv7s-apple-darwin' failed.
[COMPILE] WARN - Configuration for architecture 'arm64' failed.
why?, how to fix it?
Hi,
I tried to build for iOS7.1 with the following command
./build_curl --archs arm7,arm7s,arm64
However, it always failed like this,
[COMPILE] WARN - Configuration for architecture 'arm64' failed.
[ BUILD ] ERROR - Compilation failed for all requested architectures.
If I run the build_curl
the script by default, it build for arm7
and arm7s
only.
Do I miss some information?
Thanks & Regards
What am I supposed to do with:
$ ./build_curl --help
./build_curl:15: syntax error, unexpected ':', expecting ')'
Preparer.new(configuration: configuration).prepare
^
./build_curl:16: syntax error, unexpected ':', expecting ')'
... = Compiler.new(configuration: configuration).compile
^
./build_curl:20: syntax error, unexpected ':', expecting ')'
...ed = Packer.new(configuration: configuration).pack(compiled_...
^
./build_curl:32: syntax error, unexpected ':', expecting ')'
... Cleaner.new(configuration: configuration).cleanup unless...
^
Perhaps this is related to:
$ /usr/bin/env ruby --version
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Note: I am not a a Ruby programmer.
Playing around with the existing build on OS X 10.10 w/ Xcode 6.1 (iOS SDK 8.1) required some tweaks to the defaults. Would it be appropraite to include the defaulting logic so that the latest (or earliest) SDK versions were found out for the user?
Pardon the ugly shell script hack but it works...could likely be cleaned up considerably and made much more ruby-esque--i've not used ruby in a long time. If this type of functionality is worth it i'd invest the time to make a cleaner solution.
curl_builder.rb:
@cmd = %q!xcodebuild -showsdks | grep -E '(OS X [0-9])' | sed 's/.* \([0-9]\{1,2\}\.[0-9]\{1,2\}\).*/\1/' | sort -u |head -1!
@latest_osx_sdk = `#@cmd`.chomp
@cmd =%q!xcodebuild -showsdks | grep -E '(iOS [0-9])' | sed 's/.* \([0-9]\{1,2\}\.[0-9]\{1,2\}\).*/\1/' |sort -u |head -1!
@latest_ios_sdk = `#@cmd`.chomp
DEFAULT_SETUP = {
log_level: "info", # debug, info, warn, error
verbose: false,
debug_symbols: false,
curldebug: false,
sdk_version: @latest_ios_sdk,
osx_sdk_version: @latest_osx_sdk,
libcurl_version: "7.38.0",
architectures: %w(i386 armv7 armv7s arm64 x86_64),
xcode_home: "/Applications/Xcode.app/Contents/Developer",
run_on_dir: Dir::pwd,
work_dir: "build",
result_dir: "curl",
clean_and_exit: false,
cleanup: true,
}
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?
It would be helpful to mention the 1.9 ruby requirement in the readme.
I think the build scripts do not allow for Apple's new "app thinning" functionality because I see an error like this when I try to link libcurl into my Xcode project:
(libcurl_la-easy.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
Hi, this is a really great script! thanks for that
But I really need to compile libcurl with SSH for SFTP support.
I've tried to do it myself but failed.. I was able to compile libSSH2 but I cant get your script to recognize it.
Would be cool if your script would support this - maybe even build libssh2 automatically?
Thanks in advance
Just a note of thanks to everyone working on this project. The recent changes allowed us to repost our app to the Apple store without getting the "unsupported API call" errors that we were getting. Limiting the devices to version iOS 5.0 and above is o.k.
I compiled both the OpenSSL and gnutls and I get the following message when trying to access a server via HTTPS:
I used the curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, true); to get the output above.
I did modify the SDK target to 5.0 to compile for my system.
OS: Mac OS X
Version: 10.6.8
XCode: 4.2 4C199
iOS SDK: 5.0
I used '/curl/ios-dev/lib/libcurl.a' for build phases->link binary with libraries .
And I setted " Header Search Paths" to ''/curl/ios-dev/include''.
Then an error arise:"'curl_rule_01'declared as an array with a negative size" and I setted "build settings->architectures ->valid architectures" to" armv7 armv7s" (deleted 'arm64').
Then another error:"No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).,archi386",and I setted " target->build setting ->build active architecture only"to "no".
finally it said "ld: library not found for lcurl ,clang :error: linker command failed with exit code 1" I can't figure it out !I don't know how can't i do,it makes me crazy now.
I setted "build setting->other linker flags" to "-all_load" or"-ObjC",and I tried to set "bitcode" to "NO", the error still in my ios app project.
why?
When setting the option to build with OpenLDAP, the configure script can not find the LDAP library.
Hi,
For various reasons, I can't use darwinssl, but will need to use basic OpenSSL. I've created a branch that does just that, based on an older commit (92f40bc). I can't submit a pull request, since I can't create a pull request for a new branch. However, if you want to incorporate this, feel free to create a new branch, and I can create a pull request for that!
Angelo
Hey,
Have used your script to build the library. Excellent work, thank you!)
However I'm not able to run http/2 with the resulting lib. How could this be fixed? I suggest that nghttp2 should be somehow added to the build but not sure how to do this.
Could you please help?
Cheers,
Vasyl
curl with darwinssl is using deprecated api from Security.framework, and won't be able to pass app store validation
I was originally getting these errors when trying to build for armv7/armv7s: error: C compiler cannot create executables
even though I have the Xcode command line tools installed. I solved the issue by running:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Putting this here to help others who may run into the issue. Perhaps this could be added to the README.
I get the following error when attempting to run build_curl. I'm using:
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
$ ruby build_curl
build_curl:15: syntax error, unexpected ':', expecting ')'
Preparer.new(configuration: configuration).prepare
build_curl:16: syntax error, unexpected ':', expecting ')'
... = Compiler.new(configuration: configuration).compile
^
build_curl:20: syntax error, unexpected ':', expecting ')'
...ed = Packer.new(configuration: configuration).pack(compiled_...
^
build_curl:32: syntax error, unexpected ':', expecting ')'
... Cleaner.new(configuration: configuration).cleanup unless...
My ruby skills are crap so I'm not much help in debugging.
i386 , x86_64 is "checking whether to enable IPv6... yes"
armv7 , arm64 is "checking whether to enable IPv6... no"
How you enable FTPS protocol. I have a message "Protocol ftps not supported"
i use the command "./build_curl --enable-protocols FTP"
Hi
Sorry when i try to run from master branch it doesn't work on a MacOSX 10.8. The ruby version is not compatible. It works when i get "ruby1.8" branch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.