All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch for readline undefined references
@ 2014-02-03  9:23 Bgs
  0 siblings, 0 replies; only message in thread
From: Bgs @ 2014-02-03  9:23 UTC (permalink / raw)
  To: christophe.varoqui; +Cc: dm-devel

[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]


  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


[-- Attachment #2: multipath-tools-termcap-Bgs.patch --]
[-- Type: text/x-patch, Size: 1236 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-03  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03  9:23 Patch for readline undefined references Bgs

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.