From patchwork Mon Feb 3 09:23:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bgs X-Patchwork-Id: 3574411 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 55A28C02DC for ; Tue, 4 Feb 2014 09:14:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64F4420176 for ; Tue, 4 Feb 2014 09:14:51 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mail.kernel.org (Postfix) with ESMTP id 4F8ED20170 for ; Tue, 4 Feb 2014 09:14:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s149B58X018029; Tue, 4 Feb 2014 04:11:06 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s139NtK9006870 for ; Mon, 3 Feb 2014 04:23:56 -0500 Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.19]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s139NtSb015335 for ; Mon, 3 Feb 2014 04:23:55 -0500 Received: from mail.bgs.hu (bgs.hu [91.233.21.22]) by mx1.redhat.com (8.14.4/8.14.4) with SMTP id s139NlgB023280 for ; Mon, 3 Feb 2014 04:23:51 -0500 Received: (qmail 32531 invoked from network); 3 Feb 2014 09:23:42 -0000 Received: from unknown (HELO ?10.8.4.68?) (78.24.65.197) by 0 with SMTP; 3 Feb 2014 09:23:42 -0000 Message-ID: <52EF601E.3070508@bgs.hu> Date: Mon, 03 Feb 2014 10:23:42 +0100 From: Bgs User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: christophe.varoqui@opensvc.com X-RedHat-Spam-Score: -2.447 (BAYES_00, RP_MATCHES_RCVD, SPF_HELO_FAIL, SPF_PASS) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.19 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Tue, 04 Feb 2014 04:09:10 -0500 Cc: dm-devel@redhat.com Subject: [dm-devel] Patch for readline undefined references X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel 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