gcesarmza / curl-android-ios Goto Github PK
View Code? Open in Web Editor NEWStatic libcurl to be used in Android and iOS apps. Build scripts included. No Android source required
Static libcurl to be used in Android and iOS apps. Build scripts included. No Android source required
all https requests are error.
01-23 23:34:31.541 17869 17989 V SDK : curly error:Info: TLSv1.2 (OUT), TLS handshake, Client hello (1):
01-23 23:34:31.541 17869 17989 V SDK :
01-23 23:34:31.672 17869 17989 V SDK : curly error:Info: TLSv1.2 (IN), TLS handshake, Server hello (2):
01-23 23:34:31.672 17869 17989 V SDK :
01-23 23:34:31.673 17869 17989 V SDK : curly error:Info: TLSv1.2 (IN), TLS handshake, Certificate (11):
01-23 23:34:31.673 17869 17989 V SDK :
01-23 23:34:31.674 17869 17989 V SDK : curly error:Info: TLSv1.2 (OUT), TLS alert, Server hello (2):
01-23 23:34:31.674 17869 17989 V SDK :
01-23 23:34:31.674 17869 17989 V SDK : curly error:Info: SSL certificate problem: unable to get local issuer certificate
01-23 23:34:31.674 17869 17989 V SDK :
01-23 23:34:31.674 17869 17989 V SDK : curly error:Info: TLSv1.2 (OUT), TLS alert, Client hello (1):
Thanks
When trying to build according to build instructions, I get the following error
....
jni/../../openssl/bio_ssl.c:63:10: fatal error: 'opensll/crypto.h' file not found
crypto.h is in the opensll/crypto folder. In general it seems that header file locations are wrong all over the openssl sourcefiles. So what is the right way to solve this?
I use android libcurl.a in prebuilt-with-ssl directory, when I build my project with ndk-build, I receive some error:
jni/libcurl/lib/libcurl.a(version.o):function curl_version: error: undefined reference to 'zlibVersion'
jni/libcurl/lib/libcurl.a(version.o):function curl_version_info: error: undefined reference to 'zlibVersion'
jni/libcurl/lib/libcurl.a(content_encoding.o):function Curl_unencode_deflate_write: error: undefined reference to 'inflateInit_'
jni/libcurl/lib/libcurl.a(content_encoding.o):function inflate_stream: error: undefined reference to 'inflate'
jni/libcurl/lib/libcurl.a(content_encoding.o):function inflate_stream: error: undefined reference to 'inflateEnd'
jni/libcurl/lib/libcurl.a(content_encoding.o):function inflate_stream: error: undefined reference to 'inflateInit2_'
jni/libcurl/lib/libcurl.a(content_encoding.o):function inflate_stream: error: undefined reference to 'inflateEnd'
jni/libcurl/lib/libcurl.a(content_encoding.o):function inflate_stream: error: undefined reference to 'inflateEnd'
jni/libcurl/lib/libcurl.a(content_encoding.o):function inflate_stream: error: undefined reference to 'inflateEnd'
jni/libcurl/lib/libcurl.a(content_encoding.o):function Curl_unencode_gzip_write: error: undefined reference to 'zlibVersion'
jni/libcurl/lib/libcurl.a(content_encoding.o):function Curl_unencode_gzip_write: error: undefined reference to 'inflateInit2_'
jni/libcurl/lib/libcurl.a(content_encoding.o):function Curl_unencode_gzip_write: error: undefined reference to 'inflateInit2_'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [obj/local/armeabi-v7a/libabc.so] Error 1
Hi
This curl building script seems to do its job well and I'd like to use it in one of my projects. What is the license of this repository? Can I fork and use it for an open source project? Or can I just download the code without forking and integrate it into my solution? What about commercial use?
Thank you
Regards, Darioxz
Hi,
OpenSSL build just fine but curl's configure process is broken with NDK r16 unified headers:
Android/sdk/ndk-bundle/prebuilt/darwin-x86_64/bin/../../../toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-cpp" fails sanity check
Thank you for the awesome project and keep up the good work.
Hey.
When trying to link the libCurl library with my code, I get many zlib linkage errors. What should I do?
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(version.o): in function curl_version:(.text.curl_version+0x5e): error: undefined reference to 'zlibVersion'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(version.o): in function curl_version_info:(.text.curl_version_info+0x1a): error: undefined reference to 'zlibVersion'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function Curl_unencode_deflate_write:(.text.Curl_unencode_deflate_write+0x3a): error: undefined reference to 'inflateInit_'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function inflate_stream:(.text.inflate_stream+0x58): error: undefined reference to 'inflate'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function inflate_stream:(.text.inflate_stream+0x9c): error: undefined reference to 'inflateEnd'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function inflate_stream:(.text.inflate_stream+0xaa): error: undefined reference to 'inflateInit2_'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function inflate_stream:(.text.inflate_stream+0xba): error: undefined reference to 'inflateEnd'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function inflate_stream:(.text.inflate_stream+0xe8): error: undefined reference to 'inflateEnd'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function inflate_stream:(.text.inflate_stream+0xfa): error: undefined reference to 'inflateEnd'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function Curl_unencode_gzip_write:(.text.Curl_unencode_gzip_write+0x54): error: undefined reference to 'zlibVersion'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function Curl_unencode_gzip_write:(.text.Curl_unencode_gzip_write+0x70): error: undefined reference to 'inflateInit2_'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(content_encoding.o): in function Curl_unencode_gzip_write:(.text.Curl_unencode_gzip_write+0x13a): error: undefined reference to 'inflateInit2_'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(curl_ntlm_wb.o): in function Curl_output_ntlm_wb:(.text.Curl_output_ntlm_wb+0x21e): error: undefined reference to 'getpwuid_r'
C:/Android/android-ndk-r10/toolchains/arm-linux-androideabi-4.6/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: C:/svn_wc/beehd_hypertech/VoipEngine/../ThirdParties/android/lib/libcurl.a(netrc.o): in function Curl_parsenetrc:(.text.Curl_parsenetrc+0x68): error: undefined reference to 'getpwuid_r'
collect2: ld returned 1 exit status
Hi,
For the prebuilt android libcurl with openSSL, is there a definition for what are the options enabled ? FTP ,file ,etc
when i add LOCAL_LDLIBS += -lz in Android.mk
then
Android NDK: WARNING:jni/Android.mk:curl: LOCAL_LDLIBS is always ignored for static libraries
I found prebuilt libraries for Android only support ArmV7,V8 and x86*. Could you help build a Arm version?
Hello, After upgrade to latest NDK 11 I see following linking error, probably libcurl rebuild is required to fix that issue
/Users/rd/mobile-framework/sandbox/curl-prebuilt-with-ssl/android/armeabi-v7a/libcurl.a(ui_openssl.o):function read_string_inner: error: undefined reference to 'bsd_signal'
/Users/rd/Library/Android/sdk/ndk-bundle/platforms/android-3/arch-arm/usr/include/signal.h
Error:(111) undefined reference to 'bsd_signal'
Error:error: ld returned 1 exit status
I'm trying to link against the pre-built static libraries for both iOS and Android.
The iOS side is working well (thanks 👍 ) but the Android side is failing no matter what I do.
(Note - the Android sample app in the repo also fails the build with the same errors)
libcurl.a(url.o):function Curl_disconnect: error: undefined reference to 'Curl_http_ntlm_cleanup' libcurl.a(http.o):function output_auth_headers: error: undefined reference to 'Curl_output_ntlm' libcurl.a(http.o):function Curl_http_input_auth: error: undefined reference to 'Curl_auth_is_ntlm_supported' libcurl.a(http.o):function Curl_http_input_auth: error: undefined reference to 'Curl_input_ntlm' libcurl.a(http.o):function Curl_http_input_auth: error: undefined reference to 'Curl_auth_is_digest_supported' libcurl.a(http_digest.o):function Curl_input_digest: error: undefined reference to 'Curl_auth_decode_digest_http_message' libcurl.a(http_digest.o):function Curl_output_digest: error: undefined reference to 'Curl_auth_create_digest_http_message' libcurl.a(http_digest.o):function Curl_digest_cleanup: error: undefined reference to 'Curl_auth_digest_cleanup' libcurl.a(http_digest.o):function Curl_digest_cleanup: error: undefined reference to 'Curl_auth_digest_cleanup' libcurl.a(curl_sasl.o):function Curl_sasl_cleanup: error: undefined reference to 'Curl_auth_ntlm_cleanup' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_is_digest_supported' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_is_ntlm_supported' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_create_ntlm_type1_message' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_create_external_message' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_create_oauth_bearer_message' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_create_oauth_bearer_message' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_create_plain_message' libcurl.a(curl_sasl.o):function Curl_sasl_start: error: undefined reference to 'Curl_auth_create_login_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_plain_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_login_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_login_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_external_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_decode_cram_md5_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_cram_md5_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_digest_md5_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_ntlm_type1_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_decode_ntlm_type2_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_ntlm_type3_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_oauth_bearer_message' libcurl.a(curl_sasl.o):function Curl_sasl_continue: error: undefined reference to 'Curl_auth_create_oauth_bearer_message'
Is there an additional library I need to be linking against?
I'm using Android Studio 2.2.1 and have tried building against NDKs r10e and r13...
Hi,
I'm trying to build libcurl for android armv7-a with a recent NDK (r17b) for a targeted platform android-23, but I can't (cross compile from debian 64bit).
My error message is "c compiler cannot create executables"... Any advertisements on this topic ?
Thank you in advance
The pre-built curl lib did not have bitcode enabled, so I attempted to build libcurl with the included script but got this error:
`libtool: compile: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fvisibility=hidden -arch armv7 -pipe -Os -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -Qunused-arguments -MT libcurl_la-url.lo -MD -MP -MF .deps/libcurl_la-url.Tpo -c url.c -o libcurl_la-url.o
url.c:55:2: error: "We can't compile without socket() support!"
Any ideas on how to fix it?
I am using your build scripts and sources to build static .a libCurl libraries and I want to use them in an android project that has C++ implementations that call on libCurl APIs. I'm getting a bunch of undefined reference to curl calls such as the following:
error: undefined reference to 'curl_easy_init'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:45: error: undefined reference to 'curl_easy_setopt'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:46: error: undefined reference to 'curl_easy_setopt'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:48: error: undefined reference to 'curl_easy_setopt'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:49: error: undefined reference to 'curl_slist_append'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:50: error: undefined reference to 'curl_slist_append'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:51: error: undefined reference to 'curl_easy_setopt'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:53: error: undefined reference to 'curl_easy_perform'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:54: error: undefined reference to 'curl_easy_getinfo'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:64: error: undefined reference to 'curl_easy_init'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:75: error: undefined reference to 'curl_slist_append'
/Users/jay.nagar/dev/git/unity_sdk_whareapi/Whare_Native_Unity/src/Whare/Common/WhareWebRequest.cpp:81: error: undefined reference to 'curl_easy_perform'
Any idea what might be going wrong? Do you know what should I add to the cmake to link the static libraries with my CPP classes?
Not sure if this is a curl issue or an issue with the build, but CURLOPT_PINNEDPUBLICKEY doesn't work on iOS pre-built binaries, but works fine on Android (with OpenSSL).
I'm trying to enable pinning in our apps that use this library for both iOS and Android and the Android one works fine - correct public key it works as before we added the setting, wrong public key and it gives me an error saying I cannot connect.
Code is as follows:
CURLcode c = curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
fprintf(stderr, "Set Fail on Error: %s\n",
curl_easy_strerror(c));
c = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
fprintf(stderr, "Set verify peer: %s\n",
curl_easy_strerror(c));
c = curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 2);
fprintf(stderr, "Set verify host: %s\n",
curl_easy_strerror(c));
c = curl_easy_setopt(curl, CURLOPT_PINNEDPUBLICKEY,
"sha256//nhEOGkhMcl5uqf13KxUPoCgXYXCKA8A4E+j9JiL+UB8=");
fprintf(stderr, "Set pinned key: %s\n",
curl_easy_strerror(c));
The output from this on iOS is:
ENABLING PINNING
Set Fail on Error: No error
Set verify peer: No error
Set verify host: No error
Set pinned key: Error
When I look at the curl return code where I'm setting the pinned key, it's CURLE_NOT_BUILT_IN.
Digging into the curl source, I can see this section in lib/setopt.c:
case CURLOPT_PINNEDPUBLICKEY:
/*
* Set pinned public key for SSL connection.
* Specify file name of the public key in DER format.
*/
#ifdef USE_SSL
if(Curl_ssl->supports & SSLSUPP_PINNEDPUBKEY)
result = Curl_setstropt(&data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG],
va_arg(param, char *));
else
#endif
result = CURLE_NOT_BUILT_IN;
break;
As far as I can tell, the enabling of the DarwinSSL backend in the prebuilt binaries build script should define USE_SSL (curl_setup.h) which leads me to the Curl_ssl->supports bit for SSLSUPP_PINNEDPUBKEY is not set. The docs for this feature (https://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html) say that support should be from 7.54.1: SecureTransport/DarwinSSL on macOS 10.7+/iOS 10+ and I'm using the 7.60 release.
I've confirmed this by pulling the curl version info that reports as follows:
My attempts to manually build here to try things have been scuppered by this error:
url.c:55:2: error: "We can't compile without socket() support!"
..but I've seen the other tickets (e.g. #19 ) where you point people to run xcode-select --install, which just says:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
I assume this difficulty in checking anything is an Xcode / Mojave issue but I see from #56 you can't upgrade until the new year.
In the meantime, any ideas where the issue for this lies?
I was happy to see the prebuilt curl libraries, and I had assumed it would built. Unfortunately my trial turned out otherwise:
I got a bunch of errors similar to the following:
C:\git\curl-android-ios\test-android-project\app\src\main>ndk-build[arm64-v8a] SharedLibrary : libtestlibrary.so
jni/../../../../../prebuilt-with-ssl/android/arm64-v8a/libcurl.a(url.o): In function Curl_disconnect':(.text.Curl_disconnect+0x64): undefined reference to
Curl_http_ntlm_cleanup'
jni/../../../../../prebuilt-with-ssl/android/arm64-v8a/libcurl.a(http.o): In function output_auth_headers':(.text.output_auth_headers+0x7c): undefined reference to
Curl_output_ntlm'
Cannot compile on iOS using build_iOS.sh because:
CC libcurl_la-ldap.lo
url.c:55:2: error: "We can't compile without socket() support!"
#error "We can't compile without socket() support!"
I don't really need ldap any how -- just barebones HTTP/HTTPS support.
with Xcode 9.4
connect.c:1087:12: error: 'connectx' is only available on iOS 9.0 or newer [-Werror,-Wunguarded-availability]
rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
^~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/socket.h:713:5: note: 'connectx' has been explicitly marked
partial here
int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int,
^
connect.c:1087:12: note: enclose 'connectx' in a __builtin_available check to silence this warning
rc = connectx(sockfd, &endpoints, SAE_ASSOCID_ANY,
^~~~~~~~
1 error generated.
make[2]: *** [libcurl_la-connect.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
Error running the make program
Showing Recent Issues
"_SSLGetNegotiatedProtocolVersion", referenced from:
_darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)
"_SSLHandshake", referenced from:
_darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)
"_SSLCopyPeerTrust", referenced from:
_darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)
"_SecTrustSetAnchorCertificates", referenced from:
_darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)
"_SecTrustSetAnchorCertificatesOnly", referenced from:
_darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)
"_SSLWrite", referenced from:
_darwinssl_send in libcurl.a(libcurl_la-darwinssl.o)
"_SecTrustEvaluate", referenced from:
_darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetProtocolVersionMax", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_kSecClass", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_kSecReturnRef", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_kSecMatchLimit", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SecItemCopyMatching", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SecCertificateCopySubjectSummary", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
_CopyCertSubject in libcurl.a(libcurl_la-darwinssl.o)
"_SecPKCS12Import", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLGetNegotiatedCipher", referenced from:
_darwinssl_connect_step2 in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetPeerDomainName", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_kSecImportItemIdentity", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetCertificate", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SecIdentityCopyCertificate", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetEnabledCiphers", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SecPolicyCreateSSL", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLGetBufferedReadSize", referenced from:
_Curl_darwinssl_data_pending in libcurl.a(libcurl_la-darwinssl.o)
"_kSecImportExportPassphrase", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLCreateContext", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetSessionOption", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLGetNumberSupportedCiphers", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetProtocolVersionMin", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLGetSessionState", referenced from:
_Curl_darwinssl_check_cxn in libcurl.a(libcurl_la-darwinssl.o)
"_kSecMatchLimitAll", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetPeerID", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_kSecAttrLabel", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SecCertificateCreateWithData", referenced from:
_append_cert_to_array in libcurl.a(libcurl_la-darwinssl.o)
"_SSLRead", referenced from:
_darwinssl_recv in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetIOFuncs", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLGetSupportedCiphers", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_kSecMatchPolicy", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLSetConnection", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_kSecClassIdentity", referenced from:
_darwinssl_connect_common in libcurl.a(libcurl_la-darwinssl.o)
"_SSLClose", referenced from:
_Curl_darwinssl_close in libcurl.a(libcurl_la-darwinssl.o)
Hi and thanks for your efforts on this one. It has been working really well with the Curl 7.48 version.
Today however I wanted to update to 7.50.3 and ran into some issues. It seems some c files has to be removed from the .mk but even after that I got duplicate definition problems.
If you have the time to see if we the script can support the latest version of curl it would be great.
hello,
I thank you so much for the effort you have put in this project, it is well done.
I just wonder how did you generate the header file, or did you type it yourself?
Thanks!
Hello~
Build on Mac OS Mojave failed even after install developer tools with "xcode-selector --install" command.
How can I build curl with Mojave?
Regard
Hi Gustavo,
Thank for your repositories.
I Compiled very well thinking to find cURL binaries for android M but I can not find them
Do you have any advice about?
Regards,
My latest update to Google Play is returning the following error:
Your app utilizes a version of OpenSSL that contains one or more security vulnerabilities. Please migrate your app to OpenSSL 1.02f/1.01r or higher... If you’re using a 3rd party library that bundles OpenSSL, you’ll need to upgrade it to a version that bundles OpenSSL 1.02f/1.01r or higher.
To confirm your OpenSSL version, you can do a grep search for:
$ unzip -p YourApp.apk | strings | grep "OpenSSL"
I ran the following command to confirm your commit message "Updated to cURL 7.48 and OpenSSL 1.0.1s" and what Google stated in their email:
unzip -p ReelContent.16.07.23.3.apk | strings | grep "OpenSSL"
and I saw the following output:
UI_OpenSSL
OpenSSLDie
...
OpenSSL RSA method
OpenSSL default user interface
OpenSSL 'dlfcn' shared library method
You need to read the OpenSSL FAQ, http://www.openssl.org/support/faq.html
OpenSSL default
SSLv2 part of OpenSSL 1.0.1o 12 Jun 2015
...and much more
I have done some research into how to update your openssl submodule locally with The OpenSSl 1_0_2 branch, but I may need some assistance doing that.
Can you help with this, or should I consider options other than what I have already tried?
I am using ndk-r15c to build curl with the build_Android.sh script, but failed:
config.status: creating lib/curl_config.h
config.status: lib/curl_config.h is unchanged
config.status: error: cannot find input file: `include/curl/curlbuild.h.in'
Error running the configure program
HI, libcurl uses in iOS multithread programming, have a crash error, the reason may be NDS lookup timeout, how to solve it?
the error log:
Warning: Libinfo call to mDNSResponder on main thread
(lldb)
pls help, thanks.
how to merge follow libcurl.a file to only one libcurl.a file?
armeabi/libcurl.a
armeabi-v7a/libcurl.a
...
how to build libcurl without https(ssl)
Make: *** No rule to make target jni/../curl/lib/dotdot.c', needed by
obj/local/arm64-v8a/objs/curl/__/curl/lib/dotdot.o'. Stop.
Thank you!
Urgent: I want to build libcurl with --with-ca-bundle option in build_Android.sh. Every time i pass a new cacert.pem downloaded from https://curl.haxx.se/docs/caextract.html from this site and build library, after putting that in android, curl response code is always 77 (CURLE_SSL_CACERT_BADFILE). What i am doing wrong. i am building curl with this :
./configure --host=arm-linux-androideabi --target=arm-linux-androideabi
--with-ssl=$SSLPATH
--enable-static
--disable-shared
--disable-verbose
--enable-threaded-resolver
--enable-libgcc
--enable-ipv6
--with-ca-bundle=cacert.pem
It builds fine. But can not establish ssl connection with https site.
jni/../../curl/lib/easy.c:370:19: error: conflicting types for 'curl_easy_init'
struct Curl_easy curl_easy_init(void)
^
jni/../../curl/include/curl/easy.h:28:19: note: previous declaration is here
CURL_EXTERN CURL *curl_easy_init(void);
^
jni/../../curl/lib/easy.c:401:10: error: conflicting types for 'curl_easy_setopt'
CURLcode curl_easy_setopt(struct Curl_easy *data, CURLoption tag, ...)
^
jni/../../curl/include/curl/easy.h:29:22: note: previous declaration is here
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
^
jni/../../curl/lib/easy.c:831[arm64-v8a] Compile : curl <= getenv.c
:10: error: conflicting types for 'curl_easy_perform'
CURLcode curl_easy_perform(struct Curl_easy *data)
^
jni/../../curl/include/curl/easy.h:30:22: note: previous declaration is here
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
^
jni/../../curl/lib/easy.c:852:6: error: conflicting types for 'curl_easy_cleanup'
void curl_easy_cleanup(struct Curl_easy *data)
^
jni/../../curl/include/curl/easy.h:31:18: note: previous declaration is here
CURL_EXTERN void curl_easy_cleanup(CURL *curl);
^
jni/../../curl/lib/easy.c:869:10: error: conflicting types for 'curl_easy_getinfo'
CURLcode curl_easy_getinfo(struct Curl_easy *data, CURLINFO info, ...)
^
jni/../../curl/include/curl/easy.h:46:22: note: previous declaration is here
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
^
jni/../../curl/lib/easy.c:889:19: error: conflicting types for 'curl_easy_duphandle'
struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
^
jni/../../curl/include/curl/easy.h:61:19: note: previous declaration is here
CURL_EXTERN CURL curl_easy_duphandle(CURL curl);
^
jni/../../curl/lib/easy.c:982:6: error: conflicting types for 'curl_easy_reset'
void curl_easy_reset(struct Curl_easy *data)
^
jni/../../curl/include/curl/easy.h:74:18: note: previous declaration is here
CURL_EXTERN void curl_easy_reset(CURL *curl);
^
jni/../../curl/lib/easy.c:1012:10: error: conflicting types for 'curl_easy_pause'
CURLcode curl_easy_pause(struct Curl_easy *data, int action)
^
jni/../../curl/include/curl/curl.h:2413:22: note: previous declaration is here
CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
^
[arm64-v8a] Compile : curl <= getinfo.c
jni/../../curl/lib/easy.c:1081:10: error: conflicting types for 'curl_easy_recv'
CURLcode curl_easy_recv(struct Curl_easy *data, void *buffer, size_t buflen,
^
jni/../../curl/include/curl/easy.h:84:22: note: previous declaration is here
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
^
jni/../../curl/lib/easy.c:1108:10: error: conflicting types for 'curl_easy_send'
CURLcode curl_easy_send(struct Curl_easy *data, const void *buffer,
^
jni/../../curl/include/curl/easy.h:95:22: note: previous declaration is here
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
^
10 errors generated.
/home/olivier/Android/Sdk/ndk-bundle/build/core/build-binary.mk:497 : la recette pour la cible « obj/local/arm64-v8a/objs/curl///curl/lib/easy.o » a échouée
make: ** [obj/local/arm64-v8a/objs/curl///curl/lib/easy.o] Erreur 1
make: *** Attente des tâches non terminées....
jni/../../curl/lib/escape.c:78:7: error: conflicting types for 'curl_easy_escape'
char *curl_easy_escape(struct Curl_easy *data, const char *string,
^
jni/../../curl/include/curl/curl.h:1996:19: note: previous declaration is here
CURL_EXTERN char *curl_easy_escape(CURL *handle,
^
jni/../../curl/lib/escape.c:216:7: error: conflicting types for 'curl_easy_unescape'
char *curl_easy_unescape(struct Curl_easy *data, const char *string,
^
jni/../../curl/include/curl/curl.h:2016:19: note: previous declaration is here
CURL_EXTERN char *curl_easy_unescape(CURL *handle,
^
2 errors generated.
I was initially getting an error openssl/opensslconf.h was not found. So I created a symlink from /user/local/opt/openssl/include/openssl to /usr/local/incude
But now, getting many other errors. What went wrong?
Configuring for android
PERL =perl
PERLVERSION =5.18.2 for darwin-thread-multi-2level
HASHBANGPERL =/usr/bin/env perl
CC =arm-linux-androideabi-gcc
CFLAG =-Wall -O3 -pthread -mandroid -fPIC --sysroot=$(CROSS_SYSROOT) -Wa,--noexecstack
CXX =g++
CXXFLAG =-Wall -O3 -pthread -mandroid -fPIC --sysroot=$(CROSS_SYSROOT) -Wa,--noexecstack
DEFINES =DSO_DLFCN HAVE_DLFCN_H NDEBUG OPENSSL_THREADS OPENSSL_NO_DYNAMIC_ENGINE OPENSSL_PIC
EX_LIBS =-ldl
make: *** No rule to make target jni/../../openssl/ssl/d1_both.c', needed by
obj/local/arm64-v8a/objs/ssl///openssl/ssl/d1_both.o'. Stop.
make: *** Waiting for unfinished jobs....
[arm64-v8a] Compile : ssl <= bio_ssl.c
In file included from jni/../../openssl/ssl/bio_ssl.c:15:
In file included from jni/../../openssl/include/internal/bio.h:10:
jni/../../openssl/include/openssl/bio.h:679:27: warning: declaration of 'struct hostent' will not be visible outside of this
function [-Wvisibility]
DEPRECATEDIN_1_1_0(struct hostent *BIO_gethostbyname(const char *name))
^
jni/../../openssl/include/openssl/bio.h:680:1: error: expected function body after function declarator
DEPRECATEDIN_1_1_0(int BIO_get_port(const char *str, unsigned short *port_ptr))
^
jni/../../openssl/include/openssl/bio.h:692:55: warning: declaration of 'union BIO_sock_info_u' will not be visible outside of
this function [-Wvisibility]
enum BIO_sock_info_type type, union BIO_sock_info_u info);
^
In file included from jni/../../openssl/ssl/bio_ssl.c:16:
jni/../../openssl/include/openssl/err.h:247:1: error: expected function body after function declarator
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:58:
In file included from jni/../../openssl/include/openssl/rsa.h:16:
In file included from jni/../../openssl/include/openssl/asn1.h:24:
jni/../../openssl/include/openssl/bn.h:291:1: error: expected function body after function declarator
DEPRECATEDIN_0_9_8(int
^
jni/../../openssl/include/openssl/bn.h:362:1: error: expected function body after function declarator
DEPRECATEDIN_0_9_8(int BN_get_params(int which)) / 0, mul, 1 high, 2 low, 3
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:58:
In file included from jni/../../openssl/include/openssl/rsa.h:16:
jni/../../openssl/include/openssl/asn1.h:553:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
jni/../../openssl/include/openssl/asn1.h:553:68: error: expected ';' after top level declarator
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
;
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:58:
jni/../../openssl/include/openssl/rsa.h:206:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
jni/../../openssl/include/openssl/rsa.h:208:56: error: expected ';' after top level declarator
void *cb_arg))
^
;
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:59:
In file included from jni/../../openssl/include/openssl/dsa.h:31:
jni/../../openssl/include/openssl/dh.h:118:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator,
^
jni/../../openssl/include/openssl/dh.h:118:1: error: conflicting types for 'DEPRECATEDIN_0_9_8'
jni/../../openssl/include/openssl/rsa.h:206:1: note: previous declaration is here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:59:
In file included from jni/../../openssl/include/openssl/dsa.h:31:
jni/../../openssl/include/openssl/dh.h:121:61: error: expected ';' after top level declarator
void *cb_arg))
^
;
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:59:
jni/../../openssl/include/openssl/dsa.h:122:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits,
^
jni/../../openssl/include/openssl/dsa.h:122:1: error: conflicting types for 'DEPRECATEDIN_0_9_8'
jni/../../openssl/include/openssl/rsa.h:206:1: note: previous declaration is here
DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:59:
jni/../../openssl/include/openssl/dsa.h:129:63: error: expected ';' after top level declarator
void *cb_arg))
^
;
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:61:
In file included from jni/../../openssl/include/openssl/ssl.h:50:
jni/../../openssl/include/openssl/x509.h:709:1: error: expected function body after function declarator
DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl))
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:61:
In file included from jni/../../openssl/include/openssl/ssl.h:56:
jni/../../openssl/include/openssl/hmac.h:28:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
^
jni/../../openssl/include/openssl/hmac.h:28:1: error: conflicting types for 'DEPRECATEDIN_1_1_0'
jni/../../openssl/include/openssl/asn1.h:553:1: note: previous declaration is here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:61:
In file included from jni/../../openssl/include/openssl/ssl.h:56:
jni/../../openssl/include/openssl/hmac.h:29:40: error: expected ';' after top level declarator
const EVP_MD *md))
^
;
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:61:
jni/../../openssl/include/openssl/ssl.h:826:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
DEPRECATEDIN_1_1_0(void SSL_set_debug(SSL *s, int debug))
^
jni/../../openssl/include/openssl/ssl.h:826:1: error: conflicting types for 'DEPRECATEDIN_1_1_0'
jni/../../openssl/include/openssl/asn1.h:553:1: note: previous declaration is here
DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:61:
jni/../../openssl/include/openssl/ssl.h:826:58: error: expected ';' after top level declarator
DEPRECATEDIN_1_1_0(void SSL_set_debug(SSL *s, int debug))
^
;
jni/../../openssl/include/openssl/ssl.h:1596:1: error: expected function body after function declarator
DEPRECATEDIN_1_1_0(owur const SSL_METHOD SSLv3_server_method(void)) / SSLv3 */
^
jni/../../openssl/include/openssl/ssl.h:1611:1: error: expected function body after function declarator
DEPRECATEDIN_1_1_0(owur const SSL_METHOD TLSv1_server_method(void)) / TLSv1.0 */
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:67:
jni/../../openssl/ssl/packet_locl.h:424:5: error: use of undeclared identifier 'OPENSSL_FILE'; did you mean 'OPENSSL_die'?
OPENSSL_free(*data);
^
jni/../../openssl/include/openssl/crypto.h:137:27: note: expanded from macro 'OPENSSL_free'
CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
^
jni/../../openssl/include/openssl/crypto.h:324:20: note: 'OPENSSL_die' declared here
ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
^
In file included from jni/../../openssl/ssl/bio_ssl.c:17:
In file included from jni/../../openssl/ssl/ssl_locl.h:67:
jni/../../openssl/ssl/packet_locl.h:424:5: error: use of undeclared identifier 'OPENSSL_LINE'
OPENSSL_free(*data);
^
jni/../../openssl/include/openssl/crypto.h:137:41: note: expanded from macro 'OPENSSL_free'
CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
8 warnings and 20 errors generated.
make: *** [obj/local/arm64-v8a/objs/ssl///openssl/ssl/bio_ssl.o] Error 1
Error building the libssl and libcrypto
If the paths for an install of MacPorts are present...
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
...the build will fail due to using the wrong libraries.
This is easily remedied by removing the Macports path and continuing.
Thanks for the project. I have managed to run the script successfully, however, the output file size (libcurl.a) is almost 5mb, is there anyway to make it alot smaller. I just needed http/https protocol access. I have also tried disabling other protocols in ./configure section but still doesn't help. Any help will be greatly appreciated. Thanks
First, thanks for providing this repo and keeping it up to date (I noticed your Jul 2nd update). You rock. cURL is painful to build for Android from the official repos.
curl_setopt()'s CURLOPT_CAPATH specifies the path to a certificate file. Unfortunately, libcURL doesn't read inside APK files. To the best of my knowledge, CURLOPT_SSL_VERIFYPEER can't work on Android, and if you try to connect to an https endpoint, it'll just fail with errorcode CURLE_SSL_CACERT.
Is there a way to specify a cert file on Android? Have I missed something?
Thanks!
I tried to build the curl android version using ./build_Android.sh
,but failed.
/Users/p/AndroidStudio/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/darwin-x86_64/bin/i686-linux-android-ar: ./obj/local/x86/objs/curl/__/__/curl/lib/vauth/krb5_sspi.o: Too many open files in system
make: *** [obj/local/x86/libcurl.a] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/Users/p/Code/CURL/curl-android-ios/curl-compile-scripts'
Error running the ndk-build program
Hello,
I am building a cross platform SDK in C (common for Android/iOS/Windows) in which I want to use curl. Can I use your library?
Regards
Winster
Hi,
thanks for your awesome work it really helps us a lot. We have integrated it into ARToolKit and it saved us quite some time 👍 .
Recently I came across a weird error on Android arm64-v8a architecture devices. I hope that you can find the time and try to reproduce it and if possible fix it.
You can find my changes to your Android example app on my fork in this branch:
https://github.com/ThorstenBux/curl-android-ios/tree/curl_arm64-v8a
Basically, I added form data and forced the build to only produce an arm64-v8a library. I already tried several different things to solve it but none helped. Please let me know if you can help me out with this. I'm more than happy to help where ever I can to reproduce that error for you.
Thank you very much in advance
Hi,
I am trying to use C++ in my Android app. I want to write all the business logic in C++ and then use it from Android, iOS and Windows apps. That's the dream goal and your pre-compiled libraries are going to help me a lot.
I have one question. Is there a dependency on libiconv or is it included?
Thanks,
Vinod
Following the readme, I did
git clone [email protected]:gcesarmza/curl-android-ios.git
cd curl-android-ios/
git submodule init && git submodule update
export NDK_ROOT=/root/android-ndk-r13b/
./build_Android.sh
But I am getting an error, the full log output is:
root@melka-xubuntu-16-04:~/AvastClient/framework/pamcore/3rdparty/Android/curl-android-ios/curl-compile-scripts# ./build_Android.sh
Configuring OpenSSL version 1.1.1-dev (0x10101000L)
no-asan [default] OPENSSL_NO_ASAN
no-asm [option] OPENSSL_NO_ASM
no-camellia [option] OPENSSL_NO_CAMELLIA (skip dir)
no-cast [option] OPENSSL_NO_CAST (skip dir)
no-crypto-mdebug [default] OPENSSL_NO_CRYPTO_MDEBUG
no-crypto-mdebug-backtrace [default] OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
no-dynamic-engine [forced]
no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128
no-egd [default] OPENSSL_NO_EGD
no-external-tests [default] OPENSSL_NO_EXTERNAL_TESTS
no-fuzz-afl [default] OPENSSL_NO_FUZZ_AFL
no-fuzz-libfuzzer [default] OPENSSL_NO_FUZZ_LIBFUZZER
no-heartbeats [default] OPENSSL_NO_HEARTBEATS
no-idea [option] OPENSSL_NO_IDEA (skip dir)
no-md2 [default] OPENSSL_NO_MD2 (skip dir)
no-msan [default] OPENSSL_NO_MSAN
no-rc5 [default] OPENSSL_NO_RC5 (skip dir)
no-sctp [default] OPENSSL_NO_SCTP
no-shared [option]
no-ssl-trace [default] OPENSSL_NO_SSL_TRACE
no-ssl3 [default] OPENSSL_NO_SSL3
no-ssl3-method [default] OPENSSL_NO_SSL3_METHOD
no-tls1_3 [default] OPENSSL_NO_TLS1_3
no-ubsan [default] OPENSSL_NO_UBSAN
no-unit-test [default] OPENSSL_NO_UNIT_TEST
no-weak-ssl-ciphers [default] OPENSSL_NO_WEAK_SSL_CIPHERS
no-zlib [default]
no-zlib-dynamic [default]
Configuring for android
PERL =/usr/bin/perl
PERLVERSION =5.22.1 for x86_64-linux-gnu-thread-multi
HASHBANGPERL =/usr/bin/env perl
CC =gcc
CFLAG =-Wall -O3 -pthread -mandroid -fPIC --sysroot=$(CROSS_SYSROOT) -Wa,--noexecstack
CXX =g++
CXXFLAG =-Wall -O3 -pthread -mandroid -fPIC --sysroot=$(CROSS_SYSROOT) -Wa,--noexecstack
DEFINES =DSO_DLFCN HAVE_DLFCN_H NDEBUG OPENSSL_THREADS OPENSSL_NO_DYNAMIC_ENGINE OPENSSL_PIC
EX_LIBS =-ldl
make: Entering directory '/root/AvastClient/framework/pamcore/3rdparty/Android/curl-android-ios/curl-compile-scripts'
[arm64-v8a] Compile : ssl <= bio_ssl.c
In file included from jni/../../openssl/ssl/bio_ssl.c:14:
In file included from jni/../../openssl/include/openssl/crypto.h:22:
jni/../../openssl/include/openssl/e_os2.h:13:11: fatal error: 'openssl/opensslconf.h' file not found
# include <openssl/opensslconf.h>
^
1 error generated.
/root/android-ndk-r13b/build/core/build-binary.mk:497: recipe for target 'obj/local/arm64-v8a/objs/ssl/__/__/openssl/ssl/bio_ssl.o' failed
make: *** [obj/local/arm64-v8a/objs/ssl/__/__/openssl/ssl/bio_ssl.o] Error 1
make: Leaving directory '/root/AvastClient/framework/pamcore/3rdparty/Android/curl-android-ios/curl-compile-scripts'
Error building the libssl and libcrypto
The only file resembling the opensslconf.h
is include/openssl/opensslconf.h.in
, but that seems to be a template of some sorts.
Any idea what went wrong?
im trying to build it for android , i get this error
./build_Android.sh: line 34: ./Configure: No such file or directory
Error running the ssl configure program
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
Hi !
Thank you so much for your work !
I was wondering if you could update your android sample please.
Because I'm struggling setting up the lib with Cmake
Thank you !
Hello, first of all:
Thank you very much for this repository, you are a gift for everybody who have to use libcurl in an android app.
Google announced to replace OpenSSL with its own fork BoringSSL in the future on Android. As this is already available via googlesource would it be possible that you can provide libcurl static builds with boringSSL support?
Afaik curl itself support compiled with BoringSSL since 7.44.0
When I link this prebuilt library, I get this error msg:
undefined reference to 'ENGINE_load_gost'
undefined reference to 'ENGINE_load_padlock'
undefined reference to 'ENGINE_load_ubsec'
undefined reference to 'ENGINE_load_sureware'
...
I am new to this, I googled it but got nothing useful. please help me.
How to build prebuilt version without ssl?
Hi, I am trying to run your build_Android.sh but in the line 25 the script can't find the "./Configure" command. How do I install it?I get my way around the SDK well, but I am a n00b with the NDK.
Trying to compile with Ubuntu.
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.