Building ogre for android ndk10 - android

Sorry I may added it as another topic but I get a different error. Now I have the dependencies installed from the repository. I'm trying to build for Android.
I use Mingw32
now I get the following error:
[armeabi-v7a] SharedLibrary : libOgreSampleBrowser.so
C:/ogre/AndroidDependencies/lib/armeabi-v7a/libFreeImage.a(libraw_datastream.c
.o):libraw_datastream.cpp:function LibRaw_bigfile_datastream::get_char(): erro
undefined reference to '__srget'
collect2.exe: error: ld returned 1 exit status
make.exe[3]: *** [obj/local/armeabi-v7a/libOgreSampleBrowser.so] Error 1
Samples\Browser\CMakeFiles\SampleBrowserDummy.dir\build.make:84: recipe for ta
et 'lib/libSampleBrowserDummy.so' failed
mingw32-make[2]: *** [lib/libSampleBrowserDummy.so] Error 2
CMakeFiles\Makefile2:3749: recipe for target 'Samples/Browser/CMakeFiles/Sampl
rowserDummy.dir/all' failed
mingw32-make[1]: *** [Samples/Browser/CMakeFiles/SampleBrowserDummy.dir/all] E
or 2
Makefile:136: recipe for target 'all' failed

I encountered the same error...
Google removed __srget starting from NDKr10c (check their official site in other fixed bugs).
Download r10b and below and it should work.

Related

Android: Error building Pjsip v2.9 Sample Application

I have successfully till TARGET_ABI https://trac.pjsip.org/repos/wiki/Getting-Started/Android.
When I tried to build sample Application, I am having following errors.
/Android/android_ndk/android-ndk-r17c-linux-x86_64/android-ndk-r17c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lpj-aarch64-unknown-linux-android
/Android/android_ndk/android-ndk-r17c-linux-x86_64/android-ndk-r17c/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lpj-aarch64-unknown-linux-android
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:165: recipe for target 'android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so' failed
make[1]: ** [android/app/src/main/jniLibs/arm64-v8a/libpjsua2.so] Error 1
make[1]: Leaving directory '/Documents/PjsipSample/pjproject-2.9/pjsip-apps/src/swig/java'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 1
I am not able to build *.so files.
Swig Version : 3.0.12
Ndk: r13
Ubuntu: 18.04
Can anyone help me with this?

Error while compiling android source code android-6.0.1_r7

Hello I have latest ubuntu 16.0.4,I am following this tutorial for compiling android source code source code for android but I am getting this error
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj32/lib/libart.so' failed
make: *** [out/host/linux-x86/obj32/lib/libart.so] Error 1
I refered this link but not luck
I have attached the screenshot where I am getting stuck

AndroidGuiExample failed compiling

I'm trying to get acquainted with openFrameworks and Android application. I installed both Android SDK and NDK (r10e) and I tried to compile the AndroidGuiExample.
Unfortunately, this is what the terminal returned at the end:
undefined reference to 'std::__throw_out_of_range_fmt(char const*, ...)'
collect2: error: ld returned 1 exit status
make[2]: *** [libs/armeabi-v7a/libOFAndroidApp.so] Error 1
make[1]: *** [Debug] Error 2
make: *** [AndroidDebug] Error 2
I have not sincerely a clear idea of what happened.
Anyone could help me in understanding the error and finding a solution?
Thanks everyone!
Have you configured NDK ?
With a text editor, edit the file
libs/openFrameworksCompiled/project/android/paths.make
and set the NDK path to the correct folder:
NDK_ROOT=/path/to/the/ndk
So it looks like this
NDK_ROOT=/Developer/android-ndk-r10e
happy coding ! :)

Android cmake cannot find -lpthread

I'm trying to compile a shared library using cmake. I followed the instruction on this tutorial to change the toolchain for android NDK.
However, I'm getting the following output error:
/home/usr/android-toolchain/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lpthread
collect2: error: ld returned 1 exit status
make[2]: *** [../libs/armeabi-v7a/libutils.so] Error 1
make[1]: *** [src/CMakeFiles/utils.dir/all] Error 2
make: *** [all] Error 2
A bit of googling around and I stumble upon this stackoverflow post. So I modified my CMakeLists.txt to add:
set(CMAKE_CXX_FLAGS"-DHAVE_PTHREADS")
but it seems like it still doesn't work. Am I going about this the wrong way?
Thanks!

arm-linux-androideabi/bin/ld: fatal error: -soname: must take a non-empty argument

I am cross compiling gdcm with cmake android it goes till end of compilation but at last I get following error. how do you guys set -soname in cmake-gui or cmake while compiling libraries so that we can avoid below kind of error.
/opt/android/android-ndk-r10c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux- androideabi/bin/ld: fatal error: -soname: must take a non-empty argument
collect2: error: ld returned 1 exit status
make[2]: *** [/home/likewise-open/SLKTECHLABS/kirtan.patel/Desktop/GDCM/GDCMSource/libs/armeabi-v7a/libgdcmjni.so] Error 1
make[1]: *** [Wrapping/Java/CMakeFiles/gdcmjni.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/kirtan.patel/Desktop/GDCM/GDCMSource/Source/MediaStorageAndFileFormat/gdcmImageWriter.h:36: Warning 822: Covariant return types not supported in Java. Proxy method will return gdcm::Pixmap const &.
/home/kirtan.patel/Desktop/GDCM/GDCMSource/Source/MediaStorageAndFileFormat/gdcmImageCodec.h:45: Warning 473: Returning a pointer or reference in a director method is not recommended.
As Romanski pointed out CMake versions 3.2 and 3.0 have different behaviour because of difference in UseSWIG.cmake files. In 3.2 NO_SONAME property enabled by default looks like it raises conflict in android build producing invalid linking option -Wl,-soname, with empty TARGET_SONAME.
There are two ways to fix build with 3.2 version
string(REPLACE "<CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG><TARGET_SONAME>" "" CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}") eliminates broken linking option at all
set_target_properties(${MY_TARGET} PROPERTIES NO_SONAME OFF) fix broken linking option with correct so-name.

Categories

Resources