The detailed instructions are at the bottom of the README if you
search for "WINDOWS":
https://gitlab.com/nbdkit/nbdkit/-/blob/master/README
These basic commands should work:
$ mingw64-configure --disable-ocaml --disable-perl --disable-vddk
$ mingw64-make
and the binary should be runnable if Wine is installed, eg:
$ ./nbdkit.exe --dump-config
...
host_cpu=x86_64
host_os=mingw32
...
Getting the tests to work under Wine is ... well, a tad more tedious.
There are several issues:
- Windows now supports AF_UNIX, but Wine does not.
- Most tests use Unix domain sockets (ie. nbdkit -U) because using
possibly public TCP ports during tests is not cool and also
difficult to deconflict. So AF_UNIX support is really needed to
run nbdkit tests in any detail.
- I patched Wine to add AF_UNIX support (see attached). However
since then Wine code has changed quite significantly in the way it
creates sockets so my patch doesn't even remotely work and I can't
see an easy way to fix it. Therefore you must apply the attached
patch on top of 7ec069d85f5235db ("ntdll/tests: Fix virtual test
failures on win10pro.") Only 5592 commits behind head!
- ./configure --enable-win64 && make
- For some reason I had to hand-edit dlls/gdi32/Makefile to remove
the tools/wrc/wrc -pthread parameter. I'm pretty sure I didn't
need to do that before. There could be an upstream commit we are
missing.
If you do all of that and build Wine then you should be able to set
$PATH to point to the patched Wine build directory and run the tests
as so:
$ PATH=~/d/wine:$PATH mingw64-make check -C tests
Tests in !tests directory fail for miscellaneous reasons.
Most tests will be skipped but for me at least a significant number
pass. I get:
============================================================================
Testsuite summary for nbdkit 1.25.7
============================================================================
# TOTAL: 203
# PASS: 75
# SKIP: 128
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
I would recommend adding “WINEDEBUG=warn+all” if nothing seems to be
working.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top