forked from asLody/VirtualApp
-
Notifications
You must be signed in to change notification settings - Fork 128
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
it's unable to build using NDK 18.1.* #82
Comments
Not quite sure but maybe the code of VirtualApp is outdated. |
Should be fixed in 5b67a32 by defining a custom |
I got the same problem, and solved it by modifying all the abs() to labs(). My git diff file is as following:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After changing APP_STL := c++_static, the error information goes as follows: (please help me out, thanks) 1 warnings & 2 errors.
Build command failed.$rn_im$ '
Error while executing process /Users/lc/Library/Android/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Android.mk NDK_APPLICATION_MK=/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/build/intermediates/ndkBuild/debug/lib /Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libva++.so}
Android NDK: WARNING:/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/fb/Android.mk:fb: LOCAL_LDLIBS is always ignored for static libraries
[armeabi-v7a] Compile++ thumb: va++ <= SubstrateHook.cpp
/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Substrate/SubstrateHook.cpp:124:100: warning: '&&' within '||' [-Wlogical-op-parentheses]
return (ic[0] & 0xf800) == 0xf000 && ((ic[1] & 0xd000) == 0x9000 || (ic[1] & 0xd000) == 0x8000 && (ic[0] & 0x0380) != 0x0380);
~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Substrate/SubstrateHook.cpp:124:100: note: place parentheses around the '&&' expression to silence this warning
return (ic[0] & 0xf800) == 0xf000 && ((ic[1] & 0xd000) == 0x9000 || (ic[1] & 0xd000) == 0x8000 && (ic[0] & 0x0380) != 0x0380);
^
( )
/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Substrate/SubstrateHook.cpp:463:31: error: call to 'abs' is ambiguous
buffer[start+1] = T2$ldr_rt_$rn_im$(exts.rt, A$pc, T$Label(start+0, end-2));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Substrate/SubstrateHook.cpp:93:21: note: expanded from macro 'T2$ldr_rt_$rn_im$'
(((rt) << 12) | abs(im))
^~~
/Users/lc/Library/Android/sdk/ndk-bundle/sysroot/usr/include/stdlib.h:230:5: note: candidate function
int abs(int __x) attribute_const __INTRODUCED_IN(19);
^
/Users/lc/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Users/lc/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(x);}
^
/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Substrate/SubstrateHook.cpp:647:31: error: call to 'abs' is ambiguous
buffer[start+0] = A$ldr_rd$rn_im$(copy.rn, A$pc, (end-1 - (start+0)) * 4 - 8);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/src/main/jni/Substrate/SubstrateARM.hpp:49:76: note: expanded from macro 'A$ldr_rd
(0xe5100000 | ((im) < 0 ? 0 : 1 << 23) | ((rn) << 16) | ((rd) << 12) | abs(im))
^~~
/Users/lc/Library/Android/sdk/ndk-bundle/sysroot/usr/include/stdlib.h:230:5: note: candidate function
int abs(int __x) attribute_const __INTRODUCED_IN(19);
^
/Users/lc/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Users/lc/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
1 warning and 2 errors generated.
make: *** [/Users/lc/StudioProjects/VirtualHook/VirtualApp/lib/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/va++/Substrate/SubstrateHook.o] Error 1
The text was updated successfully, but these errors were encountered: