Howard,

Thanks for the reply. See below

On Sat, Sep 28, 2013 at 9:44 PM, Howard Chu <hyc@symas.com> wrote:
Alain wrote:
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.
This is surely not the case here. As I noted, "if I wait long enough it will always work". I was not trying to run the test programs hundreds of times, but simply like once or twice each. Again, if it fails, wait about 30 secs, and try again and it will work.


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 7.1.90.20100730-cvs

http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/gdb/

Great will use it.


Has anyone successfully build LMDB for Windows and can help here.

Cheers,
Alain


--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/