Open irfan143rkl opened 1 year ago
I am having the same issue while trying to build the app with the library. As I checked all closed issues to find any lead to fix the issue, there are many issues raised by developers who are not able to compile the code after integrating the library. And shockingly the author closed those issues without even solving or commenting them.
Hi,
You can find the error saying path is not found, which means, this path is wrong ${CMAKE_HOME_DIRECTORY}/../../../../../Users/a1vszht2/Downloads/o-llvm-binary
Try changing to : ${CMAKE_HOME_DIRECTORY}/../../../../../o-llvm-binary
@neopraveen I am not sure if you did the due-diligence before making these statements. Most of the the build issues reported were related to windows ollvm for which the binary is not provided. This is stated clearly in the readme. Before closing I usually provide the comments. Sometimes its closed by the person who raised the issue without comments.
Hi @darvincisec I have set the correct path for OLLVM PATH, However i get the following error:
In file included from /Users/macUser/Documents/GitHub/WYLD-Native/android/app/src/main/c/native-lib.c:1:
/Users/macUser/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/jni.h:27:10: fatal error: 'stdarg.h' file not found
looks like the ndk doesn't have some header file, can you help me out here?
ndk version is 21.4.707
clang version 6.0
Thanks in advance.
Hi @DurgeshSawantWYLD, can you try with older ndk versions such as 20.4.x?
Build failed while generating obfuscated build.
Start - Comment this block for generating non-obfuscated builds
set(OLLVM_PATH "${CMAKE_HOME_DIRECTORY}/../../../../../Users/a1vszht2/Downloads/o-llvm-binary") set(OLLVM_C_COMPILER ${OLLVM_PATH}/clang) set(OLLVM_CXX_COMPILER ${OLLVM_PATH}/clang++)
set(OLLVM_C_FLAGS "-mllvm -sub -mllvm -bcf -mllvm -fla")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OLLVM_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OLLVM_C_FLAGS}") set(CMAKE_C_COMPILER ${OLLVM_C_COMPILER}) set(CMAKE_CXX_COMPILER ${OLLVM_CXX_COMPILER})
End - Comment this block for generating non-obfuscated builds
Build command failed. Error while executing process /Users/a1vszht2/Library/Android/sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /Users/a1vszht2/Downloads/DetectFrida-master/app/.cxx/cmake/debug/armeabi-v7a native-lib} ninja: Entering directory `/Users/a1vszht2/Downloads/DetectFrida-master/app/.cxx/cmake/debug/armeabi-v7a' [1/2] Building C object CMakeFiles/native-lib.dir/native-lib.c.o FAILED: CMakeFiles/native-lib.dir/native-lib.c.o /Users/a1vszht2/Downloads/DetectFrida-master/app/src/main/c/../../../../../Users/a1vszht2/Downloads/o-llvm-binary/clang --target=armv7-none-linux-androideabi19 --gcc-toolchain=/Users/a1vszht2/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/a1vszht2/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -D_32_BIT -Dnative_lib_EXPORTS -I/Users/a1vszht2/Downloads/DetectFrida-master/app/src/main/c/arch/armeabi-v7a -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -mllvm -sub -mllvm -bcf -mllvm -fla -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/native-lib.c.o -MF CMakeFiles/native-lib.dir/native-lib.c.o.d -o CMakeFiles/native-lib.dir/native-lib.c.o -c /Users/a1vszht2/Downloads/DetectFrida-master/app/src/main/c/native-lib.c /bin/sh: /Users/a1vszht2/Downloads/DetectFrida-master/app/src/main/c/../../../../../Users/a1vszht2/Downloads/o-llvm-binary/clang: No such file or directory ninja: build stopped: subcommand failed.