-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Windows Support #475
Comments
Today I notices, that the current windows build with the above patches will not enable SNAPPY for levelDB. If you are working with databases which use SNAPPY, this can be an issue. Thus I created 4 more patch files. All patch files are contained in the following ZIP. The following files are relevant (in addition to the files, described above): For the Snappy support I used as base the file "FindSnappy.cmake" from repository https://github.com/lemire/FastPFor |
Official support for Windows is probably the most requested enhancement. We are currently working on CMake support with continuous integration via AppVeyor. Using issue #466 to track this work. |
When stopping a timer, the current time is subtracted from the start time. However, when the times are identical, or sufficiently close together, the subtraction can result in a negative number. For some reason MinGW is the only platform where this problem manifests. I suspect it's due to MinGW specific behavior in either the CPU timing code, floating point model, or printf formatting. Either way, the fix for MinGW should be correct across all platforms.
Unfortunately the developers of this library did not spend any amount on effort to make this library compilable on Windows. Even the build-system, it not portable.
I updated the windows port from https://github.com/bureau14/leveldb/blob/master, which was based on levelDB 1.18 to version 1.20. The following patches are necessary:
1.) The CMakeList file from https://github.com/bureau14/leveldb/blob/master which works with 1.18
2.) Some changes to this file to make it compatible with 1.20
3.) Several files, which are necessary for windows (also taken form https://github.com/bureau14/leveldb/blob/master) combined with some adoptions to make everything compatible to 1.20.
4.) Some adoptions to the tests. Windows don't like to delete a file, which is currently in use by the same process.
You can find the patches in the attached ZIP.
patches.zip
Furthermore this is a appveyor.yml file, which compiles levelDB 1.20 on AppVeyor CI Build system for Windows 64bit, 32bit as Release and Debug build:
I have not tested the CMake-build system on linux so far. But I will do it within the next weeks. If I see issues, I will release some additional patches.
By the way: Even on *nix systems CMake is a better choice as build system than pure Makefiles. It solves many dependencies by itself and on top of it will give you cross-compile possibility for free. Yeah I know, it is hard to use something different, when you are used to pure Makefiles. But give it a try.
The text was updated successfully, but these errors were encountered: