qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 17/63] stubs: include stubs only if needed


From: Zhao Liu
Subject: Re: [PULL 17/63] stubs: include stubs only if needed
Date: Wed, 5 Jun 2024 22:46:48 +0800

On Tue, Jun 04, 2024 at 11:07:30AM +0100, Daniel P. Berrangé wrote:
> Date: Tue, 4 Jun 2024 11:07:30 +0100
> From: "Daniel P. Berrangé" <berrange@redhat.com>
> Subject: Re: [PULL 17/63] stubs: include stubs only if needed
> 
> On Tue, Apr 23, 2024 at 05:09:05PM +0200, Paolo Bonzini wrote:
> > Currently it is not documented anywhere why some functions need to
> > be stubbed.
> > 
> > Group the files in stubs/meson.build according to who needs them, both
> > to reduce the size of the compilation and to clarify the use of stubs.
> > 
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > Message-ID: <20240408155330.522792-18-pbonzini@redhat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > ---
> >  stubs/{monitor.c => monitor-internal.c} |   0
> >  stubs/meson.build                       | 122 +++++++++++++++---------
> >  2 files changed, 75 insertions(+), 47 deletions(-)
> >  rename stubs/{monitor.c => monitor-internal.c} (100%)
> 
> This change breaks the build of many tests in the following situation:
> 
>   ./configure --disable-system --disable-user --disable-tools
> 
> $ makej
> changing dir to build for make ""...
> make[1]: Entering directory '/var/home/berrange/src/virt/qemu/build'
> [1/46] Generating qemu-version.h with a custom command (wrapped by meson to 
> capture output)
> [2/46] Linking target tests/bench/qht-bench
> FAILED: tests/bench/qht-bench 
> cc -m64  -o tests/bench/qht-bench tests/bench/qht-bench.p/qht-bench.c.o 
> -Wl,--as-needed -Wl,--no-undefined -pie -Wl,--whole-archive 
> libevent-loop-base.fa libqom.fa -Wl,--no-whole-archive 
> -fstack-protector-strong -Wl,-z,relro -Wl,-z,now -Wl,--start-group 
> libqemuutil.a libevent-loop-base.fa libqom.fa -lm -pthread 
> /usr/lib64/libglib-2.0.so /usr/lib64/libgmodule-2.0.so -Wl,--end-group
> /usr/bin/ld: libqemuutil.a.p/util_error-report.c.o: in function 
> `error_printf':
> /var/home/berrange/src/virt/qemu/build/../util/error-report.c:38:(.text+0x93):
>  undefined reference to `error_vprintf'
> /usr/bin/ld: libqemuutil.a.p/util_error-report.c.o: in function `vreport':
> /var/home/berrange/src/virt/qemu/build/../util/error-report.c:225:(.text+0x195):
>  undefined reference to `error_vprintf'
> collect2: error: ld returned 1 exit status
> [3/46] Linking target tests/unit/check-qdict
> FAILED: tests/unit/check-qdict 
> cc -m64  -o tests/unit/check-qdict tests/unit/check-qdict.p/check-qdict.c.o 
> -Wl,--as-needed -Wl,--no-undefined -pie -Wl,--whole-archive 
> libevent-loop-base.fa libqom.fa -Wl,--no-whole-archive 
> -fstack-protector-strong -Wl,-z,relro -Wl,-z,now -Wl,--start-group 
> libqemuutil.a libevent-loop-base.fa libqom.fa -lm -pthread 
> /usr/lib64/libglib-2.0.so /usr/lib64/libgmodule-2.0.so -Wl,--end-group
> /usr/bin/ld: libqemuutil.a.p/util_error-report.c.o: in function 
> `error_printf':
> /var/home/berrange/src/virt/qemu/build/../util/error-report.c:38:(.text+0x93):
>  undefined reference to `error_vprintf'
> /usr/bin/ld: libqemuutil.a.p/util_error-report.c.o: in function `vreport':
> /var/home/berrange/src/virt/qemu/build/../util/error-report.c:225:(.text+0x195):
>  undefined reference to `error_vprintf'
> collect2: error: ld returned 1 exit status
> [4/46] Linking target tests/unit/check-qstring
> FAILED: tests/unit/check-qstring 
> ...snip many more similar errors...
>

error-printf.c should be a common file in stub_ss, since bench test and
unit test both need qemuutil.

It seems the related previous fix 109f1a437f99 ("stubs: Add missing qga
stubs") is not a complete fix.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]