Strange openssl build error in android ndk - android-ndk

I am facing some build error for OpenSSL in android ndk. The error is
make: *** No rule to make target `/home/computer/openssl-android-master/crypto/cryptlib.c', needed by `obj/local/armeabi/objs/crypto/cryptlib.o'. Stop.
I don't know where it is targeted.

This is to clarify the users about android ndk r8e- that android ndk r8e sometimes does not clean the previously build files, so one should check and delete the binary files.

Related

ExoPlayer ffmpeg failed to Build library

I recently tried add extensions in ExoPlayer like ffmpeg extension to support more audio formats in my app, i followed the extension-ffmpeg Readme.md and i successfully created the library for arm64-v8a, armeabi-v7a, x86 and x86_64 and inside of these folders are libavcodec.so, libavutil.so and libswresample.so, After successfully creating the library i need to build the aar to include it in my app but when i run
cd "${FFMPEG_EXT_PATH}" && \
${NDK_PATH}/ndk-build APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" -j4
i get this error
Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-16. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk
/home/oni/Android/Sdk/ndk/20.0.5594570/build/core/add-application.mk:88: *** Android NDK: Aborting... . Stop.
I'm a newbie to this and i have tried to see some examples of Android.mk for exoplayer ffmpeg extensions but i did no find anything and i'm stuck in this part, i'm still searching for some examples that might help me to successful build the extension ffmpeg aar.

What is the missing of "version.lib" in process of building clang with clang-cl?

I successfully built standalone llvm on windows with clang-cl (clang 8.0 downloadable binary) against back-end msvc build tool 2017 with windows 10 sdk using cmake/ninja
After that when I was building standalone clang, it reported "version.lib" in linking phase of clang-rename.exe is missing.
LINK Pass 1: command "....
" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'version.lib'
The weird thing is that word version.lib was slabbed in place amoung various lib\clang?????.libs and the leading -LIBPATH:llvm\\.\lib
I tried looking for version.lib in both build folders of llvm and clang, and found none.
Am I supposed to have verson.lib in llvm\lib?
What am I missing here?

Can't run the prepare.py script on linphone-android project

I want to build linphone for android on android studio,
I follow the guide on https://github.com/BelledonneCommunications/linphone-android,
but on step 3, I keep getting exception:
CMake Error: CMake was unable to find a build program corresponding to
"Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need
to select a different build tool. CMake Error: CMAKE_C_COMPILER not
set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set,
after EnableLanguage
-- Configuring incomplete, errors occurred!
Did I miss any setting on cMake? I just wanna make it work on android studio.
Update my final solution:
Those make/build libraries all from Linux kernel, so I finally giving up to build linphone on Windows and it works like a charm on Linux.

How to create a .dll from Netbeans using Linux?

I'm working on a Linux machine (debian) 64bit and created a simple project involving JNI. The program is running fine on Linux with the created Java project and the compiled .so file. The goal now is to compile the C++ part of the project into a .dll instead of a .so to get it to run on Windows machines.
I read some forums and some articles like this one Article, but all of those articles were about compiling from console and also didn't involve the necessary JNI includes.
I also downloaded the cross-compiler from the given article and tried to get it to run in Netbeans. Therefore I set up another C/C++ Tool Collection in Netbeans and told it to use the x86_64-w64-mingw32-gcc compiler for both C and C++. But Netbeans is giving me some errors compiling the file, telling me the x86_64-w64-mingw32-gcc compiler could not be found which is quite random I think because I selected it from the file chooser. Did any of you do something like this already, building a .ddl from Netbeans running on Linux? If yes, how did you get it to work?
x86_64-w64-mingw32-gcc: not found
bproject/Makefile-Debug.mk:66: recipe for target 'build/Debug/GNU_1-Linux-x86/WrapperCpp.o' failed
make[2]: *** [build/Debug/GNU_1-Linux-x86/WrapperCpp.o] Error 127
make[2]: Leaving directory
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
#Edit: I'm a step further now: I installed the correct mingw32 tools: sudo apt-get install mingw32. The programm does now compile without errors using the i586-mingw32msvc-g++ compiler but it still results in a .so instead of a .dll. I guess it has something to do with the make command but I haven't found anything about that yet.

Input/output error using Android ndk-build

Using Android NDK R10E, I am trying to build a shared library for all supported ABI's and I am getting the following error for some but not all ABI's:
[armeabi] SharedLibrary : libMyLib.so /home/user/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
fatal error: /home/user/source/MyLib/obj/local/armeabi/libMyLib.so: Input/output error
The project successfully builds for arm64-v8a, mips and mips64 but fails with the above error for armeabi, armeabi-v7a, x86 and x86_64.
I have a static library project and another shared library project and they both build successfully for all 7 ABI's.
If I compare the contents of obj/local/ for an ABI that builds and one that does not, they both contain all the same files except for libMyLib.so.
The difference between those two sets of ABIs is that the failing ones link using ld.gold and the working ones use ld.bfd.
Two things to try:
Use the 4.9 toolchain. It hopefully has the bug fix.
If that doesn't work, you can add -fuse-ld=bfd to your ldflags to use bfd even on the architectures that default to gold.
Same issue happened to me in r15c.
The fix was to copy
android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin/ld.bfd over ld.
I had to copy it because I could not easily find a way to specify this flag to CMake to use it while detecting the compiler features.

Resources