qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL v2 00/50] Misc patches for 2017-09-19


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL v2 00/50] Misc patches for 2017-09-19
Date: Tue, 19 Sep 2017 16:16:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 19/09/2017 15:47, Peter Maydell wrote:
>   LINK    tests/ptimer-test
> duplicate symbol _qemu_bh_delete in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(async.o)
> duplicate symbol _qemu_clock_get_ns in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(qemu-timer.o)
> duplicate symbol _timer_init_tl in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(qemu-timer.o)
> duplicate symbol _qemu_clock_deadline_ns_all in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(qemu-timer.o)
> duplicate symbol _timer_del in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(qemu-timer.o)
> duplicate symbol _main_loop_tlg in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(qemu-timer.o)
> duplicate symbol _timer_mod in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(qemu-timer.o)
> duplicate symbol _qemu_bh_new in:
>     tests/ptimer-test-stubs.o
>     libqemuutil.a(main-loop.o)
> ld: 8 duplicate symbols for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)

What the patches changes is essentially

-tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o 
hw/core/ptimer.o libqemustub.a
+       libqemuutil.a
+tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o 
hw/core/ptimer.o libqemuutil.a

so I think what happens is that OS X was previously favoring a file from
libqemustub.a, while now it favors a file from libqemuutil.a, which brings
in async.o and main-loop.o.

Luckily it is pretty easy to drop libqemuutil.a from this test, which makes
sense since it provides its own mock timer subsystem:

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 0c644626e8..baa10e362d 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -618,7 +618,7 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
 tests/test-timed-average$(EXESUF): tests/test-timed-average.o 
$(test-util-obj-y)
 tests/test-base64$(EXESUF): tests/test-base64.o \
        libqemuutil.a
-tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o 
hw/core/ptimer.o $(test-util-obj-y)
+tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o 
hw/core/ptimer.o
 
 tests/test-logging$(EXESUF): tests/test-logging.o $(test-util-obj-y)
 
diff --git a/tests/ptimer-test-stubs.c b/tests/ptimer-test-stubs.c
index 8a1b0a336c..ca5cc3b13b 100644
--- a/tests/ptimer-test-stubs.c
+++ b/tests/ptimer-test-stubs.c
@@ -30,6 +30,10 @@ QEMUTimerListGroup main_loop_tlg;
 
 int64_t ptimer_test_time_ns;
 
+/* Do not artificially limit period - see hw/core/ptimer.c.  */
+int use_icount = 1;
+bool qtest_allowed;
+
 void timer_init_tl(QEMUTimer *ts,
                    QEMUTimerList *timer_list, int scale,
                    QEMUTimerCB *cb, void *opaque)

Paolo

> (I'll leave the rest of the merge tests running to see if they
> find anything else.)




reply via email to

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