bazlbert / marisa-trie

Automatically exported from code.google.com/p/marisa-trie
Other
0 stars 0 forks source link

marisa-trie does not build under mingw32 #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm not a mingw user myself; a build error was reported here: 
https://github.com/kmike/marisa-trie/issues/1

The stat.h header from mingw: 
http://gitorious.org/mingw/mingw-runtime/blobs/6e654ca0ceb56a42ebaa23bd43b50d62c
4e4c0c1/include/sys/stat.h

_stat64 is indeed defined only #if __MSVCRT_VERSION__ >= 0x0601

Mingw default for this define is the following (for compatibility with older 
Windows):

define __MSVCRT_VERSION__ 0x0600

so _stat64 is not defined under mingw and marisa-trie build fails.

Similar issue: 
http://www.mail-archive.com/fedora-mingw@lists.fedoraproject.org/msg00741.html 
- the suggested fix was to manually define less restrictive __MSVCRT_VERSION__.

Original issue reported on code.google.com by kmik...@gmail.com on 28 Aug 2012 at 12:55

GoogleCodeExporter commented 8 years ago
Thanks for your report.

This problem may be fixed in r94.

http://code.google.com/p/marisa-trie/source/diff?spec=svn94&r=94&format=side&pat
h=/trunk/lib/marisa/grimoire/io/mapper.cc

Original comment by susumu.y...@gmail.com on 29 Aug 2012 at 2:09

GoogleCodeExporter commented 8 years ago

Original comment by susumu.y...@gmail.com on 29 Aug 2012 at 5:00

GoogleCodeExporter commented 8 years ago
Thanks for a quick fix! 

Original comment by kmik...@gmail.com on 29 Aug 2012 at 10:53

GoogleCodeExporter commented 8 years ago
The original issue is confirmed to be fixed, thanks again! 

It is reported that saving doesn't work under mingw32, but I don't know if this 
a bug in my Python wrapper or not.

Original comment by kmik...@gmail.com on 29 Aug 2012 at 7:04

GoogleCodeExporter commented 8 years ago
Thanks for your valuable report.

I see the comment about the problem 
(https://github.com/kmike/marisa-trie/issues/1#issuecomment-8135066).

It seems that marisa-trie threw an exception, but I'm not sure where the 
exception was thrown.
So, I'd like to ask you what error message was thrown with the exception.

Could you check it?

Original comment by susumu.y...@gmail.com on 30 Aug 2012 at 12:52

GoogleCodeExporter commented 8 years ago
I haven't figured out how to properly wrap C++ exceptions (preserving the error 
messages) using Cython so the exception raised is just a generic RuntimeError. 

I also don't have an access to a Windows machine to try to debug this issue 
myself (probably using your SWIG Python wrapper). 

So unfortunately there are no more details available and I probably won't be 
able to provide them soon.

Original comment by kmik...@gmail.com on 30 Aug 2012 at 1:02

GoogleCodeExporter commented 8 years ago
I've submitted a new issue for the saving problem, because it is another 
problem.

http://code.google.com/p/marisa-trie/issues/detail?id=13

Original comment by susumu.y...@gmail.com on 31 Aug 2012 at 1:23