From patchwork Fri Jun 14 07:24:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10994573 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D3A614C0 for ; Fri, 14 Jun 2019 07:26:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05681223A1 for ; Fri, 14 Jun 2019 07:26:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED20B27DA4; Fri, 14 Jun 2019 07:26:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C840223A1 for ; Fri, 14 Jun 2019 07:26:42 +0000 (UTC) Received: from localhost ([::1]:48992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgbh-0000jw-Q4 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Jun 2019 03:26:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39253) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbga9-00079f-2o for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbga7-0004kY-PG for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35410) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbga5-0004hZ-Du; Fri, 14 Jun 2019 03:25:01 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60513859FE; Fri, 14 Jun 2019 07:24:55 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81227605CD; Fri, 14 Jun 2019 07:24:45 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 09:24:27 +0200 Message-Id: <20190614072432.820-2-philmd@redhat.com> In-Reply-To: <20190614072432.820-1-philmd@redhat.com> References: <20190614072432.820-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 14 Jun 2019 07:25:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , integration@gluster.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, =?utf-8?q?Lo=C3=AFc_Minier?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Bharata B Rao , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Niels de Vos Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP It is pointless and confusing to have GLUSTERFS variables in config-host.mak when glusterfs is not usable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Niels de Vos --- configure | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/configure b/configure index b091b82cb3..13fd4a1166 100755 --- a/configure +++ b/configure @@ -7118,30 +7118,30 @@ if test "$glusterfs" = "yes" ; then echo "CONFIG_GLUSTERFS=m" >> $config_host_mak echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak -fi -if test "$glusterfs_xlator_opt" = "yes" ; then - echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak -fi + if test "$glusterfs_xlator_opt" = "yes" ; then + echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak + fi -if test "$glusterfs_discard" = "yes" ; then - echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak -fi + if test "$glusterfs_discard" = "yes" ; then + echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak + fi -if test "$glusterfs_fallocate" = "yes" ; then - echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak -fi + if test "$glusterfs_fallocate" = "yes" ; then + echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak + fi -if test "$glusterfs_zerofill" = "yes" ; then - echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak -fi + if test "$glusterfs_zerofill" = "yes" ; then + echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak + fi -if test "$glusterfs_ftruncate_has_stat" = "yes" ; then - echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak -fi + if test "$glusterfs_ftruncate_has_stat" = "yes" ; then + echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak + fi -if test "$glusterfs_iocb_has_stat" = "yes" ; then - echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak + if test "$glusterfs_iocb_has_stat" = "yes" ; then + echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak + fi fi if test "$libssh2" = "yes" ; then From patchwork Fri Jun 14 07:24:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10994577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25CDC14C0 for ; Fri, 14 Jun 2019 07:28:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F65A223A1 for ; Fri, 14 Jun 2019 07:28:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03A7827DA4; Fri, 14 Jun 2019 07:28:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8CF4F223A1 for ; Fri, 14 Jun 2019 07:28:12 +0000 (UTC) Received: from localhost ([::1]:48998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgd9-00024o-S3 for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Jun 2019 03:28:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39323) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgaJ-0007PG-D1 for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbgaI-0004zN-AL for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49434) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbgaD-0004pp-5p; Fri, 14 Jun 2019 03:25:09 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5332B81DE9; Fri, 14 Jun 2019 07:25:08 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B9477C557; Fri, 14 Jun 2019 07:24:55 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 09:24:28 +0200 Message-Id: <20190614072432.820-3-philmd@redhat.com> In-Reply-To: <20190614072432.820-1-philmd@redhat.com> References: <20190614072432.820-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 14 Jun 2019 07:25:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/6] configure: Link test before auto-enabling glusterfs libraries X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , integration@gluster.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, =?utf-8?q?Lo=C3=AFc_Minier?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Bharata B Rao , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Niels de Vos Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Similarly to commit a73e82ef912, test the libraries link correctly before considering them as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-aarch64-softmmu [...] LINK aarch64-softmmu/qemu-system-aarch64 /usr/bin/ld: cannot find -lgfapi /usr/bin/ld: cannot find -lglusterfs /usr/bin/ld: cannot find -lgfrpc /usr/bin/ld: cannot find -lgfxdr collect2: error: ld returned 1 exit status Makefile:204: recipe for target 'qemu-system-aarch64' failed make[1]: *** [qemu-system-aarch64] Error 1 $ fgrep gf config-host.mak GLUSTERFS_LIBS=-lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid $ lsb_release -cri Distributor ID: Ubuntu Release: 18.04 Codename: bionic Signed-off-by: Philippe Mathieu-Daudé --- configure | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 13fd4a1166..3428adb75b 100755 --- a/configure +++ b/configure @@ -4179,9 +4179,23 @@ fi # glusterfs probe if test "$glusterfs" != "no" ; then if $pkg_config --atleast-version=3 glusterfs-api; then - glusterfs="yes" glusterfs_cflags=$($pkg_config --cflags glusterfs-api) - glusterfs_libs=$($pkg_config --libs glusterfs-api) + if test "$static" = "yes"; then + glusterfs_libs=$($pkg_config --libs --static glusterfs-api) + else + glusterfs_libs=$($pkg_config --libs glusterfs-api) + fi + # Packaging for the static libraries is not always correct. + # At least ubuntu 18.04 ships only shared libraries. + write_c_skeleton + if ! compile_prog "$glusterfs_cflags" "$glusterfs_libs" ; then + if test "$glusterfs" = "yes" ; then + error_exit "glusterfs check failed." + fi + glusterfs="no" + else + glusterfs="yes" + fi if $pkg_config --atleast-version=4 glusterfs-api; then glusterfs_xlator_opt="yes" fi From patchwork Fri Jun 14 07:24:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10994581 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E8C014C0 for ; Fri, 14 Jun 2019 07:29:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 839D82623D for ; Fri, 14 Jun 2019 07:29:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72A8B27E5A; Fri, 14 Jun 2019 07:29:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1EAC02623D for ; Fri, 14 Jun 2019 07:29:49 +0000 (UTC) Received: from localhost ([::1]:49024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgei-0004CO-Gu for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Jun 2019 03:29:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39401) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgaS-0007Vt-LB for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbgaQ-00057Y-MQ for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60932) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbgaN-00053Q-Fe; Fri, 14 Jun 2019 03:25:19 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B52763082126; Fri, 14 Jun 2019 07:25:18 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF6A160571; Fri, 14 Jun 2019 07:25:08 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 09:24:29 +0200 Message-Id: <20190614072432.820-4-philmd@redhat.com> In-Reply-To: <20190614072432.820-1-philmd@redhat.com> References: <20190614072432.820-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 14 Jun 2019 07:25:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/6] configure: Link test before auto-enabling the libusb library X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , integration@gluster.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, =?utf-8?q?Lo=C3=AFc_Minier?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Bharata B Rao , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Niels de Vos Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Similarly to commit a73e82ef912, test the library links correctly before considering it as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-aarch64-softmmu [...] LINK aarch64-softmmu/qemu-system-aarch64 /usr/bin/ld: cannot find -ludev collect2: error: ld returned 1 exit status Makefile:204: recipe for target 'qemu-system-aarch64' failed make[1]: *** [qemu-system-aarch64] Error 1 $ fgrep udev config-host.mak LIBUSB_LIBS=-lusb-1.0 -ludev -pthread $ lsb_release -cri Distributor ID: Ubuntu Release: 18.04 Codename: bionic Signed-off-by: Philippe Mathieu-Daudé --- configure | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 3428adb75b..e2511df1e3 100755 --- a/configure +++ b/configure @@ -4898,9 +4898,23 @@ fi # check for libusb if test "$libusb" != "no" ; then if $pkg_config --atleast-version=1.0.13 libusb-1.0; then - libusb="yes" libusb_cflags=$($pkg_config --cflags libusb-1.0) - libusb_libs=$($pkg_config --libs libusb-1.0) + if test "$static" = "yes"; then + libusb_libs=$($pkg_config --libs --static libusb-1.0) + else + libusb_libs=$($pkg_config --libs libusb-1.0) + fi + # Packaging for the static libraries is not always correct. + # At least ubuntu 18.04 ships only shared libraries. + write_c_skeleton + if ! compile_prog "$libusb_cflags" "$libusb_libs" ; then + if test "$libusb" = "yes" ; then + error_exit "libusb check failed." + fi + libusb="no" + else + libusb="yes" + fi else if test "$libusb" = "yes"; then feature_not_found "libusb" "Install libusb devel >= 1.0.13" From patchwork Fri Jun 14 07:24:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10994575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F6EB14C0 for ; Fri, 14 Jun 2019 07:27:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67C54223A1 for ; Fri, 14 Jun 2019 07:27:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B8D327DA4; Fri, 14 Jun 2019 07:27:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0931D223A1 for ; Fri, 14 Jun 2019 07:27:57 +0000 (UTC) Received: from localhost ([::1]:48996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgcv-0001im-9D for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Jun 2019 03:27:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39455) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgaY-0007ck-OT for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbgaX-0005De-MU for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33048) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbgaU-0005AE-JH; Fri, 14 Jun 2019 03:25:26 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C61983082134; Fri, 14 Jun 2019 07:25:25 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EAA660571; Fri, 14 Jun 2019 07:25:19 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 09:24:30 +0200 Message-Id: <20190614072432.820-5-philmd@redhat.com> In-Reply-To: <20190614072432.820-1-philmd@redhat.com> References: <20190614072432.820-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 14 Jun 2019 07:25:25 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/6] configure: Link test before auto-enabling the libusbredir library X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , integration@gluster.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, =?utf-8?q?Lo=C3=AFc_Minier?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Bharata B Rao , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Niels de Vos Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Similarly to commit a73e82ef912, test the library links correctly before considering it as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-aarch64-softmmu [...] LINK aarch64-softmmu/qemu-system-aarch64 /usr/bin/ld: cannot find -lusbredirparser collect2: error: ld returned 1 exit status Makefile:204: recipe for target 'qemu-system-aarch64' failed make[1]: *** [qemu-system-aarch64] Error 1 $ fgrep redir config-host.mak USB_REDIR_LIBS=-lusbredirparser $ lsb_release -cri Distributor ID: Ubuntu Release: 18.04 Codename: bionic Signed-off-by: Philippe Mathieu-Daudé --- configure | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/configure b/configure index e2511df1e3..4eed33e1b1 100755 --- a/configure +++ b/configure @@ -4926,9 +4926,23 @@ fi # check for usbredirparser for usb network redirection support if test "$usb_redir" != "no" ; then if $pkg_config --atleast-version=0.6 libusbredirparser-0.5; then - usb_redir="yes" usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5) - usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5) + if test "$static" = "yes"; then + usb_redir_libs=$($pkg_config --libs --static libusbredirparser-0.5) + else + usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5) + fi + # Packaging for the static libraries is not always correct. + # At least ubuntu 18.04 ships only shared libraries. + write_c_skeleton + if ! compile_prog "$usb_redir_cflags" "$usb_redir_libs" ; then + if test "$usb_redir" = "yes" ; then + error_exit "usbredir check failed." + fi + usb_redir="no" + else + usb_redir="yes" + fi else if test "$usb_redir" = "yes"; then feature_not_found "usb-redir" "Install usbredir devel" From patchwork Fri Jun 14 07:24:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10994583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E27FE1395 for ; Fri, 14 Jun 2019 07:30:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC93527E71 for ; Fri, 14 Jun 2019 07:30:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF42327F10; Fri, 14 Jun 2019 07:30:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 670F427E71 for ; Fri, 14 Jun 2019 07:30:11 +0000 (UTC) Received: from localhost ([::1]:49032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgf4-0004WF-LF for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Jun 2019 03:30:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39554) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgap-0008Fj-5F for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbgao-0005TG-1n for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:25:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42988) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbgal-0005PV-0w; Fri, 14 Jun 2019 03:25:43 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 169375945D; Fri, 14 Jun 2019 07:25:42 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 53BDB60637; Fri, 14 Jun 2019 07:25:26 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 09:24:31 +0200 Message-Id: <20190614072432.820-6-philmd@redhat.com> In-Reply-To: <20190614072432.820-1-philmd@redhat.com> References: <20190614072432.820-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 14 Jun 2019 07:25:42 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 5/6] configure: Link test before auto-enabling the pulseaudio library X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , integration@gluster.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, =?utf-8?q?Lo=C3=AFc_Minier?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Bharata B Rao , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Niels de Vos Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Similarly to commit a73e82ef912, test the library links correctly before considering it as usable. This fixes using ./configure --static on Ubuntu 18.04: $ make subdir-aarch64-softmmu [...] LINK aarch64-softmmu/qemu-system-aarch64 /usr/bin/ld: cannot find -lpulse /usr/bin/ld: cannot find -lpulsecommon-11.1 collect2: error: ld returned 1 exit status Makefile:204: recipe for target 'qemu-system-aarch64' failed make[1]: *** [qemu-system-aarch64] Error 1 $ fgrep pulse config-host.mak PULSE_LIBS=-L/usr/lib/aarch64-linux-gnu/pulseaudio -lpulse -lpulsecommon-11.1 $ lsb_release -cri Distributor ID: Ubuntu Release: 18.04 Codename: bionic Signed-off-by: Philippe Mathieu-Daudé --- configure | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 4eed33e1b1..4d015496ae 100755 --- a/configure +++ b/configure @@ -3408,10 +3408,25 @@ for drv in $audio_drv_list; do pa | try-pa) if $pkg_config libpulse --exists; then - pulse_libs=$($pkg_config libpulse --libs) - audio_pt_int="yes" - if test "$drv" = "try-pa"; then - audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/') + pulse_cflags=$($pkg_config --cflags libpulse) + if test "$static" = "yes"; then + pulse_libs=$($pkg_config --libs --static libpulse) + else + pulse_libs=$($pkg_config --libs libpulse) + fi + # Packaging for the static libraries is not always correct. + # At least ubuntu 18.04 ships only shared libraries. + write_c_skeleton + if ! compile_prog "$pulse_cflags" "$pulse_libs" ; then + unset pulse_cflags pulse_libs + if test "$drv" = "try-pa"; then + audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa//') + fi + else + audio_pt_int="yes" + if test "$drv" = "try-pa"; then + audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/') + fi fi else if test "$drv" = "try-pa"; then From patchwork Fri Jun 14 07:24:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 10994585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD5B71395 for ; Fri, 14 Jun 2019 07:32:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7C6327E5A for ; Fri, 14 Jun 2019 07:32:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BFDE27EED; Fri, 14 Jun 2019 07:32:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 49D5427E5A for ; Fri, 14 Jun 2019 07:32:19 +0000 (UTC) Received: from localhost ([::1]:49034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgh7-0005ri-KY for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Jun 2019 03:32:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39686) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbgb9-0008Li-AB for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:26:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbgb7-0005kh-9n for qemu-devel@nongnu.org; Fri, 14 Jun 2019 03:26:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57444) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hbgay-0005bR-4V; Fri, 14 Jun 2019 03:25:58 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C4D22F8BD7; Fri, 14 Jun 2019 07:25:55 +0000 (UTC) Received: from x1w.redhat.com (unknown [10.40.205.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 997A060637; Fri, 14 Jun 2019 07:25:42 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Date: Fri, 14 Jun 2019 09:24:32 +0200 Message-Id: <20190614072432.820-7-philmd@redhat.com> In-Reply-To: <20190614072432.820-1-philmd@redhat.com> References: <20190614072432.820-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 14 Jun 2019 07:25:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , integration@gluster.org, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , qemu-block@nongnu.org, =?utf-8?q?Lo=C3=AFc_Minier?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Bharata B Rao , Gerd Hoffmann , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Niels de Vos Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Philippe Mathieu-Daudé --- This job currently fails: LINK lm32-softmmu/qemu-system-lm32 /usr/bin/ld: cannot find -lgtk-3 /usr/bin/ld: cannot find -latk-bridge-2.0 /usr/bin/ld: cannot find -latspi /usr/bin/ld: cannot find -lsystemd /usr/bin/ld: cannot find -lgdk-3 /usr/bin/ld: cannot find -lwayland-egl /usr/bin/ld: cannot find -lmirclient /usr/bin/ld: cannot find -lmircore /usr/bin/ld: cannot find -lmircookie /usr/bin/ld: cannot find -lepoxy /usr/bin/ld: cannot find -latk-1.0 /usr/bin/ld: cannot find -lgdk_pixbuf-2.0 /usr/bin/ld: cannot find -lselinux /usr/bin/ld: cannot find -lgtk-3 /usr/bin/ld: cannot find -latk-bridge-2.0 /usr/bin/ld: cannot find -latspi /usr/bin/ld: cannot find -lsystemd /usr/bin/ld: cannot find -lgdk-3 /usr/bin/ld: cannot find -lwayland-egl /usr/bin/ld: cannot find -lmirclient /usr/bin/ld: cannot find -lmircore /usr/bin/ld: cannot find -lmircookie /usr/bin/ld: cannot find -lepoxy /usr/bin/ld: cannot find -latk-1.0 /usr/bin/ld: cannot find -lgdk_pixbuf-2.0 /usr/bin/ld: cannot find -lselinux /usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so' collect2: error: ld returned 1 exit status Makefile:204: recipe for target 'qemu-system-lm32' failed make[1]: *** [qemu-system-lm32] Error 1 Makefile:472: recipe for target 'subdir-lm32-softmmu' failed make: *** [subdir-lm32-softmmu] Error 2 --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 08502c0aa2..6962fff826 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,6 +92,11 @@ matrix: - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}" + # Test static linking + - env: + - CONFIG="--static --target-list=lm32-softmmu" + + # Just build tools and run minimal unit and softfloat checks - env: - BASE_CONFIG="--enable-tools"