* [PATCH v3 0/1] plugins: fix win plugin tests on cross compile @ 2023-11-09 12:43 Greg Manning 2023-11-09 12:43 ` [PATCH v3 1/1] " Greg Manning ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Greg Manning @ 2023-11-09 12:43 UTC (permalink / raw) To: qemu-devel Cc: Alex Bennée, Paolo Bonzini, Philippe Mathieu-Daudé, Greg Manning v1-v2: Added the signed-off-by line. v2-v3: Fixed the issue reference. Greg Manning (1): plugins: fix win plugin tests on cross compile .gitlab-ci.d/crossbuilds.yml | 2 +- contrib/plugins/Makefile | 2 +- plugins/meson.build | 2 +- tests/plugin/meson.build | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) -- 2.42.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/1] plugins: fix win plugin tests on cross compile 2023-11-09 12:43 [PATCH v3 0/1] plugins: fix win plugin tests on cross compile Greg Manning @ 2023-11-09 12:43 ` Greg Manning 2023-11-09 14:08 ` Philippe Mathieu-Daudé 2023-11-09 15:13 ` [PATCH v3 0/1] " Alex Bennée 2023-11-09 16:04 ` Alex Bennée 2 siblings, 1 reply; 7+ messages in thread From: Greg Manning @ 2023-11-09 12:43 UTC (permalink / raw) To: qemu-devel Cc: Alex Bennée, Paolo Bonzini, Philippe Mathieu-Daudé, Greg Manning Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1972 Cross compile gcc is more picky about argument order than msys. Changed the meson command to take the (now renamed) libqemu_plugin_api.a as a lib, rather than an object. This puts it in the right place on both native and cross compile gcc commands Reenable plugins on crossbuilds Signed-off-by: Greg Manning <gmanning@rapitasystems.com> --- .gitlab-ci.d/crossbuilds.yml | 2 +- contrib/plugins/Makefile | 2 +- plugins/meson.build | 2 +- tests/plugin/meson.build | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index ac71a2abd3..56dd603a86 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -165,7 +165,7 @@ cross-win32-system: job: win32-fedora-cross-container variables: IMAGE: fedora-win32-cross - EXTRA_CONFIGURE_OPTS: --enable-fdt=internal --disable-plugins + EXTRA_CONFIGURE_OPTS: --enable-fdt=internal CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu microblazeel-softmmu mips64el-softmmu nios2-softmmu artifacts: diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 1783750cf6..0b64d2c1e3 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -49,7 +49,7 @@ all: $(SONAMES) $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $< ifeq ($(CONFIG_WIN32),y) -lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/qemu_plugin_api.lib +lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/libqemu_plugin_api.a $(CC) -shared -o $@ $^ $(LDLIBS) else ifeq ($(CONFIG_DARWIN),y) lib%$(SO_SUFFIX): %.o diff --git a/plugins/meson.build b/plugins/meson.build index 40d24529c0..6b2d7a9292 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -28,7 +28,7 @@ if get_option('plugins') # then use dlltool to assemble a delaylib. win32_qemu_plugin_api_lib = configure_file( input: win32_plugin_def, - output: 'qemu_plugin_api.lib', + output: 'libqemu_plugin_api.a', command: [dlltool, '--input-def', '@INPUT@', '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] ) diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build index 528bb9d86c..28a929dbcc 100644 --- a/tests/plugin/meson.build +++ b/tests/plugin/meson.build @@ -4,7 +4,8 @@ if get_option('plugins') if targetos == 'windows' t += shared_module(i, files(i + '.c') + '../../contrib/plugins/win32_linker.c', include_directories: '../../include/qemu', - objects: [win32_qemu_plugin_api_lib], + link_depends: [win32_qemu_plugin_api_lib], + link_args: ['-Lplugins', '-lqemu_plugin_api'], dependencies: glib) else -- 2.42.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/1] plugins: fix win plugin tests on cross compile 2023-11-09 12:43 ` [PATCH v3 1/1] " Greg Manning @ 2023-11-09 14:08 ` Philippe Mathieu-Daudé 0 siblings, 0 replies; 7+ messages in thread From: Philippe Mathieu-Daudé @ 2023-11-09 14:08 UTC (permalink / raw) To: Greg Manning, qemu-devel; +Cc: Alex Bennée, Paolo Bonzini On 9/11/23 13:43, Greg Manning wrote: > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1972 > > Cross compile gcc is more picky about argument order than msys. Changed > the meson command to take the (now renamed) libqemu_plugin_api.a as a > lib, rather than an object. This puts it in the right place on both > native and cross compile gcc commands > > Reenable plugins on crossbuilds > > Signed-off-by: Greg Manning <gmanning@rapitasystems.com> > --- > .gitlab-ci.d/crossbuilds.yml | 2 +- > contrib/plugins/Makefile | 2 +- > plugins/meson.build | 2 +- > tests/plugin/meson.build | 3 ++- > 4 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/1] plugins: fix win plugin tests on cross compile 2023-11-09 12:43 [PATCH v3 0/1] plugins: fix win plugin tests on cross compile Greg Manning 2023-11-09 12:43 ` [PATCH v3 1/1] " Greg Manning @ 2023-11-09 15:13 ` Alex Bennée 2023-11-09 16:04 ` Alex Bennée 2 siblings, 0 replies; 7+ messages in thread From: Alex Bennée @ 2023-11-09 15:13 UTC (permalink / raw) To: Greg Manning; +Cc: qemu-devel, Paolo Bonzini, Philippe Mathieu-Daudé Greg Manning <gmanning@rapitasystems.com> writes: > v1-v2: Added the signed-off-by line. > v2-v3: Fixed the issue reference. > > Greg Manning (1): > plugins: fix win plugin tests on cross compile > > .gitlab-ci.d/crossbuilds.yml | 2 +- > contrib/plugins/Makefile | 2 +- > plugins/meson.build | 2 +- > tests/plugin/meson.build | 3 ++- > 4 files changed, 5 insertions(+), 4 deletions(-) Queued to for-8.2/random-fixes, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/1] plugins: fix win plugin tests on cross compile 2023-11-09 12:43 [PATCH v3 0/1] plugins: fix win plugin tests on cross compile Greg Manning 2023-11-09 12:43 ` [PATCH v3 1/1] " Greg Manning 2023-11-09 15:13 ` [PATCH v3 0/1] " Alex Bennée @ 2023-11-09 16:04 ` Alex Bennée 2023-11-09 16:34 ` Paolo Bonzini 2023-11-09 19:27 ` Greg Manning 2 siblings, 2 replies; 7+ messages in thread From: Alex Bennée @ 2023-11-09 16:04 UTC (permalink / raw) To: Greg Manning; +Cc: qemu-devel, Paolo Bonzini, Philippe Mathieu-Daudé Greg Manning <gmanning@rapitasystems.com> writes: > v1-v2: Added the signed-off-by line. > v2-v3: Fixed the issue reference. > > Greg Manning (1): > plugins: fix win plugin tests on cross compile > > .gitlab-ci.d/crossbuilds.yml | 2 +- > contrib/plugins/Makefile | 2 +- > plugins/meson.build | 2 +- > tests/plugin/meson.build | 3 ++- > 4 files changed, 5 insertions(+), 4 deletions(-) Actually I'm still seeing failures: FAILED: qemu-system-aarch64.exe x86_64-w64-mingw32-gcc -m64 -mcx16 @qemu-system-aarch64.exe.rsp /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: libcommon.fa.p/os-win32.c.obj: in function `set_dll_delaylink_hook': /builds/stsquad/qemu/build/../os-win32.c:83: undefined reference to `g_module_symbol' /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: /builds/stsquad/qemu/build/../os-win32.c:89: undefined reference to `g_module_symbol' collect2: error: ld returned 1 exit status [2104/3331] Linking target qemu-system-aarch64w.exe FAILED: qemu-system-aarch64w.exe x86_64-w64-mingw32-gcc -m64 -mcx16 @qemu-system-aarch64w.exe.rsp /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: libcommon.fa.p/os-win32.c.obj: in function `set_dll_delaylink_hook': /builds/stsquad/qemu/build/../os-win32.c:83: undefined reference to `g_module_symbol' /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: /builds/stsquad/qemu/build/../os-win32.c:89: undefined reference to `g_module_symbol' collect2: error: ld returned 1 exit status [2105/3331] Compiling C object libqemu-loongarch64-softmmu.fa.p/hw_loongarch_virt.c.obj ninja: build stopped: subcommand failed. make: *** [Makefile:162: run-ninja] Error 1 Should I drop the other patch I grabbed: plugins: Move the windows linking function to qemu ? -- Alex Bennée Virtualisation Tech Lead @ Linaro ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/1] plugins: fix win plugin tests on cross compile 2023-11-09 16:04 ` Alex Bennée @ 2023-11-09 16:34 ` Paolo Bonzini 2023-11-09 19:27 ` Greg Manning 1 sibling, 0 replies; 7+ messages in thread From: Paolo Bonzini @ 2023-11-09 16:34 UTC (permalink / raw) To: Alex Bennée; +Cc: Greg Manning, qemu-devel, Philippe Mathieu-Daudé [-- Attachment #1: Type: text/plain, Size: 300 bytes --] Il gio 9 nov 2023, 17:04 Alex Bennée <alex.bennee@linaro.org> ha scritto: > Should I drop the other patch I grabbed: > > plugins: Move the windows linking function to qemu > Yes, go ahead and drop it. Paolo > ? > > -- > Alex Bennée > Virtualisation Tech Lead @ Linaro > > [-- Attachment #2: Type: text/html, Size: 880 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 0/1] plugins: fix win plugin tests on cross compile 2023-11-09 16:04 ` Alex Bennée 2023-11-09 16:34 ` Paolo Bonzini @ 2023-11-09 19:27 ` Greg Manning 1 sibling, 0 replies; 7+ messages in thread From: Greg Manning @ 2023-11-09 19:27 UTC (permalink / raw) To: Alex Bennée Cc: qemu-devel@nongnu.org, Paolo Bonzini, Philippe Mathieu-Daudé Alex Bennée <alex.bennee@linaro.org> writes: > Greg Manning <gmanning@rapitasystems.com> writes: > > v1-v2: Added the signed-off-by line. > > v2-v3: Fixed the issue reference. > > > > Greg Manning (1): > > plugins: fix win plugin tests on cross compile > > > > .gitlab-ci.d/crossbuilds.yml | 2 +- > > contrib/plugins/Makefile | 2 +- > > plugins/meson.build | 2 +- > > tests/plugin/meson.build | 3 ++- > > 4 files changed, 5 insertions(+), 4 deletions(-) > Actually I'm still seeing failures: > FAILED: qemu-system-aarch64.exe > x86_64-w64-mingw32-gcc -m64 -mcx16 @qemu-system-aarch64.exe.rsp > /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: libcommon.fa.p/os-win32.c.obj: in function `set_dll_delaylink_hook': > /builds/stsquad/qemu/build/../os-win32.c:83: undefined reference to `g_module_symbol' > /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: /builds/stsquad/qemu/build/../os-win32.c:89: undefined reference to `g_module_symbol' > collect2: error: ld returned 1 exit status > [2104/3331] Linking target qemu-system-aarch64w.exe > FAILED: qemu-system-aarch64w.exe > x86_64-w64-mingw32-gcc -m64 -mcx16 @qemu-system-aarch64w.exe.rsp > /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: libcommon.fa.p/os-win32.c.obj: in function `set_dll_delaylink_hook': > /builds/stsquad/qemu/build/../os-win32.c:83: undefined reference to `g_module_symbol' > /usr/lib/gcc/x86_64-w64-mingw32/12.2.1/../../../../x86_64-w64-mingw32/bin/ld: /builds/stsquad/qemu/build/../os-win32.c:89: undefined reference to `g_module_symbol' > collect2: error: ld returned 1 exit status > [2105/3331] Compiling C object libqemu-loongarch64-softmmu.fa.p/hw_loongarch_virt.c.obj > ninja: build stopped: subcommand failed. > make: *** [Makefile:162: run-ninja] Error 1 Oh, that's weird. I can't immediately repro it on WSL. It reminds me of the thing I had to do to get the plugins to compile - they needed glib passing to the linker explicitly (in contrib/plugins/Makefile): LDLIBS += $(shell $(PKG_CONFIG) --libs glib-2.0) Greg. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-11-09 19:28 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-11-09 12:43 [PATCH v3 0/1] plugins: fix win plugin tests on cross compile Greg Manning 2023-11-09 12:43 ` [PATCH v3 1/1] " Greg Manning 2023-11-09 14:08 ` Philippe Mathieu-Daudé 2023-11-09 15:13 ` [PATCH v3 0/1] " Alex Bennée 2023-11-09 16:04 ` Alex Bennée 2023-11-09 16:34 ` Paolo Bonzini 2023-11-09 19:27 ` Greg Manning
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).