Also available here: https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib
After a lot of work I have made the port to Windows work without using a separate library. Instead, on Windows only, we build an "import library" (library of stubs) which resolves references to nbdkit_* functions in the main program and fixes up the plugin, basically the first technique outlined in this email: https://www.redhat.com/archives/libguestfs/2020-August/msg00268.html Most tests fail, unsurprisingly. The vast majority fail because we lack support for Unix domain sockets. There is some hope that we could add this: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/ Although this could fix many tests, it's probably not going to be very useful for actual Windows users. Another large cause of test failures is lack of --run option which might also be fixed with a lot of effort. As before it's entirely possible to develop on, compile and test this series using only the tools provided in Fedora or RHEL. You need a few mingw64-* packages and wine. (Note you don't need to run wine explicitly, there should be a binfmt handler installed which allows you to run nbdkit.exe directly). Apart from having to use ./nbdkit.exe to run the wrapper, it should all work the same way, eg: ./nbdkit.exe -f -v memory 1G ./nbdkit.exe -f -v file disk.img starts a RAM disk or exports a file. This patch series should contain fixes for everything picked up on in previous reviews. Rich. _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
