-
Notifications
You must be signed in to change notification settings - Fork 28
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
Not building for android #37
Comments
I built it on Linux last time. You may need to adjust the android pom with the correct --host option. Also you need to set the NDK path variable. There is also a release in maven central, if that works for you. <dependency>
<groupId>org.deephacks.lmdbjni</groupId>
<artifactId>lmdbjni-android</artifactId>
<version>0.4.0</version>
</dependency> |
Thx for the answer. So i add in gradle maven dependency: compile group: 'org.deephacks.lmdbjni', name: 'lmdbjni-android', version: '0.4.0' And project build well, but i have error native library missing at run: Could not load library. Reasons: [...,nativeLibraryDirectories=[/data/app/ru.test.test-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "liblmdbjni-1-0.0.so",...couldn't find "liblmdbjni.so"] May you provide prebuild version liblmdbjni.so and may be somethink like libmdb.so will needed too? |
I try reproduce step by step how i try to build: For project https://github.com/deephacks/lmdb - this steps work well - and i have liblmdb.so and liblmdb.a) |
Ops, i extract *so and put manualy and now all works good, thank you I create repo with builded lmdb jni - for simple test lmdb vs leveldb vs filesystem here: Just put & get some byte array to db 50 times in one circle:
It's work, and better then Level db, but perfomance not so good as i expected(
I expect what its must work like memory, but it work like filesystem^^ Source test: https://github.com/recoilme/testLevelDb/blob/master/app/src/main/java/ru/test/test/MainActivity.java |
There are a number of thing you can do to increase write speed.
All of these options are available in the Constants class. |
Thank you, Kristoffer With this options speeds is more close to file system and, sometime, faster >>
And one more question, pls: what do you think about try build lmdb specialy for android with this commit: Right now i dont see some effective and simple key/value storage for byte arrays with good speed and small overhead, and lmdb looks very promising, but we need more speed on mobile devices. I want try this, but have no luck with build from source for android... |
It would be very nice to have direct buffer support on Android. We tried to get it working before but failed, see #21. I must admit that neither my android nor c skills is good enough to make a fair judgement. Have you tried direct buffers with this commit? |
Sorry^ i am so lame and dont may build from source (i extract *so from jar from maven and put manualy) but i will be happy to do some tests if you may try build with this commit and give me *so |
The clone you're referring to looks like the vl32 branch on LMDB? |
Yes |
I built this from latest https://github.com/LMDB/lmdb/tree/vl32 using the following agcc script. #!/bin/bash
$NDK/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=$NDK/android-ndk-r10e/platforms/android-19/arch-arm -DMDB_DSYNC=O_SYNC $@ make CC="./agcc" https://dl.dropboxusercontent.com/u/39196712/liblmdb.so Let me know how it goes. |
Kristoffer, |
You can replace the so file in lmdbjni-android-0.4.0. jar. |
Sorry, i try it, but lmdbjni-android contains only solid liblmdbjni.so (1.2Mb) |
Sorry, of course you need the proper jar built. Silly me. https://dl.dropboxusercontent.com/u/39196712/lmdbjni-android-0.4.3-SNAPSHOT.jar |
I am not sure what all do right
And programm fail with sigsegv: 08-11 11:49:05.997 4369-4369/ru.test.test A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x10 in tid 4369 (ru.test.test)
|
More detail message: |
Yes, i'm afraid that BufferCursor will not work without taking 32-bit addresses into account. I don't have time to spend on this right now. But if you want to take a stab at it, read up on #21 and try something similar. If you get a prototype working i'll be happy to implement the rest. |
Whats sad but not critical. I dont know C( Feel free to close this issue.. |
There is nothing in lmdbjni that enforce a particular android version. I would expect the NDK to be backward compatible. |
Ok, closing. |
jni build succesfully, but .so files - not(
I run mvn install -P android with no luck
Error in logs:
checking whether the C compiler works... no
[INFO] configure: error: in /Users/recoilme/asp/lmdbjni/lmdbjni-android/target/native-build': [INFO] configure: error: C compiler cannot create executables [INFO] Seeconfig.log' for more details
In config.log - wrong directory name
linux-x86_64 is missing in ndk.
I try rename darwin-x86_64 to linux-x86_64 with no luck. Now errors command line options not supported and so on.
May you provide some information how to build for android?
The text was updated successfully, but these errors were encountered: