[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/52] build-sys: fix qemu-ga -pthread linking
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 09/52] build-sys: fix qemu-ga -pthread linking |
Date: |
Fri, 12 Jan 2018 12:30:33 +0100 |
From: Marc-André Lureau <address@hidden>
When linking qemu-ga under some configuration (when gthread-2.0.pc
doesn't have -pthread, as happening atm with meson build), you may
have this linking issue:
/usr/bin/ld: libqemuutil.a(qemu-thread-posix.o): undefined reference to symbol
'pthread_setname_np@@GLIBC_2.12'
/usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line
Make sure qemu-ga links with the pthread library, by adding correct
flags to libs_qga.
This is really a QEMU bug, because it's QEMU code that's using pthread
functions, and so we must explicitly link against pthreads. The bug
was just masked by the fact that often some pkg-config or another for
one of our dependencies will add -pthread to the link line anyway.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
configure | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure b/configure
index 89bd662..ac392d2 100755
--- a/configure
+++ b/configure
@@ -3464,6 +3464,7 @@ else
done
if test "$found" = "no"; then
LIBS="$pthread_lib $LIBS"
+ libs_qga="$pthread_lib $libs_qga"
fi
PTHREAD_LIB="$pthread_lib"
break
--
1.8.3.1
- [Qemu-devel] [PULL 06/52] chardev: use backend chr context when watch for fe, (continued)
- [Qemu-devel] [PULL 06/52] chardev: use backend chr context when watch for fe, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 02/52] scsi: fix scsi_convert_sense crash when in_buf == NULL && in_len == 0, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 03/52] pc: fail memory hot-plug/unplug with -no-acpi and Q35 machine type, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 04/52] hpet: recover timer offset correctly, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 05/52] i386/cpu/kvm: look at PMU's CPUID before setting MSRs, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 07/52] chardev: let g_idle_add() be with chardev gcontext, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 08/52] chardev: introduce qemu_chr_timeout_add_ms(), Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 15/52] build-sys: add some sanitizers when --enable-debug if possible, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 10/52] build-sys: silence make by default or V=0, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 12/52] build-sys: compile with -Og or -O1 when --enable-debug, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 09/52] build-sys: fix qemu-ga -pthread linking,
Paolo Bonzini <=
- [Qemu-devel] [PULL 14/52] tests/docker: add test-debug, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 16/52] tests: fix check-qobject leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 13/52] tests/docker: add some sanitizers to fedora dockerfile, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 11/52] build-sys: add a rule to print a variable, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 17/52] vl: fix direct firmware directories leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 18/52] readline: add a free function, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 20/52] crypto: fix stack-buffer-overflow error, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 19/52] tests: fix migration-test leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 23/52] ucontext: annotate coroutine stack for ASAN, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 25/52] mips: fix potential fopen(NULL,...), Paolo Bonzini, 2018/01/12