mac (NDK) 中的构建电报源错误

Error in build telegram source in mac (NDK)

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

我尝试安装 NDK、CMake、LLDB。

我在 Android 工作室 2、android 工作室 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。我上传到我的服务器,link 是:https://static.sajadabasi.ir/ask.txt

错误(太长所以我post一些包含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

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

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

执行此行后克隆存储库:

git submodule update --init --recursive