Conversation
Well, effectively I know this is happening because I set __ANDROID_SDK__=21 manually and it said nuh uh, __ANDROID_SDK__ is already 26
1
It should be fine if it's actually set to the same value that you end up having for minSdkVersion at runtime.
If it's 26 for the native code and 23 at runtime, it'll break. If you set minSdkVersion to 26 so it matched it wouldn't break, since it'd match what it's using to build.
1
Still must have a mismatch between build time __ANDROID_API__ and runtime minSdkVersion if you're getting the sendto error.
1
1
wait, what does "runtime minSdkVersion" mean exactly?
1
Like, do you mean "the minsdkversion at runtime" or "the minsdkversion of the runtime?"
1
Hey so, I really appreciate your help on this and I'm sorry about all these minor questions… I do have one more question.
Is _chk something that would appear on all functions, or only socket functions such as sendto?
2
Replying to
It's for all functions in libc handling buffers. There are fortified versions that are automatically used to add buffer overflow checks based on compile-time sizes. sendto is an issue because of this API mismatch because the code to fortify it was added for API 26.
1
Replying to
Okay, that's extremely interesting.
But this does still imply that if I could compile out the socket code, I'd sidestep this issue?
(I'm not sure I *can* get rid of it because maybe it uses sockets for IPC, but I legitimately don't want my audio subsystem talking to TCP/IP!)
1
Replying to
You should really just get __ANDROID_API__ actually set to 23 (if minSdkVersion is 23). It's not the only thing that's going to break. It's also possible the compiler/linker use stuff that's not available for lower API levels, etc. since higher API levels are a diff target.
Replying to
I think you had the right idea setting that CMake variable to API 23. I just think it's not really intended to build Java and that may not work properly? So probably set it to 23 and then deal with fixing how it builds Java.
2
Show replies
This just happens to be something that's very obviously broken because it can't find the symbol it built against at runtime since it was built for API 26 but is in an API 23 environment.

