sinofool / build-libcurl-ios Goto Github PK
View Code? Open in Web Editor NEWBuild libcurl for iOS development, include armv7 armv7s arm64 i386 and x86_64 support.
Home Page: http://sinofool.net/blog/archives/172
License: MIT License
Build libcurl for iOS development, include armv7 armv7s arm64 i386 and x86_64 support.
Home Page: http://sinofool.net/blog/archives/172
License: MIT License
hi, it seems the latest lib (SHA1: 993c9bb75d798a886749e7801d5f54c494dbf6fb) built without ipv6 support, and apple requires ipv6 support as mandatory feature for review. ouch ...
Hi. thank you for this great effort. i'm developing applications for both android/ios in qt creator.
after download and compile your the library and link it to the project in qt creator, the projce build successfully like a charm!
The build output produce a .xcodeproj file that you have open it via xcode and archive it. (to get .ipa file)
when i click archive button in Product-->Archive tab , after a while, these messages show to me:
error: Invalid bitcode version (Producer: '802.0.42.0_0' Reader: '800.0.38_0')
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Xcode : 8.0 (8A218a)
Mac: 10.12.6
libCurl : 7.55.0
Hello,
First of all thanks to your script. It worked well except when you use following API.
Note: I used darwinssl for my program.
curl_easy_perform()
If I add above API to my program, I got following Mach-O errors in Xcode.
Undefined symbols for architecture arm64:
"_inflate", referenced from:
_inflate_stream in libcurl.a(libcurl_la-content_encoding.o)
"_inflateEnd", referenced from:
_inflate_stream in libcurl.a(libcurl_la-content_encoding.o)
_Curl_unencode_gzip_write in libcurl.a(libcurl_la-content_encoding.o)
_Curl_unencode_cleanup in libcurl.a(libcurl_la-content_encoding.o)
Disabling zlib helped here (found in https://www.bountysource.com/issues/39333978-documentation-missing-to-build-for-ios). I created a pull request with the changes.
Thank you!
Hello I tried newest version and 7.44.0 but it does not compile:
michis-MBP:curl-7.44.0 michi$ bash ./build_libcurl_dist.sh
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
;;
*
no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for i386-apple-darwin-ar... no
checking for ar... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin//ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for i386-apple-darwin-gcc... clang -arch armv7 -arch armv7s
checking whether the C compiler works... no
configure: error: in `/0x-foreign-src/lib-curl/lib-iOS/src/curl-7.44.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
michis-MBP:curl-7.44.0 michi$
I use Xcode10.1 + libcurl 7.63.0 make failed, detail log in the attachment.
It seems not work well with Xcode10.1
pls only check the LIBCURL_VERSION_MAJOR
below is OK
#if LIBCURL_VERSION_MAJOR < 7
#error Required curl 7.40.0+; See http://curl.haxx.se/docs/adv_20150108A.html
#error Supported minimal version is 7.55.0 for header file changes, see Issue #12 (https://github.com/sinofool/build-libcurl-ios/issues/12)
#endif"|gcc -c -o /dev/null -xc -||exit 9
Hello,
This is a good project and it helps me to build a curl library.
I suggest that not to use the hard-coded Xcode path. Insteadly, use 'xcode-select -p'.
I have a requirement where I need to package libcurl static library and run in ios but I want the code obfuscated (my .a file). Is it possible to do? If yes, can we add it to this library?
Thanks
Thank you for the build script! Seems like it worked for me but I see the following error at the final patching stage:
patch: **** Can't find file /tmp/build_libcurl_7488/include/curl/curlbuild.h : No such file or directory
$ ls /tmp/build_libcurl_7488/include/curl/
curl.h easy.h multi.h system.h
curlver.h mprintf.h stdcheaders.h typecheck-gcc.h
curl-7.55.1
macOS 10.12.6
Xcode 8.3.2
Build version 8E2002
Hi,
in the configuration phase with last libcurl (7.52.1) i have this error: "checking for recv... no"
Curl team seems to have provided command line iOS build instructions here
export ARCH=arm64
export SDK=iphoneos
export DEPLOYMENT_TARGET=12.0
sudo xcode-select --switch /Applications/Xcode.app
export CFLAGS="-arch $ARCH -isysroot $(xcrun -sdk $SDK --show-sdk-path) -m$SDK-version-min=$DEPLOYMENT_TARGET"
./configure is not in the github it is in the libcurl download
./configure --host=$ARCH-apple-darwin --prefix $(pwd)/artifacts --with-secure-transport
make -j8
make install
Build results are in the artifacts
folder
Just out of curiosity ❓
if I leave the script as is I am getting the error:
url.c:55:2: error: "We can't compile without socket() support!"
If I change IPHONEOS_DEPLOYMENT_TARGET to anything which is higher than 6.0 the compiler detection fails.
checking for a BSD-compatible install... /usr/bin/install -c
checking for i386-apple-darwin-gcc... clang
checking whether the C compiler works... no
configure: error: in `/Users/xxxxxxxxxx/Documents/curl-7.55.0':
configure: error: C compiler cannot create executables
I can't build using the readme instructions. There appears to be a vulnerability, stopping it all.
When I attempt to run the script I get this error which seems to relate to the -fembed-bitcode parameter:
./build_libcurl_dist.sh gcc: warning: couldn’t understand kern.osversion ‘15.4.0 checking whether to enable maintainer-specific portions of Makefiles... no checking whether make supports nested variables... yes checking whether to enable debug build options... no checking whether to enable compiler optimizer... (assumed) yes checking whether to enable strict compiler warnings... no checking whether to enable compiler warnings as errors... no checking whether to enable curl debug memory tracking... no checking whether to enable hiding of library internal symbols... yes checking whether to enable c-ares for DNS lookups... no checking whether to disable dependency on -lrt... (assumed no) checking for path separator... : checking for sed... /usr/bin/sed checking for grep... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for i386-apple-darwin-ar... no checking for ar... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin//ar checking for a BSD-compatible install... /usr/bin/install -c checking for i386-apple-darwin-gcc... no checking for gcc... gcc checking whether the C compiler works... no configure: error: in
/Users/belmoj/test/build-libcurl-ios/curl-7.47.1':
configure: error: C compiler cannot create executables
See config.log' for more details
Hello. Error linking for arm64 in Xcode then builded with openssl (without openssl all is OK).
I've fixed this: replace "--with-ssl=${HOME}/Desktop/openssl-ios-dist" with "--with-darwinssl".
YEAH! I know it now!
Hey,
Your script works like a charm!
The only question is how can I enable HTTP/2 support here?
Cheers,
Vasiliy
I hava a question.
Why the targets are *-apple-darwin but not *-apple-ios?
I had tried to build with *-apple-ios and it work.
我需要修改一下脚本?
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.