-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil in Marshmallow #245
Comments
+1 I have the same problem. |
Did they break backward compatibility? Is there any info on that from Google? |
@saudet My android studio version is 1.4, compileSdkVersion 23, buildToolsVersion 23.0.0 |
@saudet Similar problem find here:https://code.google.com/p/android-developer-preview/issues/detail?id=3028 , it seems no solution. |
+1 I have the same problem here. :( |
@tomerhatav @saudet @phajduk I find a official page maybe useful https://developer.android.com/intl/ko/about/versions/marshmallow/android-6.0-changes.html#behavior-runtime |
As boybeak wrote, official release page explicitly refers to loading of shared libraries with text relocations:
|
@zavadpe If you know what we need to do for that, please update the instructions on this wiki page: https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments |
I did only simple workaround for now as suggested in the text I quoted - I decreased target SDK to 22 in my project. |
What version of ffmpeg is being used in the binary distro of javacv? According to |
Actually not since 2.6. Seems like it's only in unreleased master. Pulling latest Ffmpeg master and compiling with ndk-r10e in checking avcodec.so. Looks like it'll be with 2.9 when they gm that release. Having linker issues now with the jni when I just swap out the .so files (expected). I guess I have to build javacv, javacpp and ffmpeg from scratch. |
Haha I'm just going to keep spamming here, apologies. Looks like has been in since 2.6. Verified building with r10e and 2.8 release HEAD I get no text relocations in avcodec. Same linker issue with the jni. Will try to rebuild all the deps, though you should consider pulling latest ffmpeg if you haven't and building the android libs before everyone who uses javacv in android comes calling. |
JavaCV 1.1 links with FFmpeg 2.8.1, and that doesn't work? What is the difference between your binaries and the release? |
So our configure is likely a little different, not sure if that would do it. Combining my ffmpeg .so files with the rest in the JavaCV 1.1 distro yields
Running arm-linux-androideabi-readelf interestingly shows no text relocations for my binaries but they are present for yours. Maybe theres an encoder enabled that causes that? I'm kinda feeling around in the dark right now as I'm not too experienced with native builds. We've had a working build for 2 years that we've remained as hands off as possible with since it just worked.
|
Google already closed this issue: |
It seems to be a problem with one of the dependent libraries. So, FFmpeg rebuilt without any of them shouldn't cause this issue. |
I don't have knowledge how to build new binary. "It should be emphasized that --disable-asm does not fix anything, it just creates horribly slow FFmpeg binaries." |
As stated here (in russian) some libraries were excluded from Marshmallow. For example, OpenSSL was replaced with BoringSSL. May this cause crash? FFmpeg can work with SSL, so... Another version is stated here @ryango |
@ryango |
@ongakuer well done! |
I try to built ffmpeg 2.8.1( custom cppbuild ) with javacpp (1.2-SNAPSHOT) and still worked in Marshmallow. It's seems weird… javacpp 1.1, javacpp-presets 1.1, FFmpeg 2.8.1, Ubuntu 14.04 javacpp 1.2-SNAPSHOT, javacpp-presets 1.2-SNAPSHOT, FFmpeg 2.8.1/2.8.4/2.8.5, OS X 10.11.3 |
@ongakuer Maybe it has something to do with the changes I've made for issue bytedeco/javacpp-presets#133? |
@saudet Maybe you are right,Thanks. |
@saudet will you release anytime soon a new version of javacv that fixes the text relocations bug? |
@tomerhatav Well, if you could make a branch that works with JavaCPP 1.1, I'd release that right away, sure. |
Hi, Process: javacv.bytedeco.org.recordactivirycv, PID: 571 |
@fuyacho-takatsuji PS: I move .so files to armeabi-v7a |
@ongakuer , I am new to git hub as well... |
@fuyacho-takatsuji
|
@ongakuer Were you using android-ndk-r10e to build ffmpeg? Can you, please, show how your .sh file looks like? |
@coralinejones1985 @saudet
|
@ongakuer |
Thanks @ongakuer! I've narrowed it down to libx264. If I build without specifying |
Yes, it's fixed with FFmpeg 3.0 and latest libx264! |
I've built 1.2-SNAPSHOT (javacv, javacpp, ffmpeg and opencv jars) to get "no relocations"-version, but still got ones. Also some errors appeared: I have no idea of what am I doing wrong.. |
But it wasn't fixed for android-x86. I had to disable asm code for libopenh264 and libx264 to get binaries without text relocations. |
I've uploaded SNAPSHOT binaries here: |
I tried with those binaries and know crash with this error: A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 16167 Only a line no more log. Native libc tries to access invalid address |
more log for my error:
|
@pedroSG94 It looks like you're hitting bug #133. Please follow the workaround, or if you don't like it, please report the problem upstream to Google. If you don't complain, they will not listen. |
Yes, version 1.2 has been released. Please use that version: |
And thanks to you all for helping me debug this!! |
@pedroSG94 : I hit the same sigsegv stack as you. To fix it, besides upgrading to 1.2, I also needed to use 1.2.1 for the version of the javacpp artifact (even though all of the other artifacts are currently at 1.2. So in my build.sbt:
|
In gradle simply put this lines
|
@praveen-kanwar Thank you so much. |
crash happened in this code after i update my nexus5 to Marshmallow,and it works fine before.And the error log below:
The text was updated successfully, but these errors were encountered: