qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, famz@redhat.com, eblake@redhat.com,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PATCH v3 01/18] build-sys: fix qemu-ga -pthread linking
Date: Thu,  4 Jan 2018 17:05:06 +0100	[thread overview]
Message-ID: <20180104160523.22995-2-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20180104160523.22995-1-marcandre.lureau@redhat.com>

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 <marcandre.lureau@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure b/configure
index 100309c33f..de1f939a28 100755
--- a/configure
+++ b/configure
@@ -3445,6 +3445,7 @@ else
       done
       if test "$found" = "no"; then
         LIBS="$pthread_lib $LIBS"
+        libs_qga="$pthread_lib $libs_qga"
       fi
       PTHREAD_LIB="$pthread_lib"
       break
-- 
2.15.1.355.g36791d7216

  reply	other threads:[~2018-01-04 16:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04 16:05 [Qemu-devel] [PATCH v3 00/18] Various build-sys and sanitizer related fixes Marc-André Lureau
2018-01-04 16:05 ` Marc-André Lureau [this message]
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 02/18] build-sys: silence make by default or V=0 Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 03/18] build-sys: add a rule to print a variable Marc-André Lureau
2018-01-04 16:15   ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 04/18] build-sys: compile with -Og or -O1 when --enable-debug Marc-André Lureau
2018-01-04 17:17   ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 05/18] tests/docker: add some sanitizers to fedora dockerfile Marc-André Lureau
2018-01-04 17:11   ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 06/18] tests/docker: add test-debug Marc-André Lureau
2018-01-04 17:16   ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 07/18] build-sys: add some sanitizers when --enable-debug if possible Marc-André Lureau
2018-01-04 17:07   ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 08/18] tests: fix check-qobject leak Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 09/18] vl: fix direct firmware directories leak Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 10/18] readline: add a free function Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 11/18] tests: fix migration-test leak Marc-André Lureau
2018-01-04 17:28   ` Juan Quintela
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 12/18] crypto: fix stack-buffer-overflow error Marc-André Lureau
2018-01-04 16:40   ` Thomas Huth
2018-01-04 17:10     ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 13/18] qemu-config: fix leak in query-command-line-options Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 14/18] tests: fix qmp-test leak Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 15/18] ucontext: annotate coroutine stack for ASAN Marc-André Lureau
2018-01-09 11:09   ` Philippe Mathieu-Daudé
2018-01-09 11:10     ` Philippe Mathieu-Daudé
2018-01-09 11:23     ` Marc-André Lureau
2018-01-12 11:15       ` Marc-André Lureau
2018-01-12 11:21         ` Paolo Bonzini
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 16/18] tests: fix coroutine leak in /basic/entered Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 17/18] mips: fix potential fopen(NULL,...) Marc-André Lureau
2018-01-04 16:27   ` [Qemu-devel] [PATCH v3 17/18] mips: fix potential fopen(NULL, ...) Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 18/18] disas/s390: fix global-buffer-overflow Marc-André Lureau
2018-01-04 17:02 ` [Qemu-devel] [PATCH v3 00/18] Various build-sys and sanitizer related fixes no-reply
2018-01-05 10:20 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180104160523.22995-2-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).