Open GoogleCodeExporter opened 9 years ago
I believe this is fixed in Leveldb 1.5. Can you please test with this version
instead.
Original comment by di...@google.com
on 9 Jul 2012 at 10:52
I'm using last source from the android branch.
To solve the problem i have replace "ATTRIBUTE_WEAK" declaration by
"__attribute__((weak))" in the port_android.h file line 80
Issue solve with Google so it need to be valide.
I still have compile error with mips architecture but i'm not sure such device
exist on android.
(x86 is ok)
Original comment by bruno.ro...@gmail.com
on 9 Jul 2012 at 9:29
Attachments:
I don't know who manages the android branch, or what differences it has with
mainline, but I suspect it is seriously out-dated :-(
Original comment by di...@google.com
on 10 Jul 2012 at 9:14
Ok, i will try to compare/merge my code with master branch
Original comment by bruno.ro...@gmail.com
on 10 Jul 2012 at 12:39
I have made the diff between android branch and master branch.
Android branch is totally out of sync.
Do you plan to maintain it or maybe let android port to another project ?
Original comment by bruno.ro...@gmail.com
on 11 Jul 2012 at 3:14
I have publish my port of leveldb on android on github.
I have add a class for use it as library in an android project.
if you have any comment or question don't hesitate.
https://github.com/moritan/LevelDBlib
Original comment by bruno.ro...@gmail.com
on 11 Jul 2012 at 9:18
Well done, bruno. Thank you.
I compared master and android branch and I thought some features are removed
intentionally. But it seems not.
Your android port works nicely in Android 2.1 (armeabi) and Android 4.1
(armeabi-v7a).
Original comment by noranb...@gmail.com
on 16 Oct 2012 at 6:22
I found that in Android 2.1 leveldb doesn't work
because pread() always returns 0.
I posted at ndk groups but got nothing.
android ndk is still growing so each release could be different
I think if Env can check platform version at runtime, it would be more
compatible and mobile friendly.
Original comment by noranb...@gmail.com
on 1 Nov 2012 at 8:02
If I change pread to lseek->read->lseek, (in android 7)
is there any possible problem, thread or performance?
If I want to do this, where would be the best place to put the platform check?
Or are you have any plan for runtime platform check?
Original comment by noranb...@gmail.com
on 6 Nov 2012 at 1:10
> If I change pread to lseek->read->lseek, (in android 7)
This won't work since multiple threads may be reading from the same file at the
same time and they will interfere with each other.
Some potential fixes:
(1) Does the mmap version work? If so, you could relax the rules for using the
mmap implementation of RandomAccessFile to cover Eclair.
(2) If you use lseek/read, combine it with a Mutex to prevent threading
problems. E.g.,
lock mutex
lseek to offset
read()
unlock mutex
(there is no need to lseek at the end since the next reader will do another
lseek before their read anyway).
Original comment by san...@google.com
on 14 Dec 2012 at 5:29
Original issue reported on code.google.com by
bruno.ro...@gmail.com
on 6 Jul 2012 at 8:22