* [PULL v8 00/86] Misc QEMU patches for 2020-09-24
@ 2020-09-30 19:58 Paolo Bonzini
2020-09-30 19:58 ` [PULL 29/86] meson: move libudev test Paolo Bonzini
` (4 more replies)
0 siblings, 5 replies; 21+ messages in thread
From: Paolo Bonzini @ 2020-09-30 19:58 UTC (permalink / raw)
To: qemu-devel
The following changes since commit cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0:
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-09-30 11:40:38 +0100)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 37aeb7a28ddbf52dd25dd53ae1b8391bc2287858:
hw/net/can: Correct Kconfig dependencies (2020-09-30 19:11:37 +0200)
----------------------------------------------------------------
* SCSI fix (Dmitry, Li Feng, Li Qiang)
* memory API fixes (Eduardo)
* removal of deprecated '-numa node', 'cpu-add', '-smp' (Igor)
* ACPI fix for VMBus (Jon)
* relocatable install (myself)
* always remove docker containers (myself)
* serial cleanups (Philippe)
* vmware cpuid leaf for tsc and apic frequency (Sunil)
* KVM_FEATURE_ASYNC_PF_INT support (Vitaly)
* i386 XSAVE bugfix (Xiaoyao)
* QOM developer documentation in docs/devel (Eduardo)
* new checkpatch tests (Dov)
* x86_64 syscall fix (Douglas)
* interrupt-based APF fix (Vitaly)
* always create kvmclock (Vitaly)
* fix bios-tables-test (Eduardo)
* KVM PV features cleanup (myself)
* CAN FD (Pavel)
meson:
* fixes (Marc-André, Max, Stefan, Alexander, myself)
* moved libmpathpersist, cocoa, malloc tests (myself)
* support for 0.56 introspected test dependencies (myself)
----------------------------------------------------------------
Alexander Bulekov (1):
oss-fuzz: move linker arg to fix coverage-build
Anthony PERARD (1):
meson: fix installation of keymaps
Claudio Fontana (1):
tests: add missing genh dependency
Daniel P. Berrangé (1):
char: fix logging when chardev write fails
Dmitry Fomichev (1):
scsi-generic: Fix HM-zoned device scan
Douglas Crosher (1):
helper_syscall x86_64: clear exception_is_int
Dov Murik (1):
checkpatch: Detect '%#' or '%0#' in printf-style format strings
Eduardo Habkost (10):
memory: Convert IOMMUMemoryRegionClass doc comment to kernel-doc
qom: Document all function parameters in doc comments
qom: Use kernel-doc private/public tags in structs
qom: Use ``code`` Sphinx syntax where appropriate
qom: Add kernel-doc markup to introduction doc comment
qom: Reformat section titles using Sphinx syntax
qom: Indent existing code examples
qom: Add code block markup to all code blocks
docs: Create docs/devel/qom.rst
bios-tables-test: Remove kernel-irqchip=off option
Igor Mammedov (4):
numa: drop support for '-numa node' (without memory specified)
doc: Cleanup "'-mem-path' fallback to RAM" deprecation text
numa: remove fixup numa_state->num_nodes to MAX_NODES
smp: drop support for deprecated (invalid topologies)
Jan Charvat (5):
net/can: Initial host SocketCan support for CAN FD.
hw/net/can: sja1000 ignore CAN FD frames
net/can: Add can_dlc2len and can_len2dlc for CAN FD.
hw/net/can/ctucafd: Add CTU CAN FD core register definitions.
hw/net/can: CTU CAN FD IP open hardware core emulation.
Jon Doron (1):
acpi: i386: Move VMBus DSDT entry to SB
Li Feng (1):
vhost-scsi: support inflight io track
Li Qiang (2):
hw: megasas: return -1 when 'megasas_map_sgl' fails
hw: megasas: consider 'iov_count=0' is an error in megasas_map_sgl
Marc-André Lureau (2):
meson: fix MSI rule
meson: error out if qemu_suffix starts with /
Paolo Bonzini (28):
meson: clean up build_by_default
ninjatool: rebuild multi-output targets if outputs are missing
meson: move libudev test
meson: move libmpathpersist test
meson: extend libmpathpersist test for static linking
configure: move malloc_trim/tcmalloc/jemalloc to meson
configure: fix --meson=/path/to/meson
configure: move cocoa option to Meson
configure: do not limit Hypervisor.framework test to Darwin
meson: qtest: set "depends" correctly
mtest2make: add support for introspected test dependencies
meson: report accelerator support
oslib: do not call g_strdup from qemu_get_exec_dir
fuzz: use qemu_get_exec_dir
oslib-posix: default exec_dir to bindir
cutils: introduce get_relocated_path
oslib-posix: relocate path to /var
module: relocate path to modules
net: relocate paths to helpers and scripts
vl: relocate paths to data directories
vl: relocate path to configuration file
qemu-bridge-helper: relocate path to default ACL
qga: relocate path to default configuration and hook
ui: relocate paths to icons and translations
configure: use a platform-neutral prefix
tests/tcg: reinstate or replace desired parts of rules.mak
docs: Move object.h overview doc comment to qom.rst
target/i386: kvm: do not use kvm_check_extension to find paravirtual capabilities
Pavel Pisa (2):
hw/net/can: Documentation for CTU CAN FD IP open hardware core emulation.
hw/net/can: Correct Kconfig dependencies
Philippe Mathieu-Daudé (16):
configure: Do not intent to build WHPX on 32-bit host
hw/mips/mipssim: Use MMIO serial device on fake ISA I/O
hw/char/serial: Remove TYPE_SERIAL_IO
hw/char/serial: Assert serial_ioport_read/write offset fits 8 bytes
hw/char/serial: Replace commented DPRINTF() by trace event
hw/char/serial: Remove old DEBUG_SERIAL commented code
hw/char/serial: Rename I/O read/write trace events
hw/char/serial: Make 'wakeup' property boolean
hw/char/serial-{isa, pci}: Alias QDEV properties from generic serial object
hw/i386/q35: Remove unreachable Xen code on Q35 machine
exec: Remove MemoryRegion::global_locking field
hw/i386/xen: Rename X86/PC specific function as xen_hvm_init_pc()
sysemu/xen: Add missing 'exec/cpu-common.h' header for ram_addr_t type
stubs: Split accelerator / hardware related stubs
hw/xen: Split x86-specific declaration from generic hardware ones
typedefs: Restrict PCMachineState to 'hw/i386/pc.h'
Stefan Hajnoczi (2):
MAINTAINERS: add Paolo Bonzini as RCU maintainer
configure: rename QEMU_GA_MSI_ENABLED to CONFIG_QGA_MSI
Stefano Garzarella (1):
checkpatch: avoid error on cover letter files
Sunil Muthuswamy (1):
WHPX: vmware cpuid leaf for tsc and apic frequency
Vitaly Kuznetsov (3):
target/i386: support KVM_FEATURE_ASYNC_PF_INT
target/i386: Fix VM migration when interrupt based APF is enabled
target/i386: always create kvmclock device
Xiaoyao Li (1):
i386/cpu: Clear FEAT_XSAVE_COMP_{LO,HI} when XSAVE is not available
MAINTAINERS | 18 +
Makefile | 4 +-
accel/stubs/xen-stub.c | 41 +-
accel/tcg/cputlb.c | 4 +-
chardev/char.c | 13 +
configure | 237 ++-------
docs/can.txt | 113 +++-
docs/devel/build-system.rst | 5 +
docs/devel/index.rst | 1 +
docs/devel/qom.rst | 378 +++++++++++++
docs/system/deprecated.rst | 57 +-
exec.c | 2 +-
hw/char/serial-isa.c | 4 +-
hw/char/serial-pci.c | 3 +-
hw/char/serial.c | 65 +--
hw/char/trace-events | 5 +-
hw/core/machine.c | 1 -
hw/core/numa.c | 59 ---
hw/i386/acpi-build.c | 12 +-
hw/i386/kvm/clock.c | 7 +-
hw/i386/microvm.c | 2 +-
hw/i386/pc.c | 1 +
hw/i386/pc_piix.c | 16 +-
hw/i386/pc_q35.c | 19 +-
hw/i386/xen/xen-hvm.c | 3 +-
hw/mips/mipssim.c | 5 +-
hw/net/Kconfig | 16 +-
hw/net/can/can_sja1000.c | 31 +-
hw/net/can/ctu_can_fd_frame.h | 189 +++++++
hw/net/can/ctu_can_fd_regs.h | 971 ++++++++++++++++++++++++++++++++++
hw/net/can/ctucan_core.c | 696 ++++++++++++++++++++++++
hw/net/can/ctucan_core.h | 127 +++++
hw/net/can/ctucan_pci.c | 281 ++++++++++
hw/net/can/meson.build | 2 +
hw/ppc/spapr.c | 1 -
hw/scsi/megasas.c | 6 +-
hw/scsi/scsi-generic.c | 10 +-
hw/scsi/vhost-scsi-common.c | 27 +
include/exec/memory.h | 64 ++-
include/hw/boards.h | 2 -
include/hw/char/serial.h | 11 +-
include/hw/i386/pc.h | 7 +-
include/hw/kvm/clock.h | 4 +-
include/hw/virtio/vhost-scsi-common.h | 2 +
include/hw/xen/xen-x86.h | 15 +
include/hw/xen/xen.h | 2 -
include/net/can_emu.h | 12 +-
include/net/net.h | 4 +-
include/qemu-common.h | 1 -
include/qemu/cutils.h | 12 +
include/qemu/osdep.h | 8 +-
include/qemu/typedefs.h | 1 -
include/qom/object.h | 547 ++++---------------
include/scsi/constants.h | 1 +
include/sysemu/numa.h | 4 -
include/sysemu/sysemu.h | 2 +-
include/sysemu/xen.h | 2 +
meson.build | 202 +++++--
meson_options.txt | 9 +
net/can/can_core.c | 36 ++
net/can/can_socketcan.c | 47 +-
net/tap.c | 26 +-
os-posix.c | 24 -
os-win32.c | 11 -
pc-bios/keymaps/meson.build | 2 +
qemu-bridge-helper.c | 9 +-
qga/main.c | 8 +-
qga/meson.build | 1 +
scripts/checkpatch.pl | 12 +-
scripts/mtest2make.py | 19 +-
scripts/ninjatool.py | 3 +
softmmu/memory.c | 6 -
softmmu/vl.c | 43 +-
stubs/meson.build | 1 +
stubs/xen-hw-stub.c | 50 ++
target/i386/cpu.c | 5 +-
target/i386/cpu.h | 1 +
target/i386/kvm.c | 45 +-
target/i386/kvm_i386.h | 1 +
target/i386/machine.c | 19 +
target/i386/seg_helper.c | 1 +
target/i386/whp-dispatch.h | 3 +-
target/i386/whpx-all.c | 96 +++-
tests/fp/meson.build | 2 -
tests/meson.build | 9 +-
tests/qemu-iotests/meson.build | 3 +-
tests/qtest/bios-tables-test.c | 3 +-
tests/qtest/fuzz/fuzz.c | 12 +-
tests/qtest/meson.build | 8 +-
tests/tcg/Makefile.qemu | 13 +-
tests/tcg/configure.sh | 4 +-
trace/meson.build | 1 -
ui/gtk.c | 10 +-
ui/meson.build | 2 +-
ui/sdl2.c | 9 +-
ui/shader/meson.build | 1 -
util/cutils.c | 61 +++
util/module.c | 10 +-
util/oslib-posix.c | 35 +-
util/oslib-win32.c | 14 +-
100 files changed, 3842 insertions(+), 1168 deletions(-)
create mode 100644 docs/devel/qom.rst
create mode 100644 hw/net/can/ctu_can_fd_frame.h
create mode 100644 hw/net/can/ctu_can_fd_regs.h
create mode 100644 hw/net/can/ctucan_core.c
create mode 100644 hw/net/can/ctucan_core.h
create mode 100644 hw/net/can/ctucan_pci.c
create mode 100644 include/hw/xen/xen-x86.h
create mode 100644 stubs/xen-hw-stub.c
--
2.26.2
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PULL 29/86] meson: move libudev test
2020-09-30 19:58 [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Paolo Bonzini
@ 2020-09-30 19:58 ` Paolo Bonzini
2020-10-01 16:19 ` Peter Maydell
2020-09-30 19:58 ` [PULL 30/86] meson: move libmpathpersist test Paolo Bonzini
` (3 subsequent siblings)
4 siblings, 1 reply; 21+ messages in thread
From: Paolo Bonzini @ 2020-09-30 19:58 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.bennee
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 14 --------------
meson.build | 7 ++++---
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/configure b/configure
index f9e2f3de65..6f2599f99f 100755
--- a/configure
+++ b/configure
@@ -908,7 +908,6 @@ Linux)
linux_user="yes"
kvm="yes"
QEMU_INCLUDES="-isystem ${source_path}/linux-headers -Ilinux-headers $QEMU_INCLUDES"
- libudev="yes"
;;
esac
@@ -6287,15 +6286,6 @@ if test "$libnfs" != "no" ; then
fi
##########################################
-# Do we have libudev
-if test "$libudev" != "no" ; then
- if $pkg_config libudev && test "$static" != "yes"; then
- libudev="yes"
- libudev_libs=$($pkg_config --libs libudev)
- else
- libudev="no"
- fi
-fi
# Exclude --warn-common with TSan to suppress warnings from the TSan libraries.
if test "$solaris" = "no" && test "$tsan" = "no"; then
@@ -7456,10 +7446,6 @@ if test "$gcov" = "yes" ; then
echo "CONFIG_GCOV=y" >> $config_host_mak
fi
-if test "$libudev" != "no"; then
- echo "CONFIG_LIBUDEV=y" >> $config_host_mak
- echo "LIBUDEV_LIBS=$libudev_libs" >> $config_host_mak
-fi
if test "$fuzzing" != "no"; then
echo "CONFIG_FUZZ=y" >> $config_host_mak
fi
diff --git a/meson.build b/meson.build
index 975a187e2c..cd3d1ee260 100644
--- a/meson.build
+++ b/meson.build
@@ -257,8 +257,8 @@ if 'CONFIG_CURL' in config_host
link_args: config_host['CURL_LIBS'].split())
endif
libudev = not_found
-if 'CONFIG_LIBUDEV' in config_host
- libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
+if targetos == 'linux' and (have_system or have_tools)
+ libudev = dependency('libudev', static: enable_static)
endif
brlapi = not_found
if 'CONFIG_BRLAPI' in config_host
@@ -440,6 +440,7 @@ has_gettid = cc.has_function('gettid')
# Create config-host.h
+config_host_data.set('CONFIG_LIBUDEV', libudev.found())
config_host_data.set('CONFIG_SDL', sdl.found())
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
config_host_data.set('CONFIG_VNC', vnc.found())
@@ -1450,7 +1451,7 @@ summary_info += {'sheepdog support': config_host.has_key('CONFIG_SHEEPDOG')}
summary_info += {'capstone': config_host.has_key('CONFIG_CAPSTONE')}
summary_info += {'libpmem support': config_host.has_key('CONFIG_LIBPMEM')}
summary_info += {'libdaxctl support': config_host.has_key('CONFIG_LIBDAXCTL')}
-summary_info += {'libudev': config_host.has_key('CONFIG_LIBUDEV')}
+summary_info += {'libudev': libudev.found()}
summary_info += {'default devices': config_host['CONFIG_MINIKCONF_MODE'] == '--defconfig'}
summary_info += {'plugin support': config_host.has_key('CONFIG_PLUGIN')}
summary_info += {'fuzzing support': config_host.has_key('CONFIG_FUZZ')}
--
2.26.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL 30/86] meson: move libmpathpersist test
2020-09-30 19:58 [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Paolo Bonzini
2020-09-30 19:58 ` [PULL 29/86] meson: move libudev test Paolo Bonzini
@ 2020-09-30 19:58 ` Paolo Bonzini
2020-09-30 19:58 ` [PULL 31/86] meson: extend libmpathpersist test for static linking Paolo Bonzini
` (2 subsequent siblings)
4 siblings, 0 replies; 21+ messages in thread
From: Paolo Bonzini @ 2020-09-30 19:58 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.bennee
This is the first compiler/linker test that has been moved to Meson.
Add more section headings to keep things clearer.
This also fixes static linking to libmpathpersist, which has a
dependency on libmultipath but no pkg-config file to describe it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 77 +++-----------------------------------------
meson.build | 81 +++++++++++++++++++++++++++++++++++++++++++----
meson_options.txt | 2 ++
3 files changed, 80 insertions(+), 80 deletions(-)
diff --git a/configure b/configure
index 6f2599f99f..aade6eb285 100755
--- a/configure
+++ b/configure
@@ -403,7 +403,7 @@ netmap="no"
sdl="auto"
sdl_image="auto"
virtfs=""
-mpath=""
+mpath="auto"
vnc="enabled"
sparse="no"
vde=""
@@ -1116,9 +1116,9 @@ for opt do
;;
--enable-virtfs) virtfs="yes"
;;
- --disable-mpath) mpath="no"
+ --disable-mpath) mpath="disabled"
;;
- --enable-mpath) mpath="yes"
+ --enable-mpath) mpath="enabled"
;;
--disable-vnc) vnc="disabled"
;;
@@ -3852,57 +3852,6 @@ if test "$modules" = yes; then
fi
fi
-##########################################
-# libmpathpersist probe
-
-if test "$mpath" != "no" ; then
- # probe for the new API
- cat > $TMPC <<EOF
-#include <libudev.h>
-#include <mpath_persist.h>
-unsigned mpath_mx_alloc_len = 1024;
-int logsink;
-static struct config *multipath_conf;
-extern struct udev *udev;
-extern struct config *get_multipath_config(void);
-extern void put_multipath_config(struct config *conf);
-struct udev *udev;
-struct config *get_multipath_config(void) { return multipath_conf; }
-void put_multipath_config(struct config *conf) { }
-
-int main(void) {
- udev = udev_new();
- multipath_conf = mpath_lib_init();
- return 0;
-}
-EOF
- if compile_prog "" "-ludev -lmultipath -lmpathpersist" ; then
- mpathpersist=yes
- mpathpersist_new_api=yes
- else
- # probe for the old API
- cat > $TMPC <<EOF
-#include <libudev.h>
-#include <mpath_persist.h>
-unsigned mpath_mx_alloc_len = 1024;
-int logsink;
-int main(void) {
- struct udev *udev = udev_new();
- mpath_lib_init(udev);
- return 0;
-}
-EOF
- if compile_prog "" "-ludev -lmultipath -lmpathpersist" ; then
- mpathpersist=yes
- mpathpersist_new_api=no
- else
- mpathpersist=no
- fi
- fi
-else
- mpathpersist=no
-fi
-
##########################################
# pthread probe
PTHREADLIBS_LIST="-pthread -lpthread -lpthreadGC2"
@@ -6337,23 +6286,11 @@ if test "$softmmu" = yes ; then
fi
virtfs=no
fi
- if test "$mpath" != no && test "$mpathpersist" = yes ; then
- mpath=yes
- else
- if test "$mpath" = yes; then
- error_exit "Multipath requires libmpathpersist devel"
- fi
- mpath=no
- fi
else
if test "$virtfs" = yes; then
error_exit "VirtFS is supported only on Linux"
fi
virtfs=no
- if test "$mpath" = yes; then
- error_exit "Multipath is supported only on Linux"
- fi
- mpath=no
fi
fi
@@ -6894,12 +6831,6 @@ fi
if test "$virtfs" = "yes" ; then
echo "CONFIG_VIRTFS=y" >> $config_host_mak
fi
-if test "$mpath" = "yes" ; then
- echo "CONFIG_MPATH=y" >> $config_host_mak
- if test "$mpathpersist_new_api" = "yes"; then
- echo "CONFIG_MPATH_NEW_API=y" >> $config_host_mak
- fi
-fi
if test "$vhost_scsi" = "yes" ; then
echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
fi
@@ -7988,7 +7919,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \
-Dstrip=$(if test "$strip_opt" = yes; then echo true; else echo false; fi) \
-Db_pie=$(if test "$pie" = yes; then echo true; else echo false; fi) \
-Db_coverage=$(if test "$gcov" = yes; then echo true; else echo false; fi) \
- -Dsdl=$sdl -Dsdl_image=$sdl_image \
+ -Dmpath=$mpath -Dsdl=$sdl -Dsdl_image=$sdl_image \
-Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \
-Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f\
$cross_arg \
diff --git a/meson.build b/meson.build
index cd3d1ee260..8e9cd67235 100644
--- a/meson.build
+++ b/meson.build
@@ -86,6 +86,14 @@ if 'SPARSE_CFLAGS' in config_host
'compile_commands.json'])
endif
+###########################################
+# Target-specific checks and dependencies #
+###########################################
+
+if targetos != 'linux' and get_option('mpath').enabled()
+ error('Multipath is supported only on Linux')
+endif
+
m = cc.find_library('m', required: false)
util = cc.find_library('util', required: false)
winmm = []
@@ -117,6 +125,11 @@ elif targetos == 'haiku'
cc.find_library('network'),
cc.find_library('bsd')]
endif
+
+################
+# Dependencies #
+################
+
# The path to glib.h is added to all compilation commands. This was
# grandfathered in from the QEMU Makefiles.
add_project_arguments(config_host['GLIB_CFLAGS'].split(),
@@ -223,10 +236,6 @@ if 'CONFIG_SPICE' in config_host
link_args: config_host['SPICE_LIBS'].split())
endif
rt = cc.find_library('rt', required: false)
-libmpathpersist = not_found
-if config_host.has_key('CONFIG_MPATH')
- libmpathpersist = cc.find_library('mpathpersist')
-endif
libdl = not_found
if 'CONFIG_PLUGIN' in config_host
libdl = cc.find_library('dl', required: true)
@@ -258,8 +267,64 @@ if 'CONFIG_CURL' in config_host
endif
libudev = not_found
if targetos == 'linux' and (have_system or have_tools)
- libudev = dependency('libudev', static: enable_static)
+ libudev = dependency('libudev',
+ required: get_option('mpath').enabled(),
+ static: enable_static)
+endif
+
+mpathpersist = not_found
+mpathpersist_new_api = false
+if targetos == 'linux' and have_tools and not get_option('mpath').disabled()
+ mpath_test_source_new = '''
+ #include <libudev.h>
+ #include <mpath_persist.h>
+ unsigned mpath_mx_alloc_len = 1024;
+ int logsink;
+ static struct config *multipath_conf;
+ extern struct udev *udev;
+ extern struct config *get_multipath_config(void);
+ extern void put_multipath_config(struct config *conf);
+ struct udev *udev;
+ struct config *get_multipath_config(void) { return multipath_conf; }
+ void put_multipath_config(struct config *conf) { }
+ int main(void) {
+ udev = udev_new();
+ multipath_conf = mpath_lib_init();
+ return 0;
+ }'''
+ mpath_test_source_old = '''
+ #include <libudev.h>
+ #include <mpath_persist.h>
+ unsigned mpath_mx_alloc_len = 1024;
+ int logsink;
+ int main(void) {
+ struct udev *udev = udev_new();
+ mpath_lib_init(udev);
+ return 0;
+ }'''
+ libmultipath = cc.find_library('multipath',
+ required: get_option('mpath'),
+ static: enable_static)
+ libmpathpersist = cc.find_library('mpathpersist',
+ required: get_option('mpath'),
+ static: enable_static)
+ if libmultipath.found() and libmpathpersist.found() and libudev.found()
+ mpathlibs = [libmultipath, libmpathpersist, libudev]
+ if cc.links(mpath_test_source_new, dependencies: mpathlibs)
+ mpathpersist = declare_dependency(dependencies: mpathlibs)
+ mpathpersist_new_api = true
+ elif cc.links(mpath_test_source_old, dependencies: mpathlibs)
+ mpathpersist = declare_dependency(dependencies: mpathlibs)
+ else
+ if get_option('mpath').enabled()
+ error('Cannot detect libmpathpersist API')
+ else
+ warning('Cannot detect libmpathpersist API, disabling')
+ endif
+ endif
+ endif
endif
+
brlapi = not_found
if 'CONFIG_BRLAPI' in config_host
brlapi = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split())
@@ -441,6 +506,8 @@ has_gettid = cc.has_function('gettid')
# Create config-host.h
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
+config_host_data.set('CONFIG_MPATH', mpathpersist.found())
+config_host_data.set('CONFIG_MPATH_NEW_API', mpathpersist_new_api)
config_host_data.set('CONFIG_SDL', sdl.found())
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
config_host_data.set('CONFIG_VNC', vnc.found())
@@ -1205,7 +1272,7 @@ if have_tools
executable('qemu-pr-helper', files('scsi/qemu-pr-helper.c', 'scsi/utils.c'),
dependencies: [authz, crypto, io, qom, qemuutil,
- libcap_ng, libudev, libmpathpersist],
+ libcap_ng, mpathpersist],
install: true)
endif
@@ -1342,7 +1409,7 @@ summary_info += {'Audio drivers': config_host['CONFIG_AUDIO_DRIVERS']}
summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']}
summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']}
summary_info += {'VirtFS support': config_host.has_key('CONFIG_VIRTFS')}
-summary_info += {'Multipath support': config_host.has_key('CONFIG_MPATH')}
+summary_info += {'Multipath support': mpathpersist.found()}
summary_info += {'VNC support': vnc.found()}
if vnc.found()
summary_info += {'VNC SASL support': sasl.found()}
diff --git a/meson_options.txt b/meson_options.txt
index 543cf70043..b38a6ae92a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -6,6 +6,8 @@ option('docdir', type : 'string', value : 'doc',
option('gettext', type : 'boolean', value : true,
description: 'Localization of the GTK+ user interface')
+option('mpath', type : 'feature', value : 'auto',
+ description: 'Multipath persistent reservation passthrough')
option('sdl', type : 'feature', value : 'auto',
description: 'SDL user interface')
option('sdl_image', type : 'feature', value : 'auto',
--
2.26.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PULL 31/86] meson: extend libmpathpersist test for static linking
2020-09-30 19:58 [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Paolo Bonzini
2020-09-30 19:58 ` [PULL 29/86] meson: move libudev test Paolo Bonzini
2020-09-30 19:58 ` [PULL 30/86] meson: move libmpathpersist test Paolo Bonzini
@ 2020-09-30 19:58 ` Paolo Bonzini
2020-10-01 14:28 ` [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Peter Maydell
2020-10-02 15:58 ` Michal Prívozník
4 siblings, 0 replies; 21+ messages in thread
From: Paolo Bonzini @ 2020-09-30 19:58 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.bennee
libmultipath has a dependency on libdevmapper, so
include it as well when static linking. It seems that
the rabbit hole ends there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/meson.build b/meson.build
index 8e9cd67235..5dd7728cc9 100644
--- a/meson.build
+++ b/meson.build
@@ -302,14 +302,25 @@ if targetos == 'linux' and have_tools and not get_option('mpath').disabled()
mpath_lib_init(udev);
return 0;
}'''
- libmultipath = cc.find_library('multipath',
- required: get_option('mpath'),
- static: enable_static)
- libmpathpersist = cc.find_library('mpathpersist',
- required: get_option('mpath'),
- static: enable_static)
- if libmultipath.found() and libmpathpersist.found() and libudev.found()
- mpathlibs = [libmultipath, libmpathpersist, libudev]
+ mpathlibs = [libudev]
+ if enable_static
+ mpathlibs += cc.find_library('devmapper',
+ required: get_option('mpath'),
+ static: enable_static)
+ endif
+ mpathlibs += cc.find_library('multipath',
+ required: get_option('mpath'),
+ static: enable_static)
+ mpathlibs += cc.find_library('mpathpersist',
+ required: get_option('mpath'),
+ static: enable_static)
+ foreach lib: mpathlibs
+ if not lib.found()
+ mpathlibs = []
+ break
+ endif
+ endforeach
+ if mpathlibs.length() > 0
if cc.links(mpath_test_source_new, dependencies: mpathlibs)
mpathpersist = declare_dependency(dependencies: mpathlibs)
mpathpersist_new_api = true
--
2.26.2
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-09-30 19:58 [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Paolo Bonzini
` (2 preceding siblings ...)
2020-09-30 19:58 ` [PULL 31/86] meson: extend libmpathpersist test for static linking Paolo Bonzini
@ 2020-10-01 14:28 ` Peter Maydell
2020-10-01 15:41 ` 罗勇刚(Yonggang Luo)
2020-10-02 15:58 ` Michal Prívozník
4 siblings, 1 reply; 21+ messages in thread
From: Peter Maydell @ 2020-10-01 14:28 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU Developers
On Wed, 30 Sep 2020 at 21:04, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0:
>
> Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-09-30 11:40:38 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 37aeb7a28ddbf52dd25dd53ae1b8391bc2287858:
>
> hw/net/can: Correct Kconfig dependencies (2020-09-30 19:11:37 +0200)
>
> ----------------------------------------------------------------
> * SCSI fix (Dmitry, Li Feng, Li Qiang)
> * memory API fixes (Eduardo)
> * removal of deprecated '-numa node', 'cpu-add', '-smp' (Igor)
> * ACPI fix for VMBus (Jon)
> * relocatable install (myself)
> * always remove docker containers (myself)
> * serial cleanups (Philippe)
> * vmware cpuid leaf for tsc and apic frequency (Sunil)
> * KVM_FEATURE_ASYNC_PF_INT support (Vitaly)
> * i386 XSAVE bugfix (Xiaoyao)
> * QOM developer documentation in docs/devel (Eduardo)
> * new checkpatch tests (Dov)
> * x86_64 syscall fix (Douglas)
> * interrupt-based APF fix (Vitaly)
> * always create kvmclock (Vitaly)
> * fix bios-tables-test (Eduardo)
> * KVM PV features cleanup (myself)
> * CAN FD (Pavel)
>
> meson:
> * fixes (Marc-André, Max, Stefan, Alexander, myself)
> * moved libmpathpersist, cocoa, malloc tests (myself)
> * support for 0.56 introspected test dependencies (myself)
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-01 14:28 ` [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Peter Maydell
@ 2020-10-01 15:41 ` 罗勇刚(Yonggang Luo)
0 siblings, 0 replies; 21+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2020-10-01 15:41 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]
On Thu, Oct 1, 2020 at 10:36 PM Peter Maydell <peter.maydell@linaro.org>
wrote:
>
> On Wed, 30 Sep 2020 at 21:04, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > The following changes since commit
cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0:
> >
> > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into
staging (2020-09-30 11:40:38 +0100)
> >
> > are available in the Git repository at:
> >
> > https://gitlab.com/bonzini/qemu.git tags/for-upstream
> >
> > for you to fetch changes up to 37aeb7a28ddbf52dd25dd53ae1b8391bc2287858:
> >
> > hw/net/can: Correct Kconfig dependencies (2020-09-30 19:11:37 +0200)
> >
> > ----------------------------------------------------------------
> > * SCSI fix (Dmitry, Li Feng, Li Qiang)
> > * memory API fixes (Eduardo)
> > * removal of deprecated '-numa node', 'cpu-add', '-smp' (Igor)
> > * ACPI fix for VMBus (Jon)
> > * relocatable install (myself)
> > * always remove docker containers (myself)
> > * serial cleanups (Philippe)
> > * vmware cpuid leaf for tsc and apic frequency (Sunil)
> > * KVM_FEATURE_ASYNC_PF_INT support (Vitaly)
> > * i386 XSAVE bugfix (Xiaoyao)
> > * QOM developer documentation in docs/devel (Eduardo)
> > * new checkpatch tests (Dov)
> > * x86_64 syscall fix (Douglas)
> > * interrupt-based APF fix (Vitaly)
> > * always create kvmclock (Vitaly)
> > * fix bios-tables-test (Eduardo)
> > * KVM PV features cleanup (myself)
> > * CAN FD (Pavel)
> >
> > meson:
> > * fixes (Marc-André, Max, Stefan, Alexander, myself)
> > * moved libmpathpersist, cocoa, malloc tests (myself)
> > * support for 0.56 introspected test dependencies (myself)
> >
>
>
> Applied, thanks.
>
> Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
> for any user-visible changes.
>
> -- PMM
>
Long awating, wonderfull
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
[-- Attachment #2: Type: text/html, Size: 2565 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL 29/86] meson: move libudev test
2020-09-30 19:58 ` [PULL 29/86] meson: move libudev test Paolo Bonzini
@ 2020-10-01 16:19 ` Peter Maydell
2020-10-01 16:55 ` Paolo Bonzini
0 siblings, 1 reply; 21+ messages in thread
From: Peter Maydell @ 2020-10-01 16:19 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Alex Bennée, QEMU Developers
On Wed, 30 Sep 2020 at 21:01, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> configure | 14 --------------
> meson.build | 7 ++++---
> 2 files changed, 4 insertions(+), 17 deletions(-)
Hi; this commit seems to have broken my static build.
Previously configure did not include libudev in the link
for a static build (there is no libudev.a, at least on my
system). Now it does, and then the link fails with
/usr/bin/ld: cannot find -ludev
> ##########################################
> -# Do we have libudev
> -if test "$libudev" != "no" ; then
> - if $pkg_config libudev && test "$static" != "yes"; then
> - libudev="yes"
> - libudev_libs=$($pkg_config --libs libudev)
> - else
> - libudev="no"
> - fi
> -fi
This is the old code, which doesn't enable libudev for
static builds.
> --- a/meson.build
> +++ b/meson.build
> @@ -257,8 +257,8 @@ if 'CONFIG_CURL' in config_host
> link_args: config_host['CURL_LIBS'].split())
> endif
> libudev = not_found
> -if 'CONFIG_LIBUDEV' in config_host
> - libudev = declare_dependency(link_args: config_host['LIBUDEV_LIBS'].split())
> +if targetos == 'linux' and (have_system or have_tools)
> + libudev = dependency('libudev', static: enable_static)
> endif
I'm not very confident about reading meson.build logic, but it
looks like this trusts meson/pkg-config to tell it about
whether it can do a static link against this library,
which doesn't work on my system, at least. (Ubuntu 18.04.4).
> brlapi = not_found
> if 'CONFIG_BRLAPI' in config_host
thanks
-- PMM
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL 29/86] meson: move libudev test
2020-10-01 16:19 ` Peter Maydell
@ 2020-10-01 16:55 ` Paolo Bonzini
2020-10-01 18:51 ` Peter Maydell
0 siblings, 1 reply; 21+ messages in thread
From: Paolo Bonzini @ 2020-10-01 16:55 UTC (permalink / raw)
To: Peter Maydell; +Cc: Alex Bennée, QEMU Developers
On 01/10/20 18:19, Peter Maydell wrote:
> Hi; this commit seems to have broken my static build.
> Previously configure did not include libudev in the link
> for a static build (there is no libudev.a, at least on my
> system). Now it does, and then the link fails with
> /usr/bin/ld: cannot find -ludev
>
>> ##########################################
>> -# Do we have libudev
>> -if test "$libudev" != "no" ; then
>> - if $pkg_config libudev && test "$static" != "yes"; then
>> - libudev="yes"
>> - libudev_libs=$($pkg_config --libs libudev)
>> - else
>> - libudev="no"
>> - fi
>> -fi
>
> This is the old code, which doesn't enable libudev for
> static builds. [...]
> I'm not very confident about reading meson.build logic, but it
> looks like this trusts meson/pkg-config to tell it about
> whether it can do a static link against this library,
> which doesn't work on my system, at least. (Ubuntu 18.04.4).
Yes, and the same was of course true of pkg-config without meson. You
probably got the same warning that you reported on v7.
In fact, my guess is that the "test $static != yes" was added in reply
to a similar complaint; the commit that introduced it has a note that
the test was added by the maintainer:
commit 3efac6ebb88e4d099f07fef65178ebaa595ae770
Author: Tomáš Golembiovský <tgolembi@redhat.com>
Date: Tue Oct 23 13:23:10 2018 +0200
configure: add test for libudev
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
*make libudev optional to avoid breaking existing build/test
environments
*disable libudev for --static builds
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
But I don't think --static should affect the build this way, especially
since libudev was the only library that had this test in the configure
script (checked in 5.1). Debian doesn't package "libgtk-3.a" either and
yet GTK+ it is not special cased in the configure script, so I'm not
sure what it is that makes libudev special.
Do you actually build just with "--static"? Or do you have a list of
"--disable" options so you can add one more?
Paolo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL 29/86] meson: move libudev test
2020-10-01 16:55 ` Paolo Bonzini
@ 2020-10-01 18:51 ` Peter Maydell
2020-10-01 19:15 ` Paolo Bonzini
0 siblings, 1 reply; 21+ messages in thread
From: Peter Maydell @ 2020-10-01 18:51 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Alex Bennée, QEMU Developers
On Thu, 1 Oct 2020 at 17:55, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 01/10/20 18:19, Peter Maydell wrote:
> > I'm not very confident about reading meson.build logic, but it
> > looks like this trusts meson/pkg-config to tell it about
> > whether it can do a static link against this library,
> > which doesn't work on my system, at least. (Ubuntu 18.04.4).
>
> Yes, and the same was of course true of pkg-config without meson. You
> probably got the same warning that you reported on v7.
>
> In fact, my guess is that the "test $static != yes" was added in reply
> to a similar complaint; the commit that introduced it has a note that
> the test was added by the maintainer:
>
> commit 3efac6ebb88e4d099f07fef65178ebaa595ae770
> Author: Tomáš Golembiovský <tgolembi@redhat.com>
> Date: Tue Oct 23 13:23:10 2018 +0200
>
> configure: add test for libudev
>
> Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> *make libudev optional to avoid breaking existing build/test
> environments
> *disable libudev for --static builds
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>
> But I don't think --static should affect the build this way, especially
> since libudev was the only library that had this test in the configure
> script (checked in 5.1). Debian doesn't package "libgtk-3.a" either and
> yet GTK+ it is not special cased in the configure script, so I'm not
> sure what it is that makes libudev special.
>
> Do you actually build just with "--static"? Or do you have a list of
> "--disable" options so you can add one more?
Yes, I have a lot of --disable-foo options. Ideally I wouldn't
need any, because our configure/build system would identify "there
isn't actually a static version of this dependency present"
rather than blindly trusting pkg-config when it lies to us.
(Is it possible to get Meson to just always do a "test that
a trivial program with these cflags and libs will build" as
part of whatever magic it does as part of dependency() ?
Or to have a qemu_dependency() wrapper that does ?)
The useful thing about libgtk is that it's pretty obvious
that the --disable option to use to stop QEMU linking to
it is --disable-gtk. It's much less obvious what would be
the --disable option to use to stop us linking against
libgio, or libudev, because those dependencies aren't closely
and obviously tied to QEMU features. So for that kind of
library dependency it's much more useful to have configure
do enough checks that it doesn't try to link against something
that doesn't exist.
thanks
-- PMM
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL 29/86] meson: move libudev test
2020-10-01 18:51 ` Peter Maydell
@ 2020-10-01 19:15 ` Paolo Bonzini
0 siblings, 0 replies; 21+ messages in thread
From: Paolo Bonzini @ 2020-10-01 19:15 UTC (permalink / raw)
To: Peter Maydell; +Cc: Alex Bennée, QEMU Developers
On 01/10/20 20:51, Peter Maydell wrote:
> Yes, I have a lot of --disable-foo options. Ideally I wouldn't
> need any, because our configure/build system would identify "there
> isn't actually a static version of this dependency present"
> rather than blindly trusting pkg-config when it lies to us.
> (Is it possible to get Meson to just always do a "test that
> a trivial program with these cflags and libs will build" as
> part of whatever magic it does as part of dependency() ?
Unfortunately there are many special cases, including libraries that
require symbols in the executable, so its not possible to do that. For
this reason the "static library not found for dependency" is just a warning.
We can add such a compile test ourselves. Of course it might add to the
compile time if we do it for every dependency, but perhaps we can do one
with all the dependencies and if it fails loop on single dependencies to
give a better error.
Paolo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-09-30 19:58 [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Paolo Bonzini
` (3 preceding siblings ...)
2020-10-01 14:28 ` [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Peter Maydell
@ 2020-10-02 15:58 ` Michal Prívozník
2020-10-02 16:22 ` Eduardo Habkost
2020-10-02 16:27 ` Paolo Bonzini
4 siblings, 2 replies; 21+ messages in thread
From: Michal Prívozník @ 2020-10-02 15:58 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel, ehabkost
On 9/30/20 9:58 PM, Paolo Bonzini wrote:
>
> Eduardo Habkost (10):
<snip/>
> docs: Create docs/devel/qom.rst
cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
Sorry for noticing this earlier, but is this known? The build starts
failing for me after this commit:
/usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
-Ddepfile=docs/devel.d -Ddepfile_stamp=docs/devel.stamp -b html -d
/home/zippy/work/qemu/qemu.git/build/docs/devel.p
/home/zippy/work/qemu/qemu.git/docs/devel
/home/zippy/work/qemu/qemu.git/build/docs/devel
Running Sphinx v3.2.1
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 20 source files that are out of date
updating environment: [new config] 20 added, 0 changed, 0 removed
reading sources... [100%] testing
Warning, treated as error:
/home/zippy/work/qemu/qemu.git/docs/../include/qom/object.h:747:Error in
declarator
If declarator-id with parameters (e.g., 'void f(int arg)'):
Invalid C declaration: Expected identifier in nested name. [error at 24]
object_initialize_child ( parent, propname, child, type)
------------------------^
If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'):
Error in declarator or parameters
Invalid C declaration: Expecting "(" in parameters. [error at 32]
object_initialize_child ( parent, propname, child, type)
--------------------------------^
make[1]: *** [Makefile.ninja:9898: docs/devel.stamp] Error 2
make[1]: *** Deleting file 'docs/devel.stamp'
make[1]: Leaving directory '/home/zippy/work/qemu/qemu.git/build'
make: *** [GNUmakefile:11: all] Error 2
Michal
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 15:58 ` Michal Prívozník
@ 2020-10-02 16:22 ` Eduardo Habkost
2020-10-02 17:26 ` Michal Prívozník
2020-10-02 16:27 ` Paolo Bonzini
1 sibling, 1 reply; 21+ messages in thread
From: Eduardo Habkost @ 2020-10-02 16:22 UTC (permalink / raw)
To: Michal Prívozník; +Cc: Paolo Bonzini, John Snow, qemu-devel
On Fri, Oct 02, 2020 at 05:58:55PM +0200, Michal Prívozník wrote:
> On 9/30/20 9:58 PM, Paolo Bonzini wrote:
> >
> > Eduardo Habkost (10):
> <snip/>
> > docs: Create docs/devel/qom.rst
>
> cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
>
> Sorry for noticing this earlier, but is this known? The build starts failing
> for me after this commit:
>
> /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W -Ddepfile=docs/devel.d
> -Ddepfile_stamp=docs/devel.stamp -b html -d
> /home/zippy/work/qemu/qemu.git/build/docs/devel.p
> /home/zippy/work/qemu/qemu.git/docs/devel
> /home/zippy/work/qemu/qemu.git/build/docs/devel
> Running Sphinx v3.2.1
> building [mo]: targets for 0 po files that are out of date
> building [html]: targets for 20 source files that are out of date
> updating environment: [new config] 20 added, 0 changed, 0 removed
> reading sources... [100%] testing
>
>
>
>
> Warning, treated as error:
> /home/zippy/work/qemu/qemu.git/docs/../include/qom/object.h:747:Error in
> declarator
> If declarator-id with parameters (e.g., 'void f(int arg)'):
> Invalid C declaration: Expected identifier in nested name. [error at 24]
> object_initialize_child ( parent, propname, child, type)
> ------------------------^
> If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'):
> Error in declarator or parameters
> Invalid C declaration: Expecting "(" in parameters. [error at 32]
> object_initialize_child ( parent, propname, child, type)
> --------------------------------^
>
> make[1]: *** [Makefile.ninja:9898: docs/devel.stamp] Error 2
> make[1]: *** Deleting file 'docs/devel.stamp'
> make[1]: Leaving directory '/home/zippy/work/qemu/qemu.git/build'
> make: *** [GNUmakefile:11: all] Error 2
I can't reproduce it using Sphinx v2.2.2. I'm still trying to
understand what exactly the error means.
I really wish we used virtualenv + requirements.txt to require a
specific version of Sphinx instead of wasting time dealing a wide
range of Sphinx versions.
--
Eduardo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 15:58 ` Michal Prívozník
2020-10-02 16:22 ` Eduardo Habkost
@ 2020-10-02 16:27 ` Paolo Bonzini
2020-10-02 17:01 ` Eduardo Habkost
2020-10-02 18:24 ` Eduardo Habkost
1 sibling, 2 replies; 21+ messages in thread
From: Paolo Bonzini @ 2020-10-02 16:27 UTC (permalink / raw)
To: Michal Prívozník, qemu-devel, ehabkost
On 02/10/20 17:58, Michal Prívozník wrote:
>>
>
> cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
>
> Sorry for noticing this earlier, but is this known? The build starts
> failing for me after this commit:
>
> /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
> -Ddepfile=docs/devel.d -Ddepfile_stamp=docs/devel.stamp -b html -d
> /home/zippy/work/qemu/qemu.git/build/docs/devel.p
> /home/zippy/work/qemu/qemu.git/docs/devel
> /home/zippy/work/qemu/qemu.git/build/docs/devel
> Running Sphinx v3.2.1
> building [mo]: targets for 0 po files that are out of date
> building [html]: targets for 20 source files that are out of date
> updating environment: [new config] 20 added, 0 changed, 0 removed
> reading sources... [100%] testing
No, this is new. It works with older versions of Sphinx (I have 2.2.2
despite being on Fedora 32 which is pretty recent).
For now Sphinx 3 is not supported by kerneldoc, we probably should apply
a patch like
https://www.spinics.net/lists/linux-doc/msg83277.html
Paolo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 16:27 ` Paolo Bonzini
@ 2020-10-02 17:01 ` Eduardo Habkost
2020-10-02 18:24 ` Eduardo Habkost
1 sibling, 0 replies; 21+ messages in thread
From: Eduardo Habkost @ 2020-10-02 17:01 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Michal Prívozník, John Snow, qemu-devel
On Fri, Oct 02, 2020 at 06:27:35PM +0200, Paolo Bonzini wrote:
> On 02/10/20 17:58, Michal Prívozník wrote:
> >>
> >
> > cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
> >
> > Sorry for noticing this earlier, but is this known? The build starts
> > failing for me after this commit:
> >
> > /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
> > -Ddepfile=docs/devel.d -Ddepfile_stamp=docs/devel.stamp -b html -d
> > /home/zippy/work/qemu/qemu.git/build/docs/devel.p
> > /home/zippy/work/qemu/qemu.git/docs/devel
> > /home/zippy/work/qemu/qemu.git/build/docs/devel
> > Running Sphinx v3.2.1
> > building [mo]: targets for 0 po files that are out of date
> > building [html]: targets for 20 source files that are out of date
> > updating environment: [new config] 20 added, 0 changed, 0 removed
> > reading sources... [100%] testing
>
> No, this is new. It works with older versions of Sphinx (I have 2.2.2
> despite being on Fedora 32 which is pretty recent).
>
> For now Sphinx 3 is not supported by kerneldoc, we probably should apply
> a patch like
>
> https://www.spinics.net/lists/linux-doc/msg83277.html
Weird, because we don't use the cdomain extension, and the patch
above only disables the cdomain extension.
In either case, supporting only Sphinx 2.x by now sounds
reasonable. virtualenv+pip makes it simple to install and run a
specific Sphinx version, for people who really need it.
--
Eduardo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 16:22 ` Eduardo Habkost
@ 2020-10-02 17:26 ` Michal Prívozník
2020-10-02 17:30 ` Paolo Bonzini
0 siblings, 1 reply; 21+ messages in thread
From: Michal Prívozník @ 2020-10-02 17:26 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: Paolo Bonzini, John Snow, qemu-devel
On 10/2/20 6:22 PM, Eduardo Habkost wrote:
> On Fri, Oct 02, 2020 at 05:58:55PM +0200, Michal Prívozník wrote:
>> On 9/30/20 9:58 PM, Paolo Bonzini wrote:
>>>
>>> Eduardo Habkost (10):
>> <snip/>
>>> docs: Create docs/devel/qom.rst
>>
>> cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
>>
>> Sorry for noticing this earlier, but is this known? The build starts failing
>> for me after this commit:
>>
>> /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W -Ddepfile=docs/devel.d
>> -Ddepfile_stamp=docs/devel.stamp -b html -d
>> /home/zippy/work/qemu/qemu.git/build/docs/devel.p
>> /home/zippy/work/qemu/qemu.git/docs/devel
>> /home/zippy/work/qemu/qemu.git/build/docs/devel
>> Running Sphinx v3.2.1
>> building [mo]: targets for 0 po files that are out of date
>> building [html]: targets for 20 source files that are out of date
>> updating environment: [new config] 20 added, 0 changed, 0 removed
>> reading sources... [100%] testing
>>
>>
>>
>>
>> Warning, treated as error:
>> /home/zippy/work/qemu/qemu.git/docs/../include/qom/object.h:747:Error in
>> declarator
>> If declarator-id with parameters (e.g., 'void f(int arg)'):
>> Invalid C declaration: Expected identifier in nested name. [error at 24]
>> object_initialize_child ( parent, propname, child, type)
>> ------------------------^
>> If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'):
>> Error in declarator or parameters
>> Invalid C declaration: Expecting "(" in parameters. [error at 32]
>> object_initialize_child ( parent, propname, child, type)
>> --------------------------------^
>>
>> make[1]: *** [Makefile.ninja:9898: docs/devel.stamp] Error 2
>> make[1]: *** Deleting file 'docs/devel.stamp'
>> make[1]: Leaving directory '/home/zippy/work/qemu/qemu.git/build'
>> make: *** [GNUmakefile:11: all] Error 2
>
> I can't reproduce it using Sphinx v2.2.2. I'm still trying to
> understand what exactly the error means.
>
Same here.
> I really wish we used virtualenv + requirements.txt to require a
> specific version of Sphinx instead of wasting time dealing a wide
> range of Sphinx versions.
>
I already have a patch that I keep locally to build with v3:
diff --git a/docs/qemu-option-trace.rst.inc b/docs/qemu-option-trace.rst.inc
index 7e09773a9c..ae83f6a1a8 100644
--- a/docs/qemu-option-trace.rst.inc
+++ b/docs/qemu-option-trace.rst.inc
@@ -1,7 +1,7 @@
Specify tracing options.
-.. option:: [enable=]PATTERN
+.. option:: enable=PATTERN
Immediately enable events matching *PATTERN*
(either event name or a globbing pattern). This option is only
That said, I'm not objecting to requiring v2 for now and switching to v3
later.
But interestingly, through trial and error I've came across this hack,
which allows me to build again. I have no idea why it works:
diff --git i/include/qom/object.h w/include/qom/object.h
index 27aaa67e63..59c729ebb7 100644
--- i/include/qom/object.h
+++ w/include/qom/object.h
@@ -762,13 +762,14 @@ bool object_initialize_child_with_propsv(Object
*parentobj,
* child, sizeof(*child), type,
* &error_abort, NULL)
*/
-#define object_initialize_child(parent, propname, child, type) \
- object_initialize_child_internal((parent), (propname), \
- (child), sizeof(*(child)), (type))
void object_initialize_child_internal(Object *parent, const char
*propname,
void *child, size_t size,
const char *type);
+#define object_initialize_child(parent, propname, child, type) \
+ object_initialize_child_internal((parent), (propname), \
+ (child), sizeof(*(child)), (type))
+
/**
* object_dynamic_cast:
* @obj: The object to cast.
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 17:26 ` Michal Prívozník
@ 2020-10-02 17:30 ` Paolo Bonzini
2020-10-02 17:55 ` Eduardo Habkost
0 siblings, 1 reply; 21+ messages in thread
From: Paolo Bonzini @ 2020-10-02 17:30 UTC (permalink / raw)
To: Michal Prívozník, Eduardo Habkost; +Cc: John Snow, qemu-devel
On 02/10/20 19:26, Michal Prívozník wrote:
> On 10/2/20 6:22 PM, Eduardo Habkost wrote:
>> On Fri, Oct 02, 2020 at 05:58:55PM +0200, Michal Prívozník wrote:
>>> On 9/30/20 9:58 PM, Paolo Bonzini wrote:
>>>>
>>>> Eduardo Habkost (10):
>>> <snip/>
>>>> docs: Create docs/devel/qom.rst
>>>
>>> cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
>>>
>>> Sorry for noticing this earlier, but is this known? The build starts
>>> failing
>>> for me after this commit:
>>>
>>> /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
>>> -Ddepfile=docs/devel.d
>>> -Ddepfile_stamp=docs/devel.stamp -b html -d
>>> /home/zippy/work/qemu/qemu.git/build/docs/devel.p
>>> /home/zippy/work/qemu/qemu.git/docs/devel
>>> /home/zippy/work/qemu/qemu.git/build/docs/devel
>>> Running Sphinx v3.2.1
>>> building [mo]: targets for 0 po files that are out of date
>>> building [html]: targets for 20 source files that are out of date
>>> updating environment: [new config] 20 added, 0 changed, 0 removed
>>> reading sources... [100%] testing
>>>
>>>
>>>
>>>
>>> Warning, treated as error:
>>> /home/zippy/work/qemu/qemu.git/docs/../include/qom/object.h:747:Error in
>>> declarator
>>> If declarator-id with parameters (e.g., 'void f(int arg)'):
>>> Invalid C declaration: Expected identifier in nested name. [error
>>> at 24]
>>> object_initialize_child ( parent, propname, child, type)
>>> ------------------------^
>>> If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'):
>>> Error in declarator or parameters
>>> Invalid C declaration: Expecting "(" in parameters. [error at 32]
>>> object_initialize_child ( parent, propname, child, type)
>>> --------------------------------^
>>>
>>> make[1]: *** [Makefile.ninja:9898: docs/devel.stamp] Error 2
>>> make[1]: *** Deleting file 'docs/devel.stamp'
>>> make[1]: Leaving directory '/home/zippy/work/qemu/qemu.git/build'
>>> make: *** [GNUmakefile:11: all] Error 2
>>
>> I can't reproduce it using Sphinx v2.2.2. I'm still trying to
>> understand what exactly the error means.
>>
>
> Same here.
>
>> I really wish we used virtualenv + requirements.txt to require a
>> specific version of Sphinx instead of wasting time dealing a wide
>> range of Sphinx versions.
>>
>
> I already have a patch that I keep locally to build with v3:
>
> diff --git a/docs/qemu-option-trace.rst.inc
> b/docs/qemu-option-trace.rst.inc
> index 7e09773a9c..ae83f6a1a8 100644
> --- a/docs/qemu-option-trace.rst.inc
> +++ b/docs/qemu-option-trace.rst.inc
> @@ -1,7 +1,7 @@
>
> Specify tracing options.
>
> -.. option:: [enable=]PATTERN
> +.. option:: enable=PATTERN
>
> Immediately enable events matching *PATTERN*
> (either event name or a globbing pattern). This option is only
>
>
> That said, I'm not objecting to requiring v2 for now and switching to v3
> later.
>
>
> But interestingly, through trial and error I've came across this hack,
> which allows me to build again. I have no idea why it works:
>
> diff --git i/include/qom/object.h w/include/qom/object.h
> index 27aaa67e63..59c729ebb7 100644
> --- i/include/qom/object.h
> +++ w/include/qom/object.h
> @@ -762,13 +762,14 @@ bool object_initialize_child_with_propsv(Object
> *parentobj,
> * child, sizeof(*child), type,
> * &error_abort, NULL)
> */
> -#define object_initialize_child(parent, propname, child, type) \
> - object_initialize_child_internal((parent), (propname), \
> - (child), sizeof(*(child)), (type))
> void object_initialize_child_internal(Object *parent, const char
> *propname,
> void *child, size_t size,
> const char *type);
>
> +#define object_initialize_child(parent, propname, child, type) \
> + object_initialize_child_internal((parent), (propname), \
> + (child), sizeof(*(child)), (type))
> +
The error is due to kerneldoc treating the macro definition like a
function, so that makes sense. If the docs look good (no reference to
object_initialize_child_internal) then the patch can be applied.
Paolo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 17:30 ` Paolo Bonzini
@ 2020-10-02 17:55 ` Eduardo Habkost
0 siblings, 0 replies; 21+ messages in thread
From: Eduardo Habkost @ 2020-10-02 17:55 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Michal Prívozník, John Snow, qemu-devel
On Fri, Oct 02, 2020 at 07:30:17PM +0200, Paolo Bonzini wrote:
> On 02/10/20 19:26, Michal Prívozník wrote:
> > On 10/2/20 6:22 PM, Eduardo Habkost wrote:
> >> On Fri, Oct 02, 2020 at 05:58:55PM +0200, Michal Prívozník wrote:
> >>> On 9/30/20 9:58 PM, Paolo Bonzini wrote:
> >>>>
> >>>> Eduardo Habkost (10):
> >>> <snip/>
> >>>> docs: Create docs/devel/qom.rst
> >>>
> >>> cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
> >>>
> >>> Sorry for noticing this earlier, but is this known? The build starts
> >>> failing
> >>> for me after this commit:
> >>>
> >>> /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
> >>> -Ddepfile=docs/devel.d
> >>> -Ddepfile_stamp=docs/devel.stamp -b html -d
> >>> /home/zippy/work/qemu/qemu.git/build/docs/devel.p
> >>> /home/zippy/work/qemu/qemu.git/docs/devel
> >>> /home/zippy/work/qemu/qemu.git/build/docs/devel
> >>> Running Sphinx v3.2.1
> >>> building [mo]: targets for 0 po files that are out of date
> >>> building [html]: targets for 20 source files that are out of date
> >>> updating environment: [new config] 20 added, 0 changed, 0 removed
> >>> reading sources... [100%] testing
> >>>
> >>>
> >>>
> >>>
> >>> Warning, treated as error:
> >>> /home/zippy/work/qemu/qemu.git/docs/../include/qom/object.h:747:Error in
> >>> declarator
> >>> If declarator-id with parameters (e.g., 'void f(int arg)'):
> >>> Invalid C declaration: Expected identifier in nested name. [error
> >>> at 24]
> >>> object_initialize_child ( parent, propname, child, type)
> >>> ------------------------^
> >>> If parenthesis in noptr-declarator (e.g., 'void (*f(int arg))(double)'):
> >>> Error in declarator or parameters
> >>> Invalid C declaration: Expecting "(" in parameters. [error at 32]
> >>> object_initialize_child ( parent, propname, child, type)
> >>> --------------------------------^
> >>>
> >>> make[1]: *** [Makefile.ninja:9898: docs/devel.stamp] Error 2
> >>> make[1]: *** Deleting file 'docs/devel.stamp'
> >>> make[1]: Leaving directory '/home/zippy/work/qemu/qemu.git/build'
> >>> make: *** [GNUmakefile:11: all] Error 2
> >>
> >> I can't reproduce it using Sphinx v2.2.2. I'm still trying to
> >> understand what exactly the error means.
> >>
> >
> > Same here.
> >
> >> I really wish we used virtualenv + requirements.txt to require a
> >> specific version of Sphinx instead of wasting time dealing a wide
> >> range of Sphinx versions.
> >>
> >
> > I already have a patch that I keep locally to build with v3:
> >
> > diff --git a/docs/qemu-option-trace.rst.inc
> > b/docs/qemu-option-trace.rst.inc
> > index 7e09773a9c..ae83f6a1a8 100644
> > --- a/docs/qemu-option-trace.rst.inc
> > +++ b/docs/qemu-option-trace.rst.inc
> > @@ -1,7 +1,7 @@
> >
> > Specify tracing options.
> >
> > -.. option:: [enable=]PATTERN
> > +.. option:: enable=PATTERN
> >
> > Immediately enable events matching *PATTERN*
> > (either event name or a globbing pattern). This option is only
> >
> >
> > That said, I'm not objecting to requiring v2 for now and switching to v3
> > later.
> >
> >
> > But interestingly, through trial and error I've came across this hack,
> > which allows me to build again. I have no idea why it works:
> >
> > diff --git i/include/qom/object.h w/include/qom/object.h
> > index 27aaa67e63..59c729ebb7 100644
> > --- i/include/qom/object.h
> > +++ w/include/qom/object.h
> > @@ -762,13 +762,14 @@ bool object_initialize_child_with_propsv(Object
> > *parentobj,
> > * child, sizeof(*child), type,
> > * &error_abort, NULL)
> > */
> > -#define object_initialize_child(parent, propname, child, type) \
> > - object_initialize_child_internal((parent), (propname), \
> > - (child), sizeof(*(child)), (type))
> > void object_initialize_child_internal(Object *parent, const char
> > *propname,
> > void *child, size_t size,
> > const char *type);
> >
> > +#define object_initialize_child(parent, propname, child, type) \
> > + object_initialize_child_internal((parent), (propname), \
> > + (child), sizeof(*(child)), (type))
> > +
>
> The error is due to kerneldoc treating the macro definition like a
> function, so that makes sense. If the docs look good (no reference to
> object_initialize_child_internal) then the patch can be applied.
The patch makes the document show object_initialize_child_internal().
--
Eduardo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 16:27 ` Paolo Bonzini
2020-10-02 17:01 ` Eduardo Habkost
@ 2020-10-02 18:24 ` Eduardo Habkost
2020-10-02 18:45 ` Paolo Bonzini
2020-10-07 10:57 ` Michal Privoznik
1 sibling, 2 replies; 21+ messages in thread
From: Eduardo Habkost @ 2020-10-02 18:24 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Michal Prívozník, qemu-devel, Peter Maydell
On Fri, Oct 02, 2020 at 06:27:35PM +0200, Paolo Bonzini wrote:
> On 02/10/20 17:58, Michal Prívozník wrote:
> >>
> >
> > cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
> >
> > Sorry for noticing this earlier, but is this known? The build starts
> > failing for me after this commit:
> >
> > /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
> > -Ddepfile=docs/devel.d -Ddepfile_stamp=docs/devel.stamp -b html -d
> > /home/zippy/work/qemu/qemu.git/build/docs/devel.p
> > /home/zippy/work/qemu/qemu.git/docs/devel
> > /home/zippy/work/qemu/qemu.git/build/docs/devel
> > Running Sphinx v3.2.1
> > building [mo]: targets for 0 po files that are out of date
> > building [html]: targets for 20 source files that are out of date
> > updating environment: [new config] 20 added, 0 changed, 0 removed
> > reading sources... [100%] testing
>
> No, this is new. It works with older versions of Sphinx (I have 2.2.2
> despite being on Fedora 32 which is pretty recent).
>
> For now Sphinx 3 is not supported by kerneldoc, we probably should apply
> a patch like
>
> https://www.spinics.net/lists/linux-doc/msg83277.html
We already have Sphinx 3.x hacks inside our fork of kernel-doc,
see commit 152d1967f650 ("kernel-doc: Use c:struct for Sphinx 3.0
and later").
If we want to keep deviating from upstream kernel-doc, the
following patch seems to work. Do we want to?
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 40ad782e342..03b49380426 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -838,6 +838,13 @@ sub output_function_rst(%) {
$lineprefix = "";
output_highlight_rst($args{'purpose'});
$start = "\n\n**Syntax**\n\n ``";
+ } elsif ($args{'functiontype'} eq "") {
+ # this is a macro, Sphinx 3.x requires c:macro::
+ if ((split(/\./, $sphinx_version))[0] >= 3) {
+ print ".. c:macro:: ";
+ } else {
+ print ".. c:function:: ";
+ }
} else {
print ".. c:function:: ";
}
>
> Paolo
>
--
Eduardo
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 18:24 ` Eduardo Habkost
@ 2020-10-02 18:45 ` Paolo Bonzini
2020-10-02 18:52 ` Peter Maydell
2020-10-07 10:57 ` Michal Privoznik
1 sibling, 1 reply; 21+ messages in thread
From: Paolo Bonzini @ 2020-10-02 18:45 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: Michal Prívozník, qemu-devel, Peter Maydell
On 02/10/20 20:24, Eduardo Habkost wrote:
> On Fri, Oct 02, 2020 at 06:27:35PM +0200, Paolo Bonzini wrote:
>> On 02/10/20 17:58, Michal Prívozník wrote:
>>>>
>>>
>>> cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
>>>
>>> Sorry for noticing this earlier, but is this known? The build starts
>>> failing for me after this commit:
>>>
>>> /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
>>> -Ddepfile=docs/devel.d -Ddepfile_stamp=docs/devel.stamp -b html -d
>>> /home/zippy/work/qemu/qemu.git/build/docs/devel.p
>>> /home/zippy/work/qemu/qemu.git/docs/devel
>>> /home/zippy/work/qemu/qemu.git/build/docs/devel
>>> Running Sphinx v3.2.1
>>> building [mo]: targets for 0 po files that are out of date
>>> building [html]: targets for 20 source files that are out of date
>>> updating environment: [new config] 20 added, 0 changed, 0 removed
>>> reading sources... [100%] testing
>>
>> No, this is new. It works with older versions of Sphinx (I have 2.2.2
>> despite being on Fedora 32 which is pretty recent).
>>
>> For now Sphinx 3 is not supported by kerneldoc, we probably should apply
>> a patch like
>>
>> https://www.spinics.net/lists/linux-doc/msg83277.html
>
> We already have Sphinx 3.x hacks inside our fork of kernel-doc,
> see commit 152d1967f650 ("kernel-doc: Use c:struct for Sphinx 3.0
> and later").
>
> If we want to keep deviating from upstream kernel-doc, the
> following patch seems to work. Do we want to?
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 40ad782e342..03b49380426 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -838,6 +838,13 @@ sub output_function_rst(%) {
> $lineprefix = "";
> output_highlight_rst($args{'purpose'});
> $start = "\n\n**Syntax**\n\n ``";
> + } elsif ($args{'functiontype'} eq "") {
> + # this is a macro, Sphinx 3.x requires c:macro::
> + if ((split(/\./, $sphinx_version))[0] >= 3) {
> + print ".. c:macro:: ";
> + } else {
> + print ".. c:function:: ";
> + }
> } else {
> print ".. c:function:: ";
> }
>>
>> Paolo
>>
>
I can try sending these to upstream Linux, too.
Paolo
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 18:45 ` Paolo Bonzini
@ 2020-10-02 18:52 ` Peter Maydell
0 siblings, 0 replies; 21+ messages in thread
From: Peter Maydell @ 2020-10-02 18:52 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Michal Prívozník, Eduardo Habkost, QEMU Developers
On Fri, 2 Oct 2020 at 19:45, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 02/10/20 20:24, Eduardo Habkost wrote:
> > We already have Sphinx 3.x hacks inside our fork of kernel-doc,
> > see commit 152d1967f650 ("kernel-doc: Use c:struct for Sphinx 3.0
> > and later").
> >
> > If we want to keep deviating from upstream kernel-doc, the
> > following patch seems to work. Do we want to?
> I can try sending these to upstream Linux, too.
I did mention the c:struct change we're carrying to Jon Corbet
when I sent him the missing-close-paren fix to kernel-doc
earlier this year:
http://lkml.iu.edu/hypermail/linux/kernel/2004.1/08760.html
I think it probably mostly needs somebody to try these changes
in the context of producing the kernel docs and see if they
are sufficient to fix kernel doc production too...
thanks
-- PMM
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PULL v8 00/86] Misc QEMU patches for 2020-09-24
2020-10-02 18:24 ` Eduardo Habkost
2020-10-02 18:45 ` Paolo Bonzini
@ 2020-10-07 10:57 ` Michal Privoznik
1 sibling, 0 replies; 21+ messages in thread
From: Michal Privoznik @ 2020-10-07 10:57 UTC (permalink / raw)
To: Eduardo Habkost, Paolo Bonzini; +Cc: Peter Maydell, qemu-devel
On 10/2/20 8:24 PM, Eduardo Habkost wrote:
> On Fri, Oct 02, 2020 at 06:27:35PM +0200, Paolo Bonzini wrote:
>> On 02/10/20 17:58, Michal Prívozník wrote:
>>>>
>>>
>>> cd442a45db60a1a72fcf980c24bd1227f13f8a87 is the first bad commit
>>>
>>> Sorry for noticing this earlier, but is this known? The build starts
>>> failing for me after this commit:
>>>
>>> /usr/bin/sphinx-build -Dversion=5.1.50 -Drelease= -W
>>> -Ddepfile=docs/devel.d -Ddepfile_stamp=docs/devel.stamp -b html -d
>>> /home/zippy/work/qemu/qemu.git/build/docs/devel.p
>>> /home/zippy/work/qemu/qemu.git/docs/devel
>>> /home/zippy/work/qemu/qemu.git/build/docs/devel
>>> Running Sphinx v3.2.1
>>> building [mo]: targets for 0 po files that are out of date
>>> building [html]: targets for 20 source files that are out of date
>>> updating environment: [new config] 20 added, 0 changed, 0 removed
>>> reading sources... [100%] testing
>>
>> No, this is new. It works with older versions of Sphinx (I have 2.2.2
>> despite being on Fedora 32 which is pretty recent).
>>
>> For now Sphinx 3 is not supported by kerneldoc, we probably should apply
>> a patch like
>>
>> https://www.spinics.net/lists/linux-doc/msg83277.html
>
> We already have Sphinx 3.x hacks inside our fork of kernel-doc,
> see commit 152d1967f650 ("kernel-doc: Use c:struct for Sphinx 3.0
> and later").
>
> If we want to keep deviating from upstream kernel-doc, the
> following patch seems to work. Do we want to?
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 40ad782e342..03b49380426 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -838,6 +838,13 @@ sub output_function_rst(%) {
> $lineprefix = "";
> output_highlight_rst($args{'purpose'});
> $start = "\n\n**Syntax**\n\n ``";
> + } elsif ($args{'functiontype'} eq "") {
> + # this is a macro, Sphinx 3.x requires c:macro::
> + if ((split(/\./, $sphinx_version))[0] >= 3) {
> + print ".. c:macro:: ";
> + } else {
> + print ".. c:function:: ";
> + }
> } else {
> print ".. c:function:: ";
> }
>>
>> Paolo
>>
>
I can confirm that this fixes the build for me.
Michal
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2020-10-07 11:04 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 19:58 [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Paolo Bonzini
2020-09-30 19:58 ` [PULL 29/86] meson: move libudev test Paolo Bonzini
2020-10-01 16:19 ` Peter Maydell
2020-10-01 16:55 ` Paolo Bonzini
2020-10-01 18:51 ` Peter Maydell
2020-10-01 19:15 ` Paolo Bonzini
2020-09-30 19:58 ` [PULL 30/86] meson: move libmpathpersist test Paolo Bonzini
2020-09-30 19:58 ` [PULL 31/86] meson: extend libmpathpersist test for static linking Paolo Bonzini
2020-10-01 14:28 ` [PULL v8 00/86] Misc QEMU patches for 2020-09-24 Peter Maydell
2020-10-01 15:41 ` 罗勇刚(Yonggang Luo)
2020-10-02 15:58 ` Michal Prívozník
2020-10-02 16:22 ` Eduardo Habkost
2020-10-02 17:26 ` Michal Prívozník
2020-10-02 17:30 ` Paolo Bonzini
2020-10-02 17:55 ` Eduardo Habkost
2020-10-02 16:27 ` Paolo Bonzini
2020-10-02 17:01 ` Eduardo Habkost
2020-10-02 18:24 ` Eduardo Habkost
2020-10-02 18:45 ` Paolo Bonzini
2020-10-02 18:52 ` Peter Maydell
2020-10-07 10:57 ` Michal Privoznik
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.