From: Bgs <bgs@bgs.hu>
To: christophe.varoqui@opensvc.com
Cc: dm-devel@redhat.com
Subject: Patch for readline undefined references
Date: Mon, 03 Feb 2014 10:23:42 +0100 [thread overview]
Message-ID: <52EF601E.3070508@bgs.hu> (raw)
[-- 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 --]
reply other threads:[~2014-02-03 9:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52EF601E.3070508@bgs.hu \
--to=bgs@bgs.hu \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.