Git Product home page Git Product logo

android-curl-builder's Introduction

Android Curl Builder (ACB)

License

Set of bash scripts used to cross compile curl & its dependencies for Android platform

Compatibility

  • Linux
  • MAC OSX

Build for arm architecture only

Help

Usage : acb [ARGUMENTS...]
acb build curl for Android platform with its dependencies

Example:
  acb -ndk=/home/user/ndk -android_platform=android-17 -global_install=/home/user/install_dir

Arguments:

  -ndk=[PATH]                   specify ndk directory path
  -android_platform=[PLATFORM]  specify target android platform (android-XX)
  -toolchain=[PATH]             specify path to android toolchain
  -zlib_src=[PATH]              specify path to zlib source directory
  -openssl_src=[PATH]           specify path to openssl source directory
  -curl_src=[PATH]              specify path to curl source directory
  -zlib_install=[PATH]          specify path to zlib install directory
  -openssl_install=[PATH]       specify path to openssl install directory
  -curl_install=[PATH]          specify path to curl install directory
  -global_install=[PATH]        specify path to global install directory (curl and its dependencies release will be copied to this directory)
  --disable-zlib-build          wont build zlib if zlib install directory is specified
  --disable-openssl-build       wont build openssl if openssl install directory is specified
  -v, --version                 show version
  -h, --help                    show help

Libraries built

The following libraries are cross compiled for Android platform :

  • zlib
  • openssl
  • curl

Utilities required

  • wget
  • make
  • tar
  • perl
  • makedepend
  • autoconf
  • automake

Troubleshoot

If you have any troubles / questions, please create an issue

License

Copyright (C) 2016  Bertrand Martel

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.

Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

android-curl-builder's People

Contributors

bertrandmartel avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

android-curl-builder's Issues

Need help. - compilation errors

Dear,

I used your scripts with android ndk latest subrelease of version 16 for platform android-19
And I tried manually doing a toolchain and i always come to the same problem. Please check this:

./acb -ndk=/home/user/playground/android-ndk-r16b -android_platform=android-19 -global_install=/tmp/tooloo
Android Curl Builder tool version 1.0.1 (05-27-2016)
Copyright (C) 2016 by Bertrand Martel under GPL License
HOST_OS=linux
HOST_EXE=
HOST_ARCH=x86_64
HOST_TAG=linux-x86_64
HOST_NUM_CPUS=1
BUILD_NUM_CPUS=2
Toolchain installed to /tmp/toolchain.

| OS : LINUX
| INSTALL_DIR : /tmp
| NDK_DIR : /home/user/playground/android-ndk-r16b
| TOOLCHAIN_DIR : /tmp/toolchain
| BUILD_ZLIB : 1
| BUILD_OPENSSL : 1
| TOOLCHAIN_PLATFORM : android-19
| CROSS_COMPILE : arm-linux-androideabi
| ANDROID_CC : arm-linux-androideabi-gcc
| ANDROID_AR : arm-linux-androideabi-ar
| ANDROID_AS : arm-linux-androideabi-as
| ANDROID_LD : arm-linux-androideabi-ld
| ANDROID_NM : arm-linux-androideabi-nm
| ANDROID_RANLIB : arm-linux-androideabi-ranlib
| ZLIB_TARBALL : http://www.zlib.net/zlib-1.2.11.tar.gz
| OPENSSL_TARBALL : https://www.openssl.org/source/openssl-1.0.1p.tar.gz
| ANDROID_EABI : arm-linux-androideabi-4.8
| ANDROID_ARCH : arch-arm
| OPENSSL_CONFIG_ARGS : shared no-ssl2 no-ssl3 no-comp no-hw no-engine
| CURL_TARBALL : https://github.com/curl/curl/archive/curl-7_49_0.tar.gz
| CURL_ARGS : --with-ssl --with-zlib --disable-ftp --disable-gopher
--disable-file --disable-imap --disable-ldap --disable-ldaps
--disable-pop3 --disable-proxy --disable-rtsp --disable-smtp
--disable-telnet --disable-tftp --without-gnutls --without-libidn
--without-librtmp --disable-dict


