Re: [Libguestfs] [nbdkit PATCH 06/10] build: Only attempt to build vddk on Linux

2022-10-20 Thread Richard W.M. Jones
On Thu, Oct 20, 2022 at 11:09:29PM +0100, Richard W.M. Jones wrote: > On Thu, Oct 20, 2022 at 03:32:05PM -0500, Eric Blake wrote: > > When --enable/disable-vddk is not given to configure, our default was > > to base on the current architecture. But we know that we are > > targeting a .so library

Re: [Libguestfs] [nbdkit PATCH 10/10] ci: Fix typo in last patch

2022-10-20 Thread Richard W.M. Jones
The series looks sensible, thanks for pushing! Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows

Re: [Libguestfs] [nbdkit PATCH 06/10] build: Only attempt to build vddk on Linux

2022-10-20 Thread Richard W.M. Jones
On Thu, Oct 20, 2022 at 03:32:05PM -0500, Eric Blake wrote: > When --enable/disable-vddk is not given to configure, our default was > to base on the current architecture. But we know that we are > targeting a .so library built for Linux, so we can also gate things > based on the host OS. And

[Libguestfs] [nbdkit PATCH 09/10] perl: Auto-disable on mingw

2022-10-20 Thread Eric Blake
Attempting to build perl on mingw fails horribly with: libtool: compile: i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../../plugins/perl -I../.. -I../../../include -I../../include -I../../../common/include -I../../../common/utils -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects

[Libguestfs] [nbdkit PATCH 08/10] mingw: Provide nbdkit_debug() in Windows replacements

2022-10-20 Thread Eric Blake
Silence compiler warnings such as: ../../../common/replacements/fsync.c: In function 'fsync': ../../../common/replacements/fsync.c:58:5: warning: implicit declaration of function 'nbdkit_debug' [-Wimplicit-function-declaration] 58 | nbdkit_debug ("ReadFile: bad handle"); |

[Libguestfs] [nbdkit PATCH 00/10] Various CI improvements

2022-10-20 Thread Eric Blake
This thread is more for reference, since I've already pushed these to see if it helps turn more of the CI green - although at the moment debian-sid is not playing nice. I'm still not sure how to add a VPATH build to the CI tools; what's more, while I am now getting a native VPATH 'make' to work

[Libguestfs] [nbdkit PATCH 07/10] rust: Skip building in VPATH

2022-10-20 Thread Eric Blake
Cargo does not play nicely with VPATH (at least, that's what my quick google search found: https://github.com/rust-lang/cargo/issues/5457#issuecomment-451695299). Easiest is to just disable it when we detect a VPATH build. --- configure.ac | 7 ++- 1 file changed, 6 insertions(+), 1

[Libguestfs] [nbdkit PATCH 10/10] ci: Fix typo in last patch

2022-10-20 Thread Eric Blake
I didn't mean to kill the entire CI pipeline with a syntax error! Fixes: 4446896f --- ci/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/build.sh b/ci/build.sh index 0eb07e93..3803f6d2 100755 --- a/ci/build.sh +++ b/ci/build.sh @@ -104,6 +104,7 @@ main() { then

[Libguestfs] [nbdkit PATCH 06/10] build: Only attempt to build vddk on Linux

2022-10-20 Thread Eric Blake
When --enable/disable-vddk is not given to configure, our default was to base on the current architecture. But we know that we are targeting a .so library built for Linux, so we can also gate things based on the host OS. And doing so means that vddk is no longer even attempted on mingw,

[Libguestfs] [nbdkit PATCH 03/10] mingw: Avoid broken gnutls/socket.h header

2022-10-20 Thread Eric Blake
gnutls 3.7.7 ships with a that fails to compile on mingw: https://gitlab.com/gnutls/gnutls/-/issues/1382. But it also provides a stub function gnutls_transport_is_ktls_enabled that always returns false (since ktls is a Linux-only thing for now). As such, we are hitting compilation errors such

[Libguestfs] [nbdkit PATCH 04/10] build: Fix VPATH build when nbdkit not installed

2022-10-20 Thread Eric Blake
Even when nbdkit is previously installed, we want to make sure we are using the in-tree nbdkit-version.h, and not the pre-installed one. Noticed when a native VPATH build succeeded but a mingw cross-build failed with: In file included from ../../../include/nbdkit-plugin.h:38,

[Libguestfs] [nbdkit PATCH 02/10] build: Fix VPATH build of protostrings.c

2022-10-20 Thread Eric Blake
generate-protostrings.sh is a generated file, hence it lives in builddir, which is not the same as srcdir in a VPATH build. Fixes: 8aff349a ("common/protocol: Remove protostrings.sed, use bash+sed instead.", v1.15.3) --- common/protocol/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2

[Libguestfs] [nbdkit PATCH 05/10] golang: Attempt VPATH builds

2022-10-20 Thread Eric Blake
I didn't check if Go is still trying to stick other files in $srcdir ('make distcheck' fails for other reasons), but at least with this patch, it is no longer failing in a VPATH build with: make[3]: Entering directory '/home/eblake/nbdkit-tmp/build/plugins/golang' cd examples/disk && \

[Libguestfs] [nbdkit PATCH 01/10] ci: Update with lcitool

2022-10-20 Thread Eric Blake
Fix a typo and add opensuse-leap-154, then rerun 'lcitool manifest ci/manifest.yml' to pick up recent changes in lcitool that fix mingw builds and improve how much time CI jobs can take. --- ci/build.sh | 2 +- ci/buildenv/fedora-35-cross-mingw32.sh| 2

Re: [Libguestfs] Why cant't use the pie link option when compiling libgustfs

2022-10-20 Thread Richard W.M. Jones
On Fri, Oct 21, 2022 at 12:10:43AM +0800, guiHua wrote: > Hello >When I compile libgustfs, it will throw exception: undefined reference to > 'caml_local_roots' when adding pie link option. > Why is that? The command is like this: > ./configure CFLAGS="-O2 -fPIC" LDFLAGS="-pie -Wl". Is

[Libguestfs] Why cant't use the pie link option when compiling libgustfs

2022-10-20 Thread guiHua
Hello?? When Icompile libgustfs, it will throw exception: undefined reference to 'caml_local_roots' when adding pie link option. Why is that? The command is like this: ./configure CFLAGS="-O2 -fPIC" LDFLAGS="-pie -Wl". I look forward to hearing from