VoiSmart / pjsip-android-builder

Complete Android build environment for PJSIP with OpenSSL, OpenH264, Opus and G.729
223 stars 135 forks source link

openssl mips64 build #11

Closed xiaozhubenben closed 8 years ago

xiaozhubenben commented 8 years ago

hi I ran your build script seemed broken on vmware ubuntu 14.4.4 server 64bits . after downloaded and built openssl on mips64 , it stoped. Here is logs:

Copying prebuilt binaries... Copying sysroot headers and libraries... Copying c++ runtime headers and libraries... Copying files to: /tmp/openssl/android-toolchain-mips64el Cleaning up... Done. Usage: Configure [no- ...] [enable- ...] [experimental- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]

pick os/compiler from: BC-32 BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8 BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-x86_64 DJGPP MPE/iX-gcc OS2-EMX OS390-Unix QNX6 QNX6-i386 ReliantUNIX SINIX SINIX-N UWIN VC-CE VC-WIN32 VC-WIN64A VC-WIN64I aix-cc aix-gcc aix3-cc aix64-cc aix64-gcc android android-armv7 android-mips android-x86 aux3-gcc beos-x86-bone beos-x86-r5 bsdi-elf-gcc cc cray-j90 cray-t3e darwin-i386-cc darwin-ppc-cc darwin64-ppc-cc darwin64-x86_64-cc dgux-R3-gcc dgux-R4-gcc dgux-R4-x86-gcc dist gcc hpux-cc hpux-gcc hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-cc-o4 hpux-parisc-gcc hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux-parisc2-cc hpux-parisc2-gcc hpux64-ia64-cc hpux64-ia64-gcc hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 iphoneos-cross irix-cc irix-gcc irix-mips3-cc irix-mips3-gcc irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha+bwx-ccc linux-alpha+bwx-gcc linux-alpha-ccc linux-alpha-gcc linux-aout linux-armv4 linux-elf linux-generic32 linux-generic64 linux-ia32-icc linux-ia64 linux-ia64-icc linux-mips32 linux-mips64 linux-ppc linux-ppc64 linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86_64 linux-x86_64-clang linux-x86_64-icc linux32-s390x linux64-mips64 linux64-s390x linux64-sparcv9 mingw mingw64 ncr-scde netware-clib netware-clib-bsdsock netware-clib-bsdsock-gcc netware-clib-gcc netware-libc netware-libc-bsdsock netware-libc-bsdsock-gcc netware-libc-gcc newsos4-gcc nextstep nextstep3.3 osf1-alpha-cc osf1-alpha-gcc purify qnx4 rhapsody-ppc-cc sco5-cc sco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc solaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-cc solaris-x86-gcc solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc solaris64-x86_64-gcc sunos-gcc tandem-c89 tru64-alpha-cc uClinux-dist uClinux-dist64 ultrix-cc ultrix-gcc unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vos-gcc vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug vxworks-ppc860 vxworks-ppcgen vxworks-simlinux debug debug-BSD-x86-elf debug-VC-WIN32 debug-VC-WIN64A debug-VC-WIN64I debug-ben debug-ben-darwin64 debug-ben-debug debug-ben-debug-64 debug-ben-debug-64-clang debug-ben-macos debug-ben-macos-gcc46 debug-ben-no-opt debug-ben-openbsd debug-ben-openbsd-debug debug-ben-strict debug-bodo debug-darwin-i386-cc debug-darwin-ppc-cc debug-darwin64-x86_64-cc debug-geoff32 debug-geoff64 debug-levitte-linux-elf debug-levitte-linux-elf-extreme debug-levitte-linux-noasm debug-levitte-linux-noasm-extreme debug-linux-elf debug-linux-elf-noefence debug-linux-generic32 debug-linux-generic64 debug-linux-ia32-aes debug-linux-pentium debug-linux-ppro debug-linux-x86_64 debug-linux-x86_64-clang debug-rse debug-solaris-sparcv8-cc debug-solaris-sparcv8-gcc debug-solaris-sparcv9-cc debug-solaris-sparcv9-gcc debug-steve-opt debug-steve32 debug-steve64 debug-vos-gcc

NOTE: If in doubt, on Unix-ish systems use './config'. Configuring for android-mips64

gotev commented 8 years ago

Have you executed the prepare-build-system script before that? Il 15 mar 2016 2:53 AM, "Luke Wong" notifications@github.com ha scritto:

