Closed chris-morgan closed 3 years ago
Oh, apparently LevelDB doesn’t currently support Windows. That’s really odd. I thought I heard mention of it being used in things like Chrome which definitely run on Windows.
As far as I heard, Google does not use LevelDB much anymore anyways.
RocksDB and similar seem to be more popular.
On 20 Oct 2016, at 18:44, Chris Morgan notifications@github.com wrote:
Oh, apparently LevelDB doesn’t currently support Windows. That’s really odd. I thought I heard mention of it being used in things like Chrome which definitely run on Windows.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I believe that leveldb has added support for Windows now, so would it be possible to reopen this issue?
@adumbidiot patches definitely welcome!
Reference here: https://github.com/google/leveldb#building-for-windows
Merging #14 is important since Windows support is only on newer versions of leveldb. However, it seems like the build system changed from gmake to cmake, which that pr seems to address. The pr also seems to remove all unix-specific functionality, so I think that pr should be sufficient for Windows support.
@adumbidiot can I rely on you for windows testing? Then I'd do that.
Sure. I just tested #14, and it seems to fail on windows when snappy support is enabled. The build script fails to find the compiled snappy lib as the windows linker doesn't understand the specified flag.
I believe this could be fixed by adding the windows linker flag to the LDFLAGS
var, changing https://github.com/timberio/leveldb-sys/blob/update-leveldb/src/build.rs#L43 to something like format!("-L{dir} -libpath:{dir}", dir = snappy_prefix.join("lib").display())
, though that seems kinda hacky.
Hm, thanks. I have a windows machine available, I may check that.
Thanks for having a thorough look at that !
Fixed by #18
Firstly, it’s depending on
std::os::unix
which isn’t available on Windows:Setting +x isn’t relevant on Windows, so that can just be stubbed out on Windows:
But then the dependence on
make
crops up:In short, more work is needed to make it run smoothly on Windows.
I think the
gcc
crate is all about this sort of thing?[Ported from https://github.com/andrew-d/leveldb-rs/issues/9 when I didn’t realise this had been split.]