qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fix tests/migration/stress build


From: Alexey Perevalov
Subject: Re: [Qemu-devel] [PATCH] fix tests/migration/stress build
Date: Fri, 29 Sep 2017 18:05:13 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 09/29/2017 01:46 PM, Daniel P. Berrange wrote:
On Fri, Sep 29, 2017 at 01:11:13PM +0300, Alexey Perevalov wrote:
This small commit fixes build of tests/migration/stress on Ubuntu16.04
(on RHEL7.4 the same situation, after typical configure with following options
--target-list=x86_64-linux-user,i386-linux-user,x86_64-softmmu,i386-softmmu \
--enable-numa --enable-kvm --enable-vhost-net --enable-tpm --enable-debug \
  --disable-gtk )
PTHREAD_LIB is empty after successfully compiled pthread sample in configure.
tests/migration/stress relay on it, but -pthread is not there
and linker fails trying to resolve pthread symbols.

I still have a questions:
1. Is there a better way to obtain -thread option from QEMU_CFLAGS
2. Is linker options really necessary for stress application, because only -O3
is used, so w/o linker options in Makefile there is no need in PTHREAD_LIB
at all, I mean in whole project.
3. LINKPROG will be expanded into c++ firstly, and -static in
tests/Makefile.include will require static libstdc++, but configure doesn't
check it and in case of missing libstdc++-static.x86_64 (RHEL package name),
build will fail with the following message: "ld: cannot find -lstdc++",
I think here reasonably to use just $(CC) instead of LINKPROG, stress.c is on C.
Yeah, changing to $(CC) is fine - and adding -lpthread to the end of the
args instead of $PTHREAD_LIB
ok, but I think it's possible to swap CXX and CC in LINKPROG,
like that
-LINKPROG = $(or $(CXX),$(CC))
+LINKPROG = $(or $(CC), $(CXX))
in this case CC will be invoked early,
I think that issue with static library is general for all LINKPROG
usage, lie EXESUF and DSOSUF, isn't it?

Also ./tests/migration/guestperf.py can not be started w/o
super user privileges, and reports in this case something useless like this:
Error: [Errno 104] Connection reset by peer
IIRC, that's an Ubuntu problem - they pointlessly restrict their
/boot/vmlinuz files so you can't read them as non-root. Use the
--kernel arg to point to a readable image. There's no need for
the test to run privileged

Regards,
Daniel


--
Best regards,
Alexey Perevalov



reply via email to

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