Android NDK Cross Compile FFmpeg, dlopen failed: cannot locate symbol - android

Android NDK-r20 cross compile FFmpeg4.2 success, but my app crash with
UnsatisfiedLinkError: dlopen failed: cannot locate symbol
__aeabi_idiv
This is the ffmpeg4.2 source code with my "build_android.sh"
ffmpeg-android-build
config the NDK r20 root path in "build_android.sh"
$ cd ffmpeg-android-build
$ ./build_android.sh
$ make -j 4
$ make install
This is my android project to test the ffmpeg
ffmpeg-android-test
Seemed the solution,don't know how to do in my situation
#cannot-locate-symbols
Excepted
NDK-r20 and FFmpeg-4.2 is needed (cant change the version)
My android test project run

Now,problem seems to have been solved.
Old build_android.sh
New build_android.sh

Related

The C compiler "clang.exe" is not able to compile a simple test program

I am trying to compile shell script that compiles the C project library, but i am stuck at this when it comes to compile the nmake part.
I am using NDK 21 and cmake version is 3.10
I am using shell script using bash same as defined here, i want to compress this library as they showing in the docs running ./android.sh
Please check the link: https://github.com/tanersener/mobile-ffmpeg#52-build-scripts
here is the attached log:
DEBUG: Downloading library source: cpu-features
DEBUG: Checking if cpu-features is already downloaded at /d/Bilals/Projects/GithubProjects/mobile-ffmpeg/src/cpu-features
INFO: cpu-features library already downloaded
INFO: cpu-features already downloaded. Source folder found at /d/Bilals/Projects/GithubProjects/mobile-ffmpeg/src/cpu-features
-- Building for: NMake Makefiles
-- Check for working C compiler: D:/Bilals/PcBackupData/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
CMake Error: Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_adf3f\fast"
-- Check for working C compiler: D:/Bilals/PcBackupData/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
CMake Error at D:/Bilals/PcBackupData/sdk/cmake/3.10.2.4988404/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"D:/Bilals/PcBackupData/sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/Bilals/Projects/GithubProjects/mobile-ffmpeg/android/build/cpu-features/arm/CMakeFiles/CMakeTmp
Run Build Command:"nmake" "/NOLOGO" "cmTC_adf3f\fast"
The system cannot find the file specified
Generator: execution of make failed. Make command was: "nmake" "/NOLOGO" "cmTC_adf3f\fast"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)
-- Configuring incomplete, errors occurred!
See also "D:/Bilals/Projects/GithubProjects/mobile-ffmpeg/android/build/cpu-features/arm/CMakeFiles/CMakeOutput.log".
See also "D:/Bilals/Projects/GithubProjects/mobile-ffmpeg/android/build/cpu-features/arm/CMakeFiles/CMakeError.log".
and here is my environmental variables
You should use Linux Make, not NMake. Generally speaking, these scripts were never tuned to run on Windows, in cygwin or mingw shell, even though I have run them in WSL (Ubuntu) bash.

Cocos2d-x 3.13.1: error with cocos run (Android)

:-)
I moved to Cocos2d-x 3.13.1 from a couple of days (I moved from 3.12).
My game works great when compiled for Linux.
When however I try to execute my game on my Android device I get this:
drk#drk-pc ~/cocos2d-projects/SpaceRush $ cocos run -p android --android-studio
Building mode: debug
Using Android Studio project : /home/drk/cocos2d-projects/SpaceRush/proj.android-studio
running: '/home/drk/Android/Sdk/tools/android update project -t android-19 -p /home/drk/cocos2d-projects/SpaceRush/proj.android-studio/app'
Updated project.properties
Updated local.properties
Updated file /home/drk/cocos2d-projects/SpaceRush/proj.android-studio/app/proguard-project.txt
Building native...
NDK build mode: debug
running: '/home/drk/Android/android-ndk-r12b/ndk-build -C /home/drk/cocos2d-projects/SpaceRush/proj.android-studio/app -j12 NDK_MODULE_PATH=/home/drk/cocos2d-projects/SpaceRush/proj.android-studio/../cocos2d:/home/drk/cocos2d-projects/SpaceRush/proj.android-studio/../cocos2d/cocos:/home/drk/cocos2d-projects/SpaceRush/proj.android-studio/../cocos2d/external NDK_TOOLCHAIN_VERSION=4.9 NDK_DEBUG=1'
make: ingresso nella directory "/home/drk/cocos2d-projects/SpaceRush/proj.android-studio/app"
/home/drk/Android/android-ndk-r12b/build/core/build-module.mk:34: *** missing separator. Arresto.
make: uscita dalla directory "/home/drk/cocos2d-projects/SpaceRush/proj.android-studio/app"
Error running command, return code: 2.
I don't know how to solve this problem, I'm not an Android build expert!
I tried to compile both with NDK 11c and 12b.
Thanks for your help
Try a different NDK, possible 10e.

`gomobile build` and `gomobile install` throws "gomobile: EOF"

I'm trying to build an android application using gomobile but the commands gomobile install and gomobile build fail with gomobile: EOF . Before this error I was getting this error:
# golang.org/x/mobile/gl
In file included from /root/go/src/golang.org/x/mobile/gl/gl.go:17:0:
work.h:6:23: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated. but it was fixed with yum install make gcc mesa-libGLES-devel mesa-libEGL-devel.
The application is mostly a networking application. Here are the imports. Do only certain packages work with gomobile or all of them?
"golang.org/x/mobile/app"
"golang.org/x/net/websocket"
"os/exec"
"flag"
"fmt"
log "github.com/golang/glog"
"io/ioutil"
"net"
"net/http"
"net/url"
"strconv"
OS: Fedora 22.
More info: I'm able to build https://github.com/golang/mobile/blob/master/example/network/main.go so I can only assume the issue is specific to my application.
It failed because AndroidManifest.xml was empty.

Linphone Compile on Windows 8

I am building Linphone application for android. I am working in Windows 8 64-Bit OS
I Followed the steps given in README file:
Download the Android ndk (>=r5c) from google.
Install the autotools: autoconf, automake, aclocal, libtoolize pkgconfig
Run the ./prepare_sources.sh script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project.
$ ./prepare_sources.sh
Finally from directory linphone-android, just execute command:
$ ${my google ndk directory}/ndk-build
then i get following error in Cygwin terminal:
$ ./prepare_sources.sh
./prepare_sources.sh: line 2: $'\r': command not found
./prepare_sources.sh: line 3: C:UsersNomsDesktoplinphone-android: command not found
./prepare_sources.sh: line 4: $'\r': command not found
./prepare_sources.sh: line 29: syntax error near unexpected token $'\r''
./prepare_sources.sh: line 29:cd $topdir/submodules/libilbc-rfc3951 && ./autog'n.sh && ./configure && make || ( echo "iLBC prepare stage failed" ; exit 1 )
Try to use mingw to compile it. I've built the library successfully. But not yet apk, cause some build error in myeclipse...

Android NDK arm-linux-androideabi-g++: error

I am trying to compile android-NDK project which uses L2CAP Bluetooth profile.When I compile in eclipse with android-ndk-r8d-windows and android-sdk-4.2 I am getting following error
arm-linux-androideabi-g++: error: libbluetooth.so: No such file or directory
make: *** [obj/local/armeabi/libl2cap_BTComm.so] Error 1
Please help me in solving this
I got the same problem in Ubuntu 12.04 while building the ndk project using ndk-build.
The problem is the missing g++ compiler. After install a GNU C++ compiler it works now.
Interestingly, when I recompile the whole project from fresh it got the same complain again.
(before I was using cygwin and ubuntu to compile the same project and it was working)
Its been over a year now since the last reply but I think the answer is to use the -l option of g++ to add the directory with the lib to g++'s search paths.

Categories

Resources