Hello Christophe,
On some systems with libtermcap, readline produces undefined references
for some functions.
For example on my Slackware laptop:
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.1/../../../../lib64/libreadline.so:
undefined reference to `BC'
This is not a common problem, but it does show up on some systems.
The attached patch is a very simple solution. Addig libtermcap to the ld
flags solves the issue.
I'm not sure how it should be included (or not), but even if it's not,
it would be worth putting the info and patch on the web page.
Best regards
Zoltan Posfai
diff --git a/kpartx/Makefile b/kpartx/Makefile
index 4ba38ba..c95037f 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -12,7 +12,7 @@ ifneq ($(strip $(LIBDM_API_COOKIE)),0)
CFLAGS += -DLIBDM_API_COOKIE
endif
-LDFLAGS = -ldevmapper
+LDFLAGS = -ldevmapper -ltermcap
OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
EXEC = kpartx
diff --git a/multipath/Makefile b/multipath/Makefile
index 5e5958d..22d847a 100644
--- a/multipath/Makefile
+++ b/multipath/Makefile
@@ -7,7 +7,7 @@ include ../Makefile.inc
OBJS = main.o
CFLAGS += -I$(multipathdir)
-LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev
+LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev -ltermcap
EXEC = multipath
diff --git a/multipathd/Makefile b/multipathd/Makefile
index 781122a..ba892da 100644
--- a/multipathd/Makefile
+++ b/multipathd/Makefile
@@ -9,7 +9,7 @@ CFLAGS += -I$(multipathdir) -I$(mpathpersistdir)
ifdef SYSTEMD
CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD)
endif
-LDFLAGS += -lpthread -ldevmapper -lreadline
+LDFLAGS += -lpthread -ldevmapper -lreadline -ltermcap
ifdef SYSTEMD
LDFLAGS += -lsystemd-daemon
endif
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel