From patchwork Wed Dec 5 19:59:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 30555 Received: (qmail 78035 invoked by alias); 5 Dec 2018 19:59:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 77913 invoked by uid 89); 5 Dec 2018 19:59:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.9 required=5.0 tests=BAYES_00, BODY_8BITS, GARBLED_BODY, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, MIME_BASE64_BLANKS autolearn=ham version=3.3.2 spammy=Marchi, marchi X-HELO: sessmg23.ericsson.net Received: from sessmg23.ericsson.net (HELO sessmg23.ericsson.net) (193.180.251.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Dec 2018 19:59:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; d=ericsson.com; s=mailgw201801; c=relaxed/simple; q=dns/txt; i=@ericsson.com; t=1544039961; x=1546631961; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:CC:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MO3gBvwcfM9C/qXYhxGNwmKKBXInc18snW5Drs1b6Nw=; b=QM4swrfSiNGg88pcLTXLcXHyOPnHnjNOinqn2+1fmhMGGcnkM0IhzK+Tc4O+uqsa 71bxy/23aRC2iVdASS1qp4aJx3DNikS9vlW8POfBA65azSCtGIttPtyFlyy7vLr/ Lm/3crT5gq7yVilbKUAlm7shh0YHpuBMC5a/oICQhoE=; Received: from ESESBMB501.ericsson.se (Unknown_Domain [153.88.183.114]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id A1.86.31473.91E280C5; Wed, 5 Dec 2018 20:59:21 +0100 (CET) Received: from ESESSMB501.ericsson.se (153.88.183.162) by ESESBMB501.ericsson.se (153.88.183.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 5 Dec 2018 20:59:21 +0100 Received: from NAM01-BY2-obe.outbound.protection.outlook.com (153.88.183.157) by ESESSMB501.ericsson.se (153.88.183.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3 via Frontend Transport; Wed, 5 Dec 2018 20:59:20 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MO3gBvwcfM9C/qXYhxGNwmKKBXInc18snW5Drs1b6Nw=; b=Lt196o3GaN1cULELM39ofWEIxMtAB2WSyQwK7MvV4LEuj6thW+ws3ZTRzYCTqoj48VUawaN8z6J6l3wZqqYSe3S2xhpciUjI5tTF1fM8YH2auyuzs0pnbFxRLd6DniAiEarKJnQPMiPzuCiUBL1EqbUX8i1m5eiEeaIu/pVQlvE= Received: from BYAPR15MB2390.namprd15.prod.outlook.com (52.135.198.30) by BYAPR15MB2216.namprd15.prod.outlook.com (52.135.196.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.21; Wed, 5 Dec 2018 19:59:18 +0000 Received: from BYAPR15MB2390.namprd15.prod.outlook.com ([fe80::2978:b8d7:86fd:94ed]) by BYAPR15MB2390.namprd15.prod.outlook.com ([fe80::2978:b8d7:86fd:94ed%3]) with mapi id 15.20.1382.023; Wed, 5 Dec 2018 19:59:18 +0000 From: Simon Marchi To: =?utf-8?B?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?= , Simon Marchi CC: "gdb-patches@sourceware.org" Subject: Re: Linking gdb with -ltinfow, if libtinfo is not available Date: Wed, 5 Dec 2018 19:59:18 +0000 Message-ID: References: <30919bd86dea123f624ccd1f069aff432622fb6e.camel@aegee.org> In-Reply-To: authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) Content-ID: <45E5C984C182994C9E795F30AF4A657C@namprd15.prod.outlook.com> MIME-Version: 1.0 Return-Path: simon.marchi@ericsson.com X-IsSubscribed: yes On 2018-12-05 11:41 a.m., Дилян Палаузов wrote: > Hello, > > you should be able to test this by having libtinfo.so in a directory, > that is not introduced to the linker by -L and is not default for the > compiller or linker and have libtinfow.so in а path passed by -L; > possibly moving libtinfo.so to a location that is still considered by > ldconfig. I tested this in a docker container, as to avoid messing up my system. I deleted all traces of libtinfo.so, compiled and installed ncurses by hand with --with-termlib --with-shared --enable-widec --prefix=/usr which got me a libtinfow.so. I was then able to reproduce the linking problem and confirm that your patch works (we just need to re-generate configure). So here's what I propose pushing. My cyrillic is not totally on point, does your name look good in the ChangeLog entry below? Or would you prefer to have a romanized version in there? From 70670e00263468aa36dce313d2241b5f953596af Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 5 Dec 2018 14:21:31 -0500 Subject: [PATCH] Look for tgetent in libtinfow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On some systems where ncurses is only available in the "wide" version (compiled with --with-widec), there might be no libtinfo.so, only a libtinfow.so. Look for libtinfow in addition to libtinfo. gdb/ChangeLog: YYYY-MM-DD Simon Marchi Дилян Палаузов PR gdb/23950 * configure.ac: Search for tgetent in libtinfow. * configure: Re-generate. --- gdb/configure | 2 +- gdb/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.19.2 diff --git a/gdb/configure b/gdb/configure index 7665ba65319..603c413fe8e 100755 --- a/gdb/configure +++ b/gdb/configure @@ -9027,7 +9027,7 @@ return tgetent (); return 0; } _ACEOF -for ac_lib in '' termcap tinfo curses ncursesw ncurses; do +for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do if test -z "$ac_lib"; then ac_res="none required" else diff --git a/gdb/configure.ac b/gdb/configure.ac index e1ea60660b9..b40c53a06cd 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -592,7 +592,7 @@ case $host_os in esac # These are the libraries checked by Readline. -AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncursesw ncurses]) +AC_SEARCH_LIBS(tgetent, [termcap tinfow tinfo curses ncursesw ncurses]) if test "$ac_cv_search_tgetent" = no; then CONFIG_OBS="$CONFIG_OBS stub-termcap.o"