deephacks / lmdbjni

LMDB for Java
Apache License 2.0
204 stars 28 forks source link

No Windows support after 0.3.2? #48

Closed drewhk closed 8 years ago

drewhk commented 8 years ago

The latest on Maven Central seems to be 0.3.2. According to the front page there is Windows support, but apparently this is outdated.

krisskross commented 8 years ago

Building for windows is quite time consuming since i'm on Linux. Also wasn't sure about the interest from Windows users so I stopped building them to see if there were any objections.

Give me a few hours and i'll revive the build env.

drewhk commented 8 years ago

Totally awesome! :)

krisskross commented 8 years ago

Bah, I had to reinstall the whole build env from scratch.

Before deploying to Maven Central, do you mind testing the jar so that we can be sure the build works correctly?

https://dl.dropboxusercontent.com/u/39196712/lmdbjni-win64-0.4.4.jar

drewhk commented 8 years ago

Tested and it works

drewhk commented 8 years ago

Hm, almost, the database file is no longer put to the requested directory, and its name is totally garbled. It finds it consistently though, and the contents are correct.

drewhk commented 8 years ago

Can be some encoding problem?

krisskross commented 8 years ago

Hmm. Maybe. Could be something with the missing headers I added.

krisskross commented 8 years ago

I have feeling that lmdbjni-win64/headers/unistd.h might not be correct.

krisskross commented 8 years ago

And it's probably related to hawtjni. Too bad I don't have the old build env to compare with.

krisskross commented 8 years ago

What about this one? I cleaned up some old stuff from the build that might have built the wrong thing.

https://dl.dropboxusercontent.com/u/39196712/lmdbjni-win64-0.4.4.jar

krisskross commented 8 years ago

Don't bother, it's probably broken. Tests fails at random places.

krisskross commented 8 years ago

The problem is related to how paths are encoded in LMDB on Windows. Howard helped me last night and made a commit that fixes the problem.

https://github.com/LMDB/lmdb/commit/58ad1dd757efc9c6854ddf67a3826f6d72ad2130

drewhk commented 8 years ago

Great! Just tell me if you need me to test a new jar.

krisskross commented 8 years ago

The fix Howard did is in LMDB mdb.master branch, which is a bit of problem.

I need to see if it's possible to branch out 0.4.4 and apply the fix there.

krisskross commented 8 years ago

I managed to patch LMDB_0.9.16 with the fix and created a 0.4.4.1 branch for this. It works for me but could you please try it also?

https://www.dropbox.com/s/eusjanjddcuztiu/lmdbjni-win64-0.4.4.1.jar?dl=0 https://www.dropbox.com/s/19pv2dizaoqw68z/lmdbjni-0.4.4.1.jar?dl=0

drewhk commented 8 years ago

Great, it works! I had to include hawtjni-runtime 1.9 among my dependencies to make it work though, but I guess that is expected (btw it seems like 1.11 is the latest of that library).

krisskross commented 8 years ago

Nice! I will release 0.4.4.1 to Maven Central which will fix the hawtjni-runtime if you use Maven to manage your dependencies.

Hopefully the UTF-8 fix will make it into LMDB_0.9.17 in the future.

krisskross commented 8 years ago

The 0.4.4.1 Maven Central release is in-transit.

I talked to Howard and LMDB_0.9.17 will be out in a few days. I'll add the UTF-8 fix afterwards to 0.4.5.

drewhk commented 8 years ago

Thank you very much for your and Howard's efforts.

krisskross commented 8 years ago

NP enjoy! :-)

krisskross commented 8 years ago

Just out of curiosity, are you using LMDB in akka?

drewhk commented 8 years ago

No, it is just a side-project where I use it. I needed a no fuss, embedded, transactional DB. Also LMDB is a really nice piece of software, I like its design choices.