From patchwork Tue Feb 5 21:47:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 10798519 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 9655A922 for ; Tue, 5 Feb 2019 21:47:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 815992C092 for ; Tue, 5 Feb 2019 21:47:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 710DD2C3F9; Tue, 5 Feb 2019 21:47: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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6BD8C2C092 for ; Tue, 5 Feb 2019 21:47:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D492B211CA2A5; Tue, 5 Feb 2019 13:47:17 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=vishal.l.verma@intel.com; receiver=linux-nvdimm@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 32A5E211BFCD0 for ; Tue, 5 Feb 2019 13:47:16 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2019 13:47:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,337,1544515200"; d="scan'208";a="317928843" Received: from vverma7-desk1.lm.intel.com ([10.232.112.170]) by fmsmga005.fm.intel.com with ESMTP; 05 Feb 2019 13:47:13 -0800 From: Vishal Verma To: Subject: [ndctl PATCH] ndctl: fix ndctl linking with libkeyutils Date: Tue, 5 Feb 2019 14:47:05 -0700 Message-Id: <20190205214705.1009-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Piotr Balcer Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP From: Piotr Balcer Compilation on Ubuntu 18.04 fails with: /usr/bin/ld: util/keys.o: undefined reference to symbol 'keyctl_read_alloc@@KEYUTILS_0.3' /lib/x86_64-linux-gnu/libkeyutils.so.1: error adding symbols: DSO missing from command line Seems like libkeyutils is incorrectly linked against libndctl, where in reality it's the ndctl application that uses keyutils. Cc: Dave Jiang Fixes: 86b078b44275 ("ndctl: add passphrase management commands") Signed-off-by: Piotr Balcer Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang --- ndctl/Makefile.am | 4 ++++ ndctl/lib/Makefile.am | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ndctl/Makefile.am b/ndctl/Makefile.am index 3287dbb..502271e 100644 --- a/ndctl/Makefile.am +++ b/ndctl/Makefile.am @@ -47,6 +47,10 @@ ndctl_LDADD =\ $(KMOD_LIBS) \ $(JSON_LIBS) +if ENABLE_KEYUTILS +ndctl_LDADD += -lkeyutils +endif + if ENABLE_TEST ndctl_SOURCES += ../test/libndctl.c \ ../test/dsm-fail.c \ diff --git a/ndctl/lib/Makefile.am b/ndctl/lib/Makefile.am index 99eaae0..7797039 100644 --- a/ndctl/lib/Makefile.am +++ b/ndctl/lib/Makefile.am @@ -30,10 +30,6 @@ libndctl_la_LIBADD =\ $(UUID_LIBS) \ $(KMOD_LIBS) -if ENABLE_KEYUTILS -libndctl_la_LIBADD += -lkeyutils -endif - EXTRA_DIST += libndctl.sym libndctl_la_LDFLAGS = $(AM_LDFLAGS) \