GithubHelp home page GithubHelp logo

sinofool / build-libcurl-ios Goto Github PK

View Code? Open in Web Editor NEW
210.0 18.0 89.0 22 KB

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

Shell 100.00%

build-libcurl-ios's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build-libcurl-ios's Issues

HTTP/2 support

Hey,

Your script works like a charm!
The only question is how can I enable HTTP/2 support here?

Cheers,
Vasiliy

check version code is error

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

Invalid bitcode version (Producer: '802.0.42.0_0' Reader: '800.0.38_0')

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

Cannot compile with the script

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

can't build neither for 7.54 nor for 7.55

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

Error linking for arm64 with openssl.

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".

recv error

Hi,
in the configuration phase with last libcurl (7.52.1) i have this error: "checking for recv... no"

binary built without ipv6 suport

hi, it seems the latest lib (SHA1: 993c9bb75d798a886749e7801d5f54c494dbf6fb) built without ipv6 support, and apple requires ipv6 support as mandatory feature for review. ouch ...

Curl 8

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

configure: error: C compiler cannot create executables

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$ 

curlbuild.h : No such file or directory

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

disable zlib

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.