All of lore.kernel.org
 help / color / mirror / Atom feed
* [ndctl PATCH] ndctl: fix ndctl linking with libkeyutils
@ 2019-02-05 21:47 Vishal Verma
  2019-02-05 21:49 ` Dave Jiang
  0 siblings, 1 reply; 2+ messages in thread
From: Vishal Verma @ 2019-02-05 21:47 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Piotr Balcer

From: Piotr Balcer <piotr.balcer@intel.com>

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 <dave.jiang@intel.com>
Fixes: 86b078b44275 ("ndctl: add passphrase management commands")
Signed-off-by: Piotr Balcer <piotr.balcer@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
 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) \
-- 
2.20.1

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [ndctl PATCH] ndctl: fix ndctl linking with libkeyutils
  2019-02-05 21:47 [ndctl PATCH] ndctl: fix ndctl linking with libkeyutils Vishal Verma
@ 2019-02-05 21:49 ` Dave Jiang
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Jiang @ 2019-02-05 21:49 UTC (permalink / raw)
  To: Vishal Verma, linux-nvdimm; +Cc: Piotr Balcer



On 2/5/19 2:47 PM, Vishal Verma wrote:
> From: Piotr Balcer <piotr.balcer@intel.com>
> 
> 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 <dave.jiang@intel.com>
> Fixes: 86b078b44275 ("ndctl: add passphrase management commands")
> Signed-off-by: Piotr Balcer <piotr.balcer@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>

Ah yeah it used to be in libndctl, but in the last round of changes it
was moved to ndctl/utils.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

> ---
>  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) \
> 
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-05 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-05 21:47 [ndctl PATCH] ndctl: fix ndctl linking with libkeyutils Vishal Verma
2019-02-05 21:49 ` Dave Jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.