Skip to content
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

Help with Libjpeg-Turbo #1

Open
bazimogmbh opened this issue Jul 29, 2013 · 12 comments
Open

Help with Libjpeg-Turbo #1

bazimogmbh opened this issue Jul 29, 2013 · 12 comments

Comments

@bazimogmbh
Copy link

Your version of libjpeg-turbo works perfectly with the code, but when i try to grab the sources and jni-build it, i always get this error

Native method not found: org.libjpegturbo.turbojpeg.TJDecompressor.init:()

Would appreciate any help with compiling the sources correctly.

@minhkhanh
Copy link
Owner

What is version of libjpeg source ?
You can try https://git.linaro.org/gitweb?p=people/tomgall/libjpeg-turbo/libjpeg-turbo.git;a=summary (linaro-android branch)

@bazimogmbh
Copy link
Author

This is the one i am using git://git.linaro.org/people/tomgall/libjpeg-turbo/libjpeg-turbo.git -b linaro-android

Did you modify the makefile in any ways? I just downloaded the code, put it in jni folder of project and ndk-build it,
are there any other steps neccessary?

@minhkhanh
Copy link
Owner

You should ndk-build by command-line,
Next step: copy build output (so file in armeab/... dir) to libs folder in your project

@bazimogmbh
Copy link
Author

Did it , it already copies the stuff in libs folder , still does not work .
Mind adding me to skype or gtalk and help me out? My skype id is abhishek9851 , I would be ready to pay for your help . Thank in advance :)

@minhkhanh
Copy link
Owner

Has you rename it? Output of original source is "libjpeg.so". But in java source is "turbojpeg" (TJLoader.java) rename to jpeg.

PS: I was re-checkout source and rebuild. And i get this error too.
I code this project long time ago. Now i don't remember what i do :(
I remember i was change Anroid.mk file, you can focus it.

@bazimogmbh
Copy link
Author

I did rename it, the lib gets loaded, but the error is there. Any chance you have your old project somewhere? or the make file?

@minhkhanh
Copy link
Owner

Unfortunately I was reinstall my pc and lost it

@minhkhanh
Copy link
Owner

sorry for late!
solution to the problem:
turbojepg

@bazimogmbh
Copy link
Author

Tried with this makefile , still same error

07-30 15:39:31.246: E/AndroidRuntime(28566): java.lang.UnsatisfiedLinkError: Native method not found: org.libjpegturbo.turbojpeg.TJDecompressor.init:()V
07-30 15:39:31.246: E/AndroidRuntime(28566): at org.libjpegturbo.turbojpeg.TJDecompressor.init(Native Method)

Mind sharing your jni folder ?

@minhkhanh
Copy link
Owner

Doesn't have any change more.
Checkout gt -> change android.mk -> ndk-build -> rename so and copy to my android project -> done

@bazimogmbh
Copy link
Author

Thnx it works! But it works only and only if the lib is named turbo-jpeg.so . I tried changing

final class TJLoader {
static void load() {
// System.loadLibrary("turbo-jpeg");
System.loadLibrary("jpeg");
}
in this chase with libjpeg.so it wont work at all , but when i rename the .so to libjpeg-turbo.so and call
System.loadLibrary("turbo-jpeg"); it work, pretty strange !

@minhkhanh
Copy link
Owner

Of course

On Wed, Jul 31, 2013 at 2:59 PM, bazimogmbh [email protected]:

Thnx it works! But it works only and only if the lib is named
turbo-jpeg.so . I tried changing

final class TJLoader {
static void load() {
// System.loadLibrary("turbo-jpeg");
System.loadLibrary("jpeg");
}
in this chase with libjpeg.so it wont work at all , but when i rename the
.so to libjpeg-turbo.so and call
System.loadLibrary("turbo-jpeg"); it work, pretty strange !


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-21846090
.

Trần Minh Khánh
FIT - University of Science HCMC
Phone: 01698383xxx
Email: [email protected]
YM!: minhkhanhhaugiang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants