build failure on ppc64le

Hi All, We recently started noticing build failures of libvirt for ppc64le on some distros in our build service. Seems it's possible for sources in remote to be built before remote_protocol.h is generated [ 178s] cc -Isrc/virtnodedevd.p -Isrc -I../src -Isrc/conf -I../src/conf -Isrc/remote -I../src/remote -Isrc/admin -I../src/admin -Isrc/access -I../src/access -Isrc/rpc -I../src/rpc -Isrc/util -I../src/util -Iinclude -I../include -I. -I.. -I/usr/include/p11-kit-1 -I/usr/include/libnl3 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/libxml2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -fasynchronous-unwind-tables -fexceptions -fipa-pure-const -fno-common -Waddress -Waggressive-loop-optimizations -Walloc-size-larger-than=9223372036854775807 -Walloca -Warray-bounds=2 -Wattributes -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeclaration-after-statement -Wdeprecated-declarations -Wdesignated-init -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-contains-nul -Wformat-extra-args -Wno-format-nonliteral -Wformat-overflow=2 -Wformat-security -Wno-format-truncation -Wformat-y2k -Wformat-zero-length -Wframe-address -Wframe-larger-than=2048 -Wfree-nonheap-object -Whsa -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-fallthrough=5 -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Winline -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnormalized=nfc -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wshift-overflow=2 -Wno-sign-compare -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wstringop-overflow=2 -Wno-suggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wno-suggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-enum -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-const-variable=2 -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvla -Wvolatile-register-var -Wwrite-strings -fstack-protector-strong -Wdouble-promotion -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fPIE -pthread -DIN_LIBVIRT '-Dabs_top_builddir="/home/abuild/rpmbuild/BUILD/libvirt-9.10.0/ppc64le-suse-linux"' '-Dabs_top_srcdir="/home/abuild/rpmbuild/BUILD/libvirt-9.10.0"' '-DDAEMON_NAME="virtnodedevd"' '-DMODULE_NAME="nodedev"' -MD -MQ src/virtnodedevd.p/remote_remote_daemon_config.c.o -MF src/virtnodedevd.p/remote_remote_daemon_config.c.o.d -o src/virtnodedevd.p/remote_remote_daemon_config.c.o -c ../src/remote/remote_daemon_config.c [ 178s] ../src/remote/remote_daemon_config.c: In function ‘daemonConfigNew’: [ 178s] ../src/remote/remote_daemon_config.c:111:30: error: ‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function); did you mean ‘WITH_POLKIT’? [ 178s] data->auth_unix_rw = REMOTE_AUTH_POLKIT; [ 178s] ^~~~~~~~~~~~~~~~~~ [ 178s] WITH_POLKIT [ 178s] ../src/remote/remote_daemon_config.c:111:30: note: each undeclared identifier is reported only once for each function it appears in [ 178s] ../src/remote/remote_daemon_config.c:115:30: error: ‘REMOTE_AUTH_NONE’ undeclared (first use in this function); did you mean ‘REMOTE_AUTH_POLKIT’? [ 178s] data->auth_unix_rw = REMOTE_AUTH_NONE; [ 178s] ^~~~~~~~~~~~~~~~ [ 178s] REMOTE_AUTH_POLKIT [ 178s] ../src/remote/remote_daemon_config.c: In function ‘daemonConfigLoadOptions’: [ 178s] ../src/remote/remote_daemon_config.c:252:31: error: ‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function); did you mean ‘WITH_POLKIT’? [ 178s] if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) { [ 178s] ^~~~~~~~~~~~~~~~~~ [ 178s] WITH_POLKIT [ 178s] [263/1422] /usr/bin/meson --internal exe --capture src/admin/admin_server_dispatch_stubs.h -- /home/abuild/rpmbuild/BUILD/libvirt-9.10.0/src/rpc/gendispatch.pl --mode=server admin ADMIN ../src/admin/admin_protocol.x [ 179s] [264/1422] /home/abuild/rpmbuild/BUILD/libvirt-9.10.0/scripts/meson-python.sh /usr/bin/python3 /home/abuild/rpmbuild/BUILD/libvirt-9.10.0/scripts/rpcgen/main.py --mode=header ../src/remote/remote_protocol.x src/remote/remote_protocol.h Full build log of one failure case can be found here https://build.opensuse.org/build/Virtualization/15.6/ppc64le/libvirt/_log The below patch fixes the issue in our testing, but I'm not sure if it's the best solution, versus e.g. a dependency along the lines of rpc_dep et. al. Thanks for comments/suggestions. Regards, Jim diff --git a/src/meson.build b/src/meson.build index 6538c43628..3f989de7f9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -616,7 +616,7 @@ foreach daemon : virt_daemons bin = executable( daemon['name'], [ - daemon.get('sources', [ remote_daemon_sources, remote_daemon_generated ]), + daemon.get('sources', [ remote_daemon_sources, remote_daemon_generated, remote_driver_generated ]), dtrace_gen_objects, ], c_args: [

On Tue, Jan 16, 2024 at 08:00:42PM -0700, Jim Fehlig wrote:
Hi All,
We recently started noticing build failures of libvirt for ppc64le on some distros in our build service. Seems it's possible for sources in remote to be built before remote_protocol.h is generated
snip
src/virtnodedevd.p/remote_remote_daemon_config.c.o -MF src/virtnodedevd.p/remote_remote_daemon_config.c.o.d -o src/virtnodedevd.p/remote_remote_daemon_config.c.o -c ../src/remote/remote_daemon_config.c [ 178s] ../src/remote/remote_daemon_config.c: In function ‘daemonConfigNew’: [ 178s] ../src/remote/remote_daemon_config.c:111:30: error: ‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function); did you mean ‘WITH_POLKIT’? [ 178s] data->auth_unix_rw = REMOTE_AUTH_POLKIT; [ 178s] ^~~~~~~~~~~~~~~~~~ [ 178s] WITH_POLKIT [ 178s] ../src/remote/remote_daemon_config.c:111:30: note: each undeclared identifier is reported only once for each function it appears in [ 178s] ../src/remote/remote_daemon_config.c:115:30: error: ‘REMOTE_AUTH_NONE’ undeclared (first use in this function); did you mean ‘REMOTE_AUTH_POLKIT’? [ 178s] data->auth_unix_rw = REMOTE_AUTH_NONE; [ 178s] ^~~~~~~~~~~~~~~~ [ 178s] REMOTE_AUTH_POLKIT [ 178s] ../src/remote/remote_daemon_config.c: In function ‘daemonConfigLoadOptions’: [ 178s] ../src/remote/remote_daemon_config.c:252:31: error: ‘REMOTE_AUTH_POLKIT’ undeclared (first use in this function); did you mean ‘WITH_POLKIT’? [ 178s] if (data->auth_unix_rw == REMOTE_AUTH_POLKIT) { [ 178s] ^~~~~~~~~~~~~~~~~~ [ 178s] WITH_POLKIT [ 178s] [263/1422] /usr/bin/meson --internal exe --capture src/admin/admin_server_dispatch_stubs.h -- /home/abuild/rpmbuild/BUILD/libvirt-9.10.0/src/rpc/gendispatch.pl --mode=server admin ADMIN ../src/admin/admin_protocol.x [ 179s] [264/1422] /home/abuild/rpmbuild/BUILD/libvirt-9.10.0/scripts/meson-python.sh /usr/bin/python3 /home/abuild/rpmbuild/BUILD/libvirt-9.10.0/scripts/rpcgen/main.py --mode=header ../src/remote/remote_protocol.x src/remote/remote_protocol.h
Pretty wierd - I can only image the header file exists on disk, but content has not yet been written to it ?
Full build log of one failure case can be found here
https://build.opensuse.org/build/Virtualization/15.6/ppc64le/libvirt/_log
The below patch fixes the issue in our testing, but I'm not sure if it's the best solution, versus e.g. a dependency along the lines of rpc_dep et. al. Thanks for comments/suggestions.
Regards, Jim
diff --git a/src/meson.build b/src/meson.build index 6538c43628..3f989de7f9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -616,7 +616,7 @@ foreach daemon : virt_daemons bin = executable( daemon['name'], [ - daemon.get('sources', [ remote_daemon_sources, remote_daemon_generated ]), + daemon.get('sources', [ remote_daemon_sources, remote_daemon_generated, remote_driver_generated ]), dtrace_gen_objects, ], c_args: [
The daemon code is relying on remote_protocol.h having been generated, and this file is part of 'remote_driver_generated'. The daemon code does not directly depend on the remote client code though, so this dep feels wierd & superficially redundant. I wonder if we should create "remote_protocol_generated", and then reference that in both the daemon and the driver client targets, so it is conceptually clear why we have it. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (2)
-
Daniel P. Berrangé
-
Jim Fehlig