From patchwork Sat Apr 7 16:22:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 895945 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="vbBrnfwx"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40JML80cdmz9s2L for ; Sun, 8 Apr 2018 02:22:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2EA6787146; Sat, 7 Apr 2018 16:22:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tcovZLGLMCUH; Sat, 7 Apr 2018 16:22:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0DB3B870EE; Sat, 7 Apr 2018 16:22:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8F1171C2BF7 for ; Sat, 7 Apr 2018 16:22:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8C39388BD3 for ; Sat, 7 Apr 2018 16:22:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e4q6VLWSYbVg for ; Sat, 7 Apr 2018 16:22:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id AD80788912 for ; Sat, 7 Apr 2018 16:22:46 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id x82so8128759wmg.1 for ; Sat, 07 Apr 2018 09:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=peB0h+DmKH6rnFy7byuVL36c7vCDUCVciw5pd8StdC4=; b=vbBrnfwx56YBbfezV1aS1ODH7kC/6Z7mm9zhxwcZBkKEhNIwDrkKQchH1/fVz31JD3 qpPqqc26I6g7sdbn2v05B6n3rNJ1VgSWUxnoQGXl5NFo4peI6oVvWMMFqQ4zj7Rk7QUh OK5ipZ/pI5OMdgGR/r7TCytds4/K8HXC6fpTAkfolOeToA2E+fP+xfLQICZC2c2LCdH7 F+rGDnKkL3+F4GdmFex8FKWvZWRApG945/P0a3izCd+Cp8xJbp07oZLULWz6AqTdlX6w z/+mtGsWrsgMmyEeFfAsuX47LxzJOBDfe6rln2r+tDtMmtfuE2WDiRO+cZyGYb+YCl+9 x4RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=peB0h+DmKH6rnFy7byuVL36c7vCDUCVciw5pd8StdC4=; b=qcJX4EhO5JlmKUpYGmaz4Zwmmo8Q86EUHhYfYw1RaP4tByGwxgL1mJfAInsNlD62O9 Im4vPQWdWl8qq71Xu1g70yFj3Upwbvy791xQ/lrn5Dp64XeUeuNi7ew3jEUTPU+Wwe0y PhCJWMO57GTAVvEHfcguMdydE8cxJTIf2fBgh6Yc7X9q9sxnA7lmYDFMqMEq8jBGK+0O si6S2yK0oRMTaBQsnqnl0z0Z+NItjTdLSXtT1rFDu+HtbIm0QMy5/W9qoi5V4tC1OvSn 0rcPNPklJshnMq6yC1U/tF7aU7dXfYBqnh0ArA8BSTKOV3y4C6oixpc+pjqjH/vgHMdo fPow== X-Gm-Message-State: ALQs6tD8KsI+ONDC1tszM3mL7TgJJQ7uEXrhaCpGS5nBbLB6VuUrzENm O3bFOwA4LcUINv5fcm/QQ60Wfw== X-Google-Smtp-Source: AIpwx4+9CNols26Ak4cdelk/x9WyyTMKOr/Xg5UjQM5Z4MLp5cpfxjC5jI8vGX57eBntL1cLD+jWiQ== X-Received: by 10.28.64.11 with SMTP id n11mr14698899wma.62.1523118164686; Sat, 07 Apr 2018 09:22:44 -0700 (PDT) Received: from fabrice-VirtualBox.home (ARennes-656-1-397-39.w86-214.abo.wanadoo.fr. [86.214.149.39]) by smtp.gmail.com with ESMTPSA id n21sm17349750wmi.37.2018.04.07.09.22.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Apr 2018 09:22:43 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sat, 7 Apr 2018 18:22:34 +0200 Message-Id: <20180407162234.12848-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [Buildroot] [PATCH 1/1] lxc: fix build with static libcap and shared gnutls X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.net/results/b655d6853c25a195df28d91512b3ffb6c654fc90 Signed-off-by: Fabrice Fontaine --- ...tion-with-static-libcap-and-shared-gnutls.patch | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 package/lxc/0001-Fix-compilation-with-static-libcap-and-shared-gnutls.patch diff --git a/package/lxc/0001-Fix-compilation-with-static-libcap-and-shared-gnutls.patch b/package/lxc/0001-Fix-compilation-with-static-libcap-and-shared-gnutls.patch new file mode 100644 index 0000000000..9a0dcbe55a --- /dev/null +++ b/package/lxc/0001-Fix-compilation-with-static-libcap-and-shared-gnutls.patch @@ -0,0 +1,72 @@ +From 49bc916b1daa79cffe38fae32059bcdd985c8c8e Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sat, 7 Apr 2018 15:48:46 +0200 +Subject: [PATCH] Fix compilation with static libcap and shared gnutls + +Commit c06ed219c47098f34485d408410b6ecc94a40877 has broken +compilation with a static libcap and a shared gnutls. +This results in a build failure on init_lxc_static if gnutls is +a shared library as init_lxc_static is built with -all-static option +(see src/lxc/Makefile.am) and AC_CHECK_LIB adds gnutls to LIBS. + +This commit fix the issue by removing default behavior of AC_CHECK_LIB +and handling manually GNUTLS_LIBS and HAVE_LIBGNUTLS + +Fixes: + - http://autobuild.buildroot.net/results/b655d6853c25a195df28d91512b3ffb6c654fc90 + +Signed-off-by: Fabrice Fontaine +--- + configure.ac | 2 +- + src/lxc/Makefile.am | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 50c99836..2467bb54 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -263,7 +263,7 @@ AM_CONDITIONAL([ENABLE_GNUTLS], [test "x$enable_gnutls" = "xyes"]) + + AM_COND_IF([ENABLE_GNUTLS], + [AC_CHECK_HEADER([gnutls/gnutls.h],[],[AC_MSG_ERROR([You must install the GnuTLS development package in order to compile lxc])]) +- AC_CHECK_LIB([gnutls], [gnutls_hash_fast],[],[AC_MSG_ERROR([You must install the GnuTLS development package in order to compile lxc])]) ++ AC_CHECK_LIB([gnutls], [gnutls_hash_fast],[true],[AC_MSG_ERROR([You must install the GnuTLS development package in order to compile lxc])]) + AC_SUBST([GNUTLS_LIBS], [-lgnutls])]) + + # SELinux +diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am +index c8d76836..0662d83d 100644 +--- a/src/lxc/Makefile.am ++++ b/src/lxc/Makefile.am +@@ -175,6 +175,10 @@ if ENABLE_APPARMOR + AM_CFLAGS += -DHAVE_APPARMOR + endif + ++if ENABLE_GNUTLS ++AM_CFLAGS += -DHAVE_LIBGNUTLS ++endif ++ + if ENABLE_SELINUX + AM_CFLAGS += -DHAVE_SELINUX + endif +@@ -196,7 +200,7 @@ liblxc_la_LDFLAGS = \ + -Wl,-soname,liblxc.so.$(firstword $(subst ., ,@LXC_ABI@)) \ + -version-info @LXC_ABI_MAJOR@ + +-liblxc_la_LIBADD = $(CAP_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS) ++liblxc_la_LIBADD = $(CAP_LIBS) $(GNUTLS_LIBS) $(SELINUX_LIBS) $(SECCOMP_LIBS) + + bin_SCRIPTS= + +@@ -243,7 +247,7 @@ AM_LDFLAGS = -Wl,-E + if ENABLE_RPATH + AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir) + endif +-LDADD=liblxc.la @CAP_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@ ++LDADD=liblxc.la @CAP_LIBS@ @GNUTLS_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@ + + if ENABLE_TOOLS + lxc_attach_SOURCES = tools/lxc_attach.c tools/arguments.c tools/tool_utils.c +-- +2.14.1 +