Advertisement
Guest User

Untitled

a guest
Jan 9th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. #!/bin/bash
  2. NDK=/usr/local/ndk
  3. SYSROOT=$NDK/platforms/android-19/arch-arm/
  4. TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
  5.  
  6. OPENSSL_DIR=/usr/local/src/ffmpeg/openssl-android/
  7. LIBRTMP_DIR=/usr/local/src/ffmpeg/rtmpdump/librtmp/
  8. # Note: Change above variables to match your system
  9. function build_one
  10. {
  11. ./configure \
  12. --prefix=$PREFIX \
  13. --enable-librtmp \
  14. --enable-openssl \
  15. --disable-shared \
  16. --enable-static \
  17. --disable-doc \
  18. --disable-programs \
  19. --disable-doc \
  20. --pkg-config-flags="--static" \
  21. --disable-symver \
  22. --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
  23. --target-os=linux \
  24. --arch=arm \
  25. --enable-cross-compile \
  26. --sysroot=$SYSROOT \
  27. --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
  28. --extra-ldflags="$ADDI_LDFLAGS" \
  29. $ADDITIONAL_CONFIGURE_FLAG
  30. make clean
  31. make -j8
  32. make install
  33. }
  34. CPU=arm
  35. PREFIX=$(pwd)/android/$CPU
  36. ADDI_CFLAGS="-marm -I${OPENSSL_DIR}include -I${LIBRTMP_DIR}android/arm/include -L${LIBRTMP_DIR}android/arm/lib -lrtmp -static"
  37. ADDI_LFLAGS="-L${OPENSSL_DIR}libs/armeabi -L${LIBRTMP_DIR}android/arm/lib -lrtmp -ldl -static"
  38. #-L${SYSROOT}usr/lib"
  39. build_one
  40.  
  41. /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
  42. /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
  43. /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
  44. /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
  45. /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
  46. /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
  47. /tmp/ffconf.ecnlss7o.o:ffconf.9UBKxdU3.c:function main: error: undefined reference to 'SSL_library_init'
  48. collect2: error: ld returned 1 exit status
  49. ERROR: openssl not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement