wang-bin / QtAV

A cross-platform multimedia framework based on Qt and FFmpeg. 基于Qt和FFmpeg的跨平台高性能音视频播放框架. Recommand to use new sdk https://github.com/wang-bin/mdk-sdk
http://qtav.org
3.96k stars 1.5k forks source link

compile with android ndk r16 #1039

Open manang opened 6 years ago

manang commented 6 years ago

QtAV, Qt version and platform

QtAV version: 1.12 Qt version: 5.7

Hi, I'm trying to compile QtAV with android ndk r16. gcc is deprecated after ndk r13, I want to know if it is possible to compile with android r16 with clang. with gcc is the same. I have this error now: MANANGEL-M-L1FA:QtAV angelomantellini$ ~/cicn_bitbucket/android-sdk_build/qt/Qt/5.7/android_armv7/bin/qmake -r -spec android-g++ QtAV.pro Project MESSAGE: BUILD_DIR=/Users/angelomantellini/cicn_bitbucket/android-sdk_build/qt/QtAV Project MESSAGE: MAKEFILE_GENERATOR=UNIX Project MESSAGE: To disable config tests, you can use 1 of the following methods Project MESSAGE: 1. create '.qmake.conf' in the root source dir, add 'CONFIG += no_config_tests'(Qt5) Project MESSAGE: 2. pass 'CONFIG += no_config_tests' or '-config no_config_tests' to qmake Project MESSAGE: 3. add 'CONFIG += no_config_tests' in /Users/angelomantellini/cicn_bitbucket/android-sdk_build/qt/QtAV/user.conf Project MESSAGE: To manually set a config test result to true, disable config tests and enable config_name like above Checking for avutil... no Project ERROR: avutil is required, but compiler can not find it

in conf.log I have `In file included from /Users/angelomantellini/ios-sdk/usr/include/libavutil/avutil.h:296:0, from main.cpp:21: /Users/angelomantellini/ios-sdk/usr/include/libavutil/common.h:33:19: fatal error: errno.h: No such file or directory

include

               ^`

I think that the error is about the different sysroot folder. Do you know how Can I compile qtav with this new ndk? Thanks Angelo

wang-bin commented 6 years ago

maybe qt5.7 does not support unified sysroot in the latest ndk

manang commented 6 years ago

And at 5.8 or above? Thanks

Il 27 Gen 2018 11:40, "WangBin" notifications@github.com ha scritto:

maybe qt5.7 does not support unified sysroot in the latest ndk

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wang-bin/QtAV/issues/1039#issuecomment-360976178, or mute the thread https://github.com/notifications/unsubscribe-auth/AFpk61yWUssbh3-HDblCWF5pjEQACQvCks5tOv0ogaJpZM4RuSSm .

manang commented 6 years ago

I'm trying to compile with android-23, ndkr15b and I have this problem: /Users/angelomantellini/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: conditional branch to PLT in THUMB-2 not supported yet. /Users/angelomantellini/Qt/5.10.0/android_armv7/lib/libswresample.a(audio_convert_neon.o):function swri_oldapi_conv_fltp_to_s16_nch_neon: error: unexpected opcode while processing relocation R_ARM_THM_JUMP19 /Users/angelomantellini/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: conditional branch to PLT in THUMB-2 not supported yet. /Users/angelomantellini/Qt/5.10.0/android_armv7/lib/libavresample.a(audio_convert_neon.o):function ff_conv_fltp_to_s16_neon: error: unexpected opcode while processing relocation R_ARM_THM_JUMP19 collect2: error: ld returned 1 exit status

I compiled ffmpeg with your script (avbuld.sh), the version of ffmpeg is 3.3. I found this thread about r16: https://github.com/android-ndk/ndk/issues/337 I don't know if I can modify the configuration inside ffmpeg to solve this issue. Thank you for your help Angelo

wang-bin commented 6 years ago

linking to ffmpeg shared libs always works