New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build fail for android on linux #3107
Comments
My PATH = /home/cheolhwi/Android/android-ndk-r18b:/home/cheolhwi/Android/Sdk/tools:/home/cheolhwi/Android/Sdk/platform-tools:/home/cheolhwi/android-studio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin |
I just encountered almost the same problem, when I run: "make OS=android NDKROOT=/Users/allen/android-ndk-r18b TARGET=android-24 ARCH=arm NDKLEVEL=24" ld: unknown option: --sysroot=/Users/allen/android-ndk-r18b/platforms/android-24/arch-arm my system is MacOS |
after NDK 17, android-ndk use clang as the default compiler and GCC is no longer supported. you can add this "NDK_TOOLCHAIN_VERSION=clang" to your command line for compiling openh264. @sunjin1233 please try this: @Allen1207 please try this: Please let me know if you have any questions. |
hi @GuangweiWang , Thank you for your reply, but I got the same error as before when I add "NDK_TOOLCHAIN_VERSION=clang" to my command line. |
@Allen1207 |
@GuangweiWang , yes, I did add the clean, but the results still the same. /Users/allen/android-ndk-r17c/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: cannot open crtbegin_so.o: No such file or directory |
@Allen1207 could you please provide your local environment:
thanks. |
by the way, I changed some .mk files according to |
@Allen1207 |
@Allen1207 |
hi @GuangweiWang , Yes, the commit (45d784d) can solve the "--sysroot " issue, but it still has the same problem as follows: /Users/allen/android-ndk-r18b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_so.o: No such file or directory |
@GuangweiWang Thank you. I have another error(The "android" command is deprecated) however openh264 have been built successfully. #2994 |
@sunjin1233 |
@Allen1207
Please let me know if you still have any issues. |
@GuangweiWang , |
I am not able to build openh264 library for android .. please have a look at my issue ....#3318 |
I want to use openh264 with ffmpeg for android app. I tried to build openh264 for android by below command.
make OS=android NDKROOT=~/Android/android-ndk-r18b TARGET=android-28 NDKLEVEL=28
but I failed with this error message.
ysroot=/home/cheolhwi/Android/android-ndk-r18b/platforms/android-28/arch-arm -Wl,--no-undefined -Wl,-z,relro -Wl,-z,now -Wl,-soname,libopenh264.so
/usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om i386pep i386pe
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:240: recipe for target 'libopenh264.so' failed
make: *** [libopenh264.so] Error 1
I think that it failed by usage of wrong ld(/usr/bin/ld). Is it right? Please help me if someone has any idea.
The text was updated successfully, but these errors were encountered: