Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing library when linking list_smart_dimm #66

Closed
panlinux opened this issue Aug 20, 2018 · 2 comments
Closed

missing library when linking list_smart_dimm #66

panlinux opened this issue Aug 20, 2018 · 2 comments

Comments

@panlinux
Copy link

panlinux commented Aug 20, 2018

Hi,

when running make list-smart-dimm inside the test directory (which make check evetually does), I get this error:

test$ make list-smart-dimm
/bin/bash ../libtool  --tag=CC   --mode=link gcc -D DEF_CONF_FILE='"/etc/ndctl/monitor.conf"' -D DEF_TMPFS_DIR='"/run/ndctl"' -Wall -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wmaybe-uninitialized -Wdeclaration-after-statement -Wunused-result -D_FORTIFY_SOURCE=2 -O2 -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/home/ubuntu/git/ndctl=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,--gc-sections -Wl,--as-needed -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -o list-smart-dimm list-smart-dimm.o ../util/json.o ../ndctl/lib/libndctl.la ../daxctl/lib/libdaxctl.la -ljson-c ../libutil.a 
libtool: link: gcc -D DEF_CONF_FILE=\"/etc/ndctl/monitor.conf\" -D DEF_TMPFS_DIR=\"/run/ndctl\" -Wall -Wchar-subscripts -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wmaybe-uninitialized -Wdeclaration-after-statement -Wunused-result -D_FORTIFY_SOURCE=2 -O2 -fvisibility=hidden -ffunction-sections -fdata-sections -g -O2 -fdebug-prefix-map=/home/ubuntu/git/ndctl=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,--gc-sections -Wl,--as-needed -Wl,-Bsymbolic-functions -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/list-smart-dimm list-smart-dimm.o ../util/json.o  ../ndctl/lib/.libs/libndctl.so ../daxctl/lib/.libs/libdaxctl.so -ljson-c ../libutil.a
/usr/bin/ld: ../util/json.o: undefined reference to symbol 'uuid_is_null@@UUID_1.0'
/usr/bin/ld: //lib/x86_64-linux-gnu/libuuid.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:890: list-smart-dimm] Error 1

Looks like the uuid library was missed. This fixed it for me:

--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -162,4 +162,5 @@ list_smart_dimm_SOURCES = \
 list_smart_dimm_LDADD = \
 		$(LIBNDCTL_LIB) \
 		$(JSON_LIBS) \
+		$(UUID_LIBS) \
 		../libutil.a
@stellarhopper
Copy link
Member

stellarhopper commented Aug 20, 2018

@panlinux Thanks for the report. I've sent a patch to fix this: https://patchwork.kernel.org/patch/10570741/
I'll include it in the next 62.1 point release.

stellarhopper added a commit that referenced this issue Aug 21, 2018
Some environments automatically include the missing library dependency,
and others need it to be explicitly included.

Link: #66
Cc: QI Fuli <qi.fuli@jp.fujitsu.com>
Fixes: d194147 ("ndctl, test: add a new unit test for monitor")
Reviewed-by: QI Fuli <qi.fuli@jp.fujitsu.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
@djbw
Copy link
Member

djbw commented Nov 4, 2018

The fix was released in ndctl v63, please re-open if you still have issues.

@djbw djbw closed this as completed Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants