I am not an expert at this, so I might be doing things incorrectly.
I used Mingw x86_64 to build LMDB (just changed the CC in the Makefile). I had
an issue with srandom and random in the test programs and switch to rand
instead. Now I can build successfully and make test runs mtest successfully.
Now if I try one of the other mtest[2-5] or mtest itself, I get sporadic
segmentation fault. If I wait long enough it will always work, but running the
programs in a kind of loop guarantees a seg fault error.
That's pretty normal. The test programs don't do any error checking. You're
welcome to submit a patch adding the requisite error checking.
When you run the tests repeatedly eventually the DB grows to its maxsize limit
and a write request fails. After that things crash because the library is
returning failure codes that the test programs ignore.
I wanted to try running with gdb but it seems that it doesn't
ship with cygwin
for Mingw. Using standard gdb gives me a 193 error. Again this is getting past
my expertise here.
The test programs are actually only intended to be used with gdb, but yes,
it's a pain finding a working gdb for MinGW64. The one I'm currently using is
Has anyone successfully build LMDB for Windows and can help here.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/