hi I ran your build script seemed broken on vmware ubuntu 14.4.4 server 64bits . after downloaded and built openssl on mips64 , it stoped. Here is logs:

Copying prebuilt binaries... Copying sysroot headers and libraries... Copying c++ runtime headers and libraries... Copying files to: /tmp/openssl/android-toolchain-mips64el Cleaning up... Done. Usage: Configure [no- ...] [enable- ...] [experimental- ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]

pick os/compiler from: BC-32 BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8 BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-x86_64 DJGPP MPE/iX-gcc OS2-EMX OS390-Unix QNX6 QNX6-i386 ReliantUNIX SINIX SINIX-N UWIN VC-CE VC-WIN32 VC-WIN64A VC-WIN64I aix-cc aix-gcc aix3-cc aix64-cc aix64-gcc android android-armv7 android-mips android-x86 aux3-gcc beos-x86-bone beos-x86-r5 bsdi-elf-gcc cc cray-j90 cray-t3e darwin-i386-cc darwin-ppc-cc darwin64-ppc-cc darwin64-x86_64-cc dgux-R3-gcc dgux-R4-gcc dgux-R4-x86-gcc dist gcc hpux-cc hpux-gcc hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-cc-o4 hpux-parisc-gcc hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux-parisc2-cc hpux-parisc2-gcc hpux64-ia64-cc hpux64-ia64-gcc hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 iphoneos-cross irix-cc irix-gcc irix-mips3-cc irix-mips3-gcc irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha+bwx-ccc linux-alpha+bwx-gcc linux-alpha-ccc linux-alpha-gcc linux-aout linux-armv4 linux-elf linux-generic32 linux-generic64 linux-ia32-icc linux-ia64 linux-ia64-icc linux-mips32 linux-mips64 linux-ppc linux-ppc64 linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86_64 linux-x86_64-clang linux-x86_64-icc linux32-s390x linux64-mips64 linux64-s390x linux64-sparcv9 mingw mingw64 ncr-scde netware-clib netware-clib-bsdsock netware-clib-bsdsock-gcc netware-clib-gcc netware-libc netware-libc-bsdsock netware-libc-bsdsock-gcc netware-libc-gcc newsos4-gcc nextstep nextstep3.3 osf1-alpha-cc osf1-alpha-gcc purify qnx4 rhapsody-ppc-cc sco5-cc sco5-gcc solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc solaris-sparcv8-gcc solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-cc solaris-x86-gcc solaris64-sparcv9-cc solaris64-sparcv9-gcc solaris64-x86_64-cc solaris64-x86_64-gcc sunos-gcc tandem-c89 tru64-alpha-cc uClinux-dist uClinux-dist64 ultrix-cc ultrix-gcc unixware-2.0 unixware-2.1 unixware-7 unixware-7-gcc vos-gcc vxworks-mips vxworks-ppc405 vxworks-ppc60x vxworks-ppc750 vxworks-ppc750-debug vxworks-ppc860 vxworks-ppcgen vxworks-simlinux debug debug-BSD-x86-elf debug-VC-WIN32 debug-VC-WIN64A debug-VC-WIN64I debug-ben debug-ben-darwin64 debug-ben-debug debug-ben-debug-64 debug-ben-debug-64-clang debug-ben-macos debug-ben-macos-gcc46 debug-ben-no-opt debug-ben-openbsd debug-ben-openbsd-debug debug-ben-strict debug-bodo debug-darwin-i386-cc debug-darwin-ppc-cc debug-darwin64-x86_64-cc debug-geoff32 debug-geoff64 debug-levitte-linux-elf debug-levitte-linux-elf-extreme debug-levitte-linux-noasm debug-levitte-linux-noasm-extreme debug-linux-elf debug-linux-elf-noefence debug-linux-generic32 debug-linux-generic64 debug-linux-ia32-aes debug-linux-pentium debug-linux-ppro debug-linux-x86_64 debug-linux-x86_64-clang debug-rse debug-solaris-sparcv8-cc debug-solaris-sparcv8-gcc debug-solaris-sparcv9-cc debug-solaris-sparcv9-gcc debug-steve-opt debug-steve32 debug-steve64 debug-vos-gcc

NOTE: If in doubt, on Unix-ish systems use './config'. Configuring for android-mips64

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/gotev/pjsip-android-builder/issues/11

xiaozhubenben commented 8 years ago

yes .I did.

xiaozhubenben commented 8 years ago

I created clean ubuntu 14.4.4 server vmware vm from iso . and ssh it. sudo apt-get install -y git git clone https://github.com/alexbbb/pjsip-android-builder cd pjsip-android-builder ./prepare-build-system

when script ran to build openssl and openh264 . It seemed errors happened. openssl stoped at built on mips64 . if I modify config.conf file .and set
DOWNLOAD_OPENSSL=0 It seemed ok ,but openh264 so is not bult on target folder., but the other part of scripts seemed built successful.

I tried several times .It's same result.

gotev commented 8 years ago

@xiaozhubenben you've done everything right. The problem is that OpenSSL doesn't compile for Mips64 and OpenH264 1.0.0 doesn't build for any 64 bit architecture, as stated on their website. Check also #2 and #8 for firther reference. OpenH264 developers have fixed that in further releases, but unfortunately they are not compatible with PJSIP 2.4.5. Check the build compatibility matrix in the readme to see for which architectures the build script works. I usually compile only for armeabi, armeabi-v7a and x86, on which everything compiles without problems. If you're able to make things work for the missing architectures, I'll be glad to merge your pull request

gotev commented 8 years ago

Check also the two commits I've made in which I've added some reference and explanations and update your local copy.

xiaozhubenben commented 8 years ago

Thanks! I had downloaded the new script. The openssl is built successly now. but when built openH264 , it seemed nothing output on target folder. here is the screen output:

.....
Downloading OpenH264 ... ######################################################################## 100.0% OpenH264 downloaded! Extracting OpenH264 ... Building OpenH264 for target arch armeabi ... The build system is ready! Execute: ./build to build PJSIP :)

here is the error log:

[armeabi] Prebuilt : libopenh264.so <= jni/../../../../../ [armeabi] Install : libopenh264.so => libs/armeabi/libopenh264.so [armeabi] Compile++ thumb: welsdecdemo <= h264dec.cpp [armeabi] Compile++ thumb: welsdecdemo <= read_config.cpp [armeabi] Compile++ thumb: welsdecdemo <= d3d9_utils.cpp [armeabi] Compile++ thumb: welsdecdemo <= logging.cpp [armeabi] Compile++ thumb: welsdecdemo <= myjni.cpp [armeabi] Prebuilt : libstlport_shared.so <= <NDK>/sources/cxx-stl/stlport/libs/armeabi/thumb/ [armeabi] SharedLibrary : libwelsdecdemo.so [armeabi] Install : libwelsdecdemo.so => libs/armeabi/libwelsdecdemo.so [armeabi] Install : libstlport_shared.so => libs/armeabi/libstlport_shared.so make[1]: Leaving directory/tmp/openh264/codec/build/android/dec' Updated and renamed default.properties to project.properties Updated local.properties No project name specified, using Activity name 'WelsDecTest'. If you wish to change it, edit the first line of build.xml. Added file ./build.xml Added file ./proguard-project.txt Buildfile: /tmp/openh264/codec/build/android/dec/build.xml

-set-mode-check:

-set-debug-files:

-check-env: [checkenv] Android SDK Tools Revision 24.4.1 [checkenv] Installed at /home/lukewang/pjsip-android-builder/android-sdk-linux

-setup: [echo] Project Name: WelsDecTest [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup: [getbuildtools] Using latest Build Tools: 24.0.0 rc1 [echo] Resolving Build Target for WelsDecTest... [gettarget] Project Target: Android 4.3.1 [gettarget] API level: 18 [echo] ---------- [echo] Creating output directories if needed... [mkdir] Created dir: /tmp/openh264/codec/build/android/dec/bin [mkdir] Created dir: /tmp/openh264/codec/build/android/dec/bin/res [mkdir] Created dir: /tmp/openh264/codec/build/android/dec/bin/rsObj [mkdir] Created dir: /tmp/openh264/codec/build/android/dec/bin/rsLibs [mkdir] Created dir: /tmp/openh264/codec/build/android/dec/gen [mkdir] Created dir: /tmp/openh264/codec/build/android/dec/bin/classes [mkdir] Created dir: /tmp/openh264/codec/build/android/dec/bin/dexedLibs [echo] ---------- [echo] Resolving Dependencies for WelsDecTest... [dependency] Library dependencies: [dependency] No Libraries [dependency] [dependency] ------------------ [echo] ---------- [echo] Building Libraries with 'debug'... [subant] No sub-builds to iterate on

-code-gen: [mergemanifest] Merging AndroidManifest files into one. [mergemanifest] Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [echo] ---------- [echo] Handling Resources... [aapt] Generating resource IDs... [echo] ---------- [echo] Handling BuildConfig class... [buildconfig] Generating BuildConfig class.

-pre-compile:

-compile: [javac] Compiling 3 source files to /tmp/openh264/codec/build/android/dec/bin/classes

-post-compile:

-obfuscate:

-dex: [dex] input: /tmp/openh264/codec/build/android/dec/bin/classes [dex] Converting compiled files and external libraries into /tmp/openh264/codec/build/android/dec/bin/classes.dex... [dx] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0 [dx] at java.lang.ClassLoader.defineClass1(Native Method) [dx] at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [dx] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [dx] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) [dx] at java.net.URLClassLoader.access$100(URLClassLoader.java:71) [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:361) [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:355) [dx] at java.security.AccessController.doPrivileged(Native Method) [dx] at java.net.URLClassLoader.findClass(URLClassLoader.java:354) [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) [dx] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) [dx] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

BUILD FAILED /home/lukewang/pjsip-android-builder/android-sdk-linux/tools/ant/build.xml:888: The following error occurred while executing this line: /home/lukewang/pjsip-android-builder/android-sdk-linux/tools/ant/build.xml:890: The following error occurred while executing this line: /home/lukewang/pjsip-android-builder/android-sdk-linux/tools/ant/build.xml:902: The following error occurred while executing this line: /home/lukewang/pjsip-android-builder/android-sdk-linux/tools/ant/build.xml:283: null returned: 1

Total time: 4 seconds make: *\ [decdemo] Error 1`

gotev commented 8 years ago

You can find full logs for OpenH264 in openh264-build-output/logs folder. You can also trigger OpenH264 compilation with ./openh264-build-target-archs script, so you don't have to download the sources every time. By what I see from the stack trace, the error is caused by java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0. This happens when you try to run code compiled with newer JDK on older JVM (e.g. you compile with Java 8 and try to execute on Java 7). Ubuntu 14.04.4 has Java 7. The last time I ran the scripts from scratch, SDK Tools version was < 24.0.0 rc1, so I think they have switched to Java 8. Try to completely remove Java 7 and install Java 8. I have actually installed Java 8 manually.

gotev commented 8 years ago

Made a commit to include Java 8 in the setup process. Update your local copy, set SETUP_PACKAGES=1 in your config.conf and run ./prepare-build-system again. I recommend you to set other flags to 0 to avoid re-downloading a lot of stuff.

xiaozhubenben commented 8 years ago

It's OK now. Thank you very much!

martsa commented 3 years ago

I am not able to create any openh264 build for any of the architecture . below are error from log folder .. any help would be highly appreciated

make[1]: Entering directory '/tmp/openh264/codec/build/android/dec' [armeabi-v7a] Prebuilt : libopenh264.so <= jni/../../../../../ [armeabi-v7a] Install : libopenh264.so => libs/armeabi-v7a/libopenh264.so [armeabi-v7a] Compile++ thumb: welsdecdemo <= h264dec.cpp [armeabi-v7a] Compile++ thumb: welsdecdemo <= read_config.cpp [armeabi-v7a] Compile++ thumb: welsdecdemo <= d3d9_utils.cpp [armeabi-v7a] Compile++ thumb: welsdecdemo <= myjni.cpp [armeabi-v7a] Prebuilt : libstlport_shared.so <= /sources/cxx-stl/stlport/libs/armeabi-v7a/ [armeabi-v7a] SharedLibrary : libwelsdecdemo.so [armeabi-v7a] Install : libwelsdecdemo.so => libs/armeabi-v7a/libwelsdecdemo.so [armeabi-v7a] Install : libstlport_shared.so => libs/armeabi-v7a/libstlport_shared.so make[1]: Leaving directory '/tmp/openh264/codec/build/android/dec' Updated and renamed default.properties to project.properties Updated local.properties No project name specified, using Activity name 'WelsDecTest'. If you wish to change it, edit the first line of build.xml. Added file ./build.xml Added file ./proguard-project.txt /bin/sh: 1: ant: Permission denied make: *** [build/platform-android.mk:71: decdemo] Error 127

aenonGit commented 3 years ago

Maybe the user you are running the script with has not the right permission? Try with root