Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- NDK=/usr/local/ndk
- SYSROOT=$NDK/platforms/android-19/arch-arm/
- TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
- OPENSSL_DIR=/usr/local/src/ffmpeg/openssl-android/
- LIBRTMP_DIR=/usr/local/src/ffmpeg/rtmpdump/librtmp/
- # Note: Change above variables to match your system
- function build_one
- {
- ./configure \
- --prefix=$PREFIX \
- --enable-librtmp \
- --enable-openssl \
- --disable-shared \
- --enable-static \
- --disable-doc \
- --disable-programs \
- --disable-doc \
- --pkg-config-flags="--static" \
- --disable-symver \
- --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
- --target-os=linux \
- --arch=arm \
- --enable-cross-compile \
- --sysroot=$SYSROOT \
- --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
- --extra-ldflags="$ADDI_LDFLAGS" \
- $ADDITIONAL_CONFIGURE_FLAG
- make clean
- make -j8
- make install
- }
- CPU=arm
- PREFIX=$(pwd)/android/$CPU
- ADDI_CFLAGS="-marm -I${OPENSSL_DIR}include -I${LIBRTMP_DIR}android/arm/include -L${LIBRTMP_DIR}android/arm/lib -lrtmp -static"
- ADDI_LFLAGS="-L${OPENSSL_DIR}libs/armeabi -L${LIBRTMP_DIR}android/arm/lib -lrtmp -ldl -static"
- #-L${SYSROOT}usr/lib"
- build_one
- /usr/local/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/ndk/platforms/android-19/arch-arm/ -isysroot /usr/local/ndk/platforms/android-19/arch-arm/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Dstrtod=avpriv_strtod -DPIC -Os -fpic -marm -I/usr/local/src/ffmpeg/openssl-android/include -I/usr/local/src/ffmpeg/rtmpdump/librtmp/android/arm/include -L/usr/local/src/ffmpeg/rtmpdump/librtmp/android/arm/lib -lrtmp -static -march=armv5te -std=c99 -fomit-frame-pointer -fPIC -marm -pthread -c -o /tmp/ffconf.ecnlss7o.o /tmp/ffconf.9UBKxdU3.c
- /usr/local/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/usr/local/ndk/platforms/android-19/arch-arm/ -isysroot /usr/local/ndk/platforms/android-19/arch-arm/ -march=armv5te -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.VtB0dLAJ /tmp/ffconf.ecnlss7o.o -lssl -lcrypto -lws2_32 -lgdi32 -L/usr/local/src/ffmpeg/rtmpdump/librtmp/android/arm/lib -lrtmp -lm -lz -pthread
- /usr/local/ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lssl
- /usr/local/ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrypto
- /usr/local/ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lws2_32
- /usr/local/ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lgdi32
- /tmp/ffconf.ecnlss7o.o:ffconf.9UBKxdU3.c:function main: error: undefined reference to 'SSL_library_init'
- collect2: error: ld returned 1 exit status
- ERROR: openssl not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement