-
Notifications
You must be signed in to change notification settings - Fork 260
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
atof linker error with armeabi #315
Comments
I'm not able to reproduce this. Here's what I tried: https://gist.github.com/DanAlbert/edae02a0f432e186f60c2b9f852ae303 $ android-ndk-r14/ndk-build -B
[armeabi] Compile++ thumb: foo <= foo.cpp
[armeabi] StaticLibrary : libstdc++.a
[armeabi] Executable : foo
[armeabi] Install : foo => libs/armeabi/foo
$ android-ndk-r14/ndk-build -B APP_UNIFIED_HEADERS=true
[armeabi] Compile++ thumb: foo <= foo.cpp
[armeabi] StaticLibrary : libstdc++.a
[armeabi] Executable : foo
[armeabi] Install : foo => libs/armeabi/foo
$ android-ndk-r14/ndk-build -B APP_STL=c++_static
[armeabi] Compile++ thumb: foo <= foo.cpp
[armeabi] Executable : foo
[armeabi] Install : foo => libs/armeabi/foo
$ android-ndk-r14/ndk-build -B APP_UNIFIED_HEADERS=true APP_STL=gnustl_static
[armeabi] Compile++ thumb: foo <= foo.cpp
[armeabi] Executable : foo
[armeabi] Install : foo => libs/armeabi/foo
$ android-ndk-r14/ndk-build -B APP_STL=c++_static
[armeabi] Compile++ thumb: foo <= foo.cpp
[armeabi] Executable : foo
[armeabi] Install : foo => libs/armeabi/foo
$ android-ndk-r14/ndk-build -B APP_UNIFIED_HEADERS=true APP_STL=gnustl_static
[armeabi] Compile++ thumb: foo <= foo.cpp
[armeabi] Executable : foo
[armeabi] Install : foo => libs/armeabi/foo Based on the stackoverflow post, I do have another theory. Is the ffmpeg build perhaps building some other library against a higher platform level and then linking that into the thing you're building against android-16? This might be a case of the first bullet point under https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md#Using-Mismatched-Prebuilt-Libraries
|
Ping? I'd like to get a fix for this into r14b, but I can't do that without a repro case. |
@DanAlbert Sorry for the delay...I'm seeing if I can reproduce locally and getting a test app set up with non-sensitive information that's the shortest path to reproduce...I'll hopefully have something before tomorrow morning for you. |
@DanAlbert I've tried FFMPEG v3.2.4 built against both SDK and 24 and SDK 16...what I have boiled it down to is have a c file I have in jni/h264 that reproduces the issue:
and ffmpeg in /jni/h264/ffmpeg/build/. I did not see the issue until I called av_register_all(). Before then I could build as normal. Even when I did:
It's a really bizarre issue.
What other details would you need? I've done the appropriate build clean steps as well (never can be too safe lol) |
Are you building a pure upstream ffmpeg? Last time I looked they didn't have Android.mk files in the project so I'd need to know how you're building this. If you can, the easiest thing would be for you to upload a test case, but I understand if you can't if the source is confidential. |
How did you build your ffmpeg libraries? Maybe they were compiled for SDK 21, which does have atof() in libc. Now when you link your C file with these libraries, you need atof! But you build it with SDK 16, where atof was defined Make sure that your ffmpeg libraries are built against NDK headers of SDK 16. |
closing for lack of needed info. |
Alex's guess sounds pretty likely to me anyway, and that's the expected behavior until we get the compatlib in place. |
Description
atof linker error with armeabi.
I noticed while using 3.2.4 version of FFMPEG that atof has an undefined reference. As a work around I branched FFMPEG and changed atof to strtod(pointer, NULL).
Same details should be found here:
http://stackoverflow.com/questions/42601696/ffmpeg-with-android-sdks-16-25-and-ndk-14-atof-error
Environment Details
The text was updated successfully, but these errors were encountered: