在mac(NDK)中构建电报源时出错

时间:2017-11-20 13:43:35

标签: android macos android-ndk telegram ndk-build

我正在尝试在OS X El Capitan中构建电报源,但我看到了这个错误。

我尝试安装NDK,CMake,LLDB。

我在Android studio 2,android studio 3中尝试过。

我尝试在~/.bash_profile中添加这些内容:

export ANDROID_SDK=/Users/aaa/Library/Android/sdk
export ANDROID_NDK=/Users/aaa/Library/Android/sdk/ndk-bundle
export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK"

但是,我在尝试其他NDK项目时遇到了同样的错误,但仍然有错误。

我尝试上传完整的登录pastebin.com,...但我不能总大小约为7mb。我上传到我的服务器,链接是:https://static.sajadabasi.ir/ask.txt

错误(它太长了所以我发布了一些包含error的部分我希望它有用。):

    External Native Build Issues
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/foss/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/foss/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/foss/lib/x86/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/foss/lib/x86/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/foss/lib/x86/gdb.setup
    mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/foss/obj/local/x86/objs/tmessages.27/./opus/src
     Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/foss/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/foss/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/foss/lib/armeabi-v7a/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/foss/lib/armeabi-v7a/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/foss/lib/armeabi-v7a/gdb.setup
    mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/foss/obj/local/armeabi-v7a/objs/tmessages.27/./opus/src
     echo [armeabi-v7a] "Compile arm    ": "tmessages.27 <= IntroRenderer.c"
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/debug/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/debug/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/debug/lib/x86/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/debug/lib/x86/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/debug/lib/x86/gdb.setup
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/release/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/release/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/release/lib/x86/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/release/lib/x86/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/fat/release/lib/x86/gdb.setup
    echo [x86] "Compile++      ": "tmessages.27 <= NativeLoader.cpp"
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-23 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/debug/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/debug/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/debug/lib/armeabi-v7a/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/debug/lib/armeabi-v7a/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/debug/lib/armeabi-v7a/gdb.setup
    mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/debug/lib/armeabi-v7a
      echo [armeabi-v7a] "Compile++ arm  ": "tmessages.27 <= NativeLoader.cpp"
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-23 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/foss/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/foss/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/foss/lib/armeabi-v7a/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/foss/lib/armeabi-v7a/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/foss/lib/armeabi-v7a/gdb.setup
    mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7_SDK23/foss/obj/local/armeabi-v7a/objs/tmessages.27/./opus/src
       echo [armeabi-v7a] "Compile arm    ": "tmessages.27 <= mlp_data.c"
     Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-23 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/lib/x86/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/lib/x86/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/lib/x86/gdb.setup
  echo [x86] "Compile++      ": "tmessages.27 <= rotate_gcc.cc"
    lt/darwin-x86_64/bin/i686-linux-android-g++ -MMD -MP -MF /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/obj/local/x86/objs/tmessages.27/./libyuv/source/rotate_gcc.o.d -ffunction-sections -funwind-tables -no-canonical-prefixes  -g -fstack-protector-strong -fno-exceptions -fno-rtti -O2 -DNDEBUG  -I./jni/opus/include -I./jni/opus/silk -I./jni/opus/silk/fixed -I./jni/opus/celt -I./jni/opus/ -I./jni/opus/opusfile -I./jni/libyuv/include -I./jni/boringssl/include -I./jni/breakpad/common/android/include -I./jni/breakpad -I./jni/ffmpeg/include -I./jni/intro -I/Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -I/Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include -I/Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -I/Users/aaa/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures -I/Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include -I/Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/x86/include -I/Users/aaa/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/backward -I/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni     -DANDROID -w -std=c11 -Os -DNULL=0 -DSOCKLEN_T=socklen_t -DLOCALE_NOT_USED -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -fno-math-errno -DANDROID_NDK -DDISABLE_IMPORTGL -fno-strict-aliasing -fprefetch-loop-arrays -DAVOID_TABLES -DANDROID_TILE_BASED_DECODE -DANDROID_ARMV6_IDCT -ffast-math -D__STDC_CONSTANT_MACROS -Dx86fix -D__ANDROID_API__=14 -Wa,--noexecstack -Wformat -Werror=format-security -mstackrealign -mstack-protector-guard=global -DBSD=1 -ffast-math -Os -funroll-loops -std=c++11 -Dx86fix -frtti -fexceptions  --sysroot /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot -isystem /Users/aaa/Library/Android/sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -c  /Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/./libyuv/source/rotate_gcc.cc -o /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/obj/local/x86/objs/tmessages.27/./libyuv/source/rotate_gcc.o
      mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/foss/obj/local/x86/objs/tmessages.27/.
    echo [x86] "Compile++      ": "tmessages.27 <= NativeLoader.cpp"
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/release/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/release/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/release/lib/x86/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/release/lib/x86/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/release/lib/x86/gdb.setup
    mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/release/obj/local/x86/objs/tmessages.27/./opus/src
    echo [x86] "Compile        ": "tmessages.27 <= opus.c"
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/lib/armeabi-v7a/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/lib/armeabi-v7a/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/lib/armeabi-v7a/gdb.setup
    mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/armv7/release/obj/local/armeabi-v7a/objs/tmessages.27/./opus/src
    echo [armeabi-v7a] "Compile++ arm  ": "tmessages.27 <= NativeLoader.cpp"
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/foss/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/foss/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/foss/lib/x86/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/foss/lib/x86/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/foss/lib/x86/gdb.setup
    mkdir -p /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86/foss/obj/local/x86/objs/tmessages.27/./opus/src
   echo [x86] "Compile++      ": "tmessages.27 <= NativeLoader.cpp"
    Build command failed.
    Error while executing process /Users/aaa/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Android.mk NDK_APPLICATION_MK=/Users/aaa/Downloads/Telegram-master/TMessagesProj/jni/Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-23 NDK_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/debug/obj NDK_LIBS_OUT=/Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/debug/lib NDK_APPLICATION_MK:=jni/Application.mk APP_PLATFORM:=android-14 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/debug/lib/x86/*
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/debug/lib/x86/gdbserver
    rm -f /Users/aaa/Downloads/Telegram-master/TMessagesProj/build/intermediates/ndkBuild/x86_SDK23/debug/lib/x86/gdb.setup

2 个答案:

答案 0 :(得分:4)

我通过这些命令下载代码并解决了错误。

git clone git@github.com:DrKLO/Telegram.git
git submodule update --init --recursive

答案 1 :(得分:0)

在执行此行之后,只需克隆存储库:

git submodule update --init --recursive