| ZLIB TASK |

set zlib install directory ...
downloading zlib ...
zlib-1.2.11.tar.gz 100%[==============================================================================================================>] 593.46K 701KB/s in 0.8s


| ZLIB_INSTALL_DIR : /tmp/zlib
| ZLIB_SOURCE_DIR :

building zlib ...
Checking for shared library support...
Building shared library libz.so.1.2.11 with arm-linux-androideabi-gcc.
Checking for size_t... Yes.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for strerror... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o adler32.o adler32.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o crc32.o crc32.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o deflate.o deflate.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o infback.o infback.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inffast.o inffast.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inflate.o inflate.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inftrees.o inftrees.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o trees.o trees.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o zutil.o zutil.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o compress.o compress.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o uncompr.o uncompr.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzclose.o gzclose.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzlib.o gzlib.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzread.o gzread.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzwrite.o gzwrite.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/crc32.o crc32.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/adler32.o adler32.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/deflate.o deflate.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/infback.o infback.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inffast.o inffast.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inflate.o inflate.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inftrees.o inftrees.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/trees.o trees.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/compress.o compress.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/zutil.o zutil.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/uncompr.o uncompr.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzclose.o gzclose.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzlib.o gzlib.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzread.o gzread.c
arm-linux-androideabi-gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzwrite.o gzwrite.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
arm-linux-androideabi-ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
arm-linux-androideabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo -lc
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example64 example64.o -L. libz.a
arm-linux-androideabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a
example64.o:example.c:function test_compress: error: undefined reference to 'stderr'
example64.o:example.c:function test_gzio: error: undefined reference to 'stderr'
example64.o:example.c:function test_deflate: error: undefined reference to 'stderr'
example64.o:example.c:function test_inflate: error: undefined reference to 'stderr'
collect2: error: ld returned 1 exit status
Makefile:301: recipe for target 'example64' failed
make: *** [example64] Error 1
make: *** Waiting for unfinished jobs....
minigzip.o:minigzip.c:function error: error: undefined reference to 'stderr'
minigzip.o:minigzip.c:function file_compress: error: undefined reference to 'stderr'
minigzip.o:minigzip.c:function file_compress: error: undefined reference to 'stderr'
minigzip.o:minigzip.c:function file_uncompress: error: undefined reference to 'stderr'
minigzip.o:minigzip.c:function main: error: undefined reference to 'stdin'
minigzip.o:minigzip.c:function main: error: undefined reference to 'stdout'
collect2: error: ld returned 1 exit status
Makefile:292: recipe for target 'minigzip' failed
make: *** [minigzip] Error 1
example.o:example.c:function test_compress: error: undefined reference to 'stderr'
example.o:example.c:function test_gzio: error: undefined reference to 'stderr'
example.o:example.c:function test_deflate: error: undefined reference to 'stderr'
example.o:example.c:function test_inflate: error: undefined reference to 'stderr'
collect2: error: ld returned 1 exit status
Makefile:289: recipe for target 'example' failed
make: *** [example] Error 1
minigzip64.o:minigzip.c:function error: error: undefined reference to 'stderr'
minigzip64.o:minigzip.c:function file_compress: error: undefined reference to 'stderr'
minigzip64.o:minigzip.c:function file_compress: error: undefined reference to 'stderr'
minigzip64.o:minigzip.c:function file_uncompress: error: undefined reference to 'stderr'
minigzip64.o:minigzip.c:function main: error: undefined reference to 'stdin'
minigzip64.o:minigzip.c:function main: error: undefined reference to 'stdout'
collect2: error: ld returned 1 exit status
Makefile:304: recipe for target 'minigzip64' failed
make: *** [minigzip64] Error 1
rm -f libz.so libz.so.1
ln -s libz.so.1.2.11 libz.so
ln -s libz.so.1.2.11 libz.so.1

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.