* Linking gdb with -ltinfow, if libtinfo is not available
@ 2018-12-05 7:23 Дилян Палаузов
2018-12-05 14:49 ` Simon Marchi
0 siblings, 1 reply; 6+ messages in thread
From: Дилян Палаузов @ 2018-12-05 7:23 UTC (permalink / raw)
To: gdb-patches
See https://sourceware.org/bugzilla/show_bug.cgi?id=23950 for details.
diff --git a/gdb/configure.ac b/gdb/configure.ac
--- 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 tinfo tinfow curses ncursesw
ncurses])
if test "$ac_cv_search_tgetent" = no; then
CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linking gdb with -ltinfow, if libtinfo is not available
2018-12-05 7:23 Linking gdb with -ltinfow, if libtinfo is not available Дилян Палаузов
@ 2018-12-05 14:49 ` Simon Marchi
2018-12-05 16:42 ` Дилян Палаузов
0 siblings, 1 reply; 6+ messages in thread
From: Simon Marchi @ 2018-12-05 14:49 UTC (permalink / raw)
To: Дилян
Палаузов
Cc: gdb-patches
On 2018-12-05 02:22, ÐилÑн ÐалаÑзов wrote:
> See https://sourceware.org/bugzilla/show_bug.cgi?id=23950 for details.
>
> diff --git a/gdb/configure.ac b/gdb/configure.ac
> --- 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 tinfo tinfow curses ncursesw
> ncurses])
>
> if test "$ac_cv_search_tgetent" = no; then
> CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
I am not able to test this (since all my systems have a libtinfo.so,
which gets picked up), but I think it makes sense. If you have a system
where the only ncurses available is configured with:
--with-termlib --with-shared --enable-widec
you end up with libtinfow.so and no libtinfo.so. Any objections? I can
take care of ChangeLog and commit message since it is a very small
change, but next time please make sure to follow the checklist [1].
Thanks,
Simon
[1] https://sourceware.org/gdb/wiki/ContributionChecklist
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linking gdb with -ltinfow, if libtinfo is not available
2018-12-05 14:49 ` Simon Marchi
@ 2018-12-05 16:42 ` Дилян Палаузов
2018-12-05 19:59 ` Simon Marchi
0 siblings, 1 reply; 6+ messages in thread
From: Дилян Палаузов @ 2018-12-05 16:42 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
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.
Regards
ÐилÑн
On Wed, 2018-12-05 at 09:49 -0500, Simon Marchi wrote:
> On 2018-12-05 02:22, ÐилÑн ÐалаÑзов wrote:
> > See https://sourceware.org/bugzilla/show_bug.cgi?id=23950 for details.
> >
> > diff --git a/gdb/configure.ac b/gdb/configure.ac
> > --- 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 tinfo tinfow curses ncursesw
> > ncurses])
> >
> > if test "$ac_cv_search_tgetent" = no; then
> > CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
>
> I am not able to test this (since all my systems have a libtinfo.so,
> which gets picked up), but I think it makes sense. If you have a system
> where the only ncurses available is configured with:
>
> --with-termlib --with-shared --enable-widec
>
> you end up with libtinfow.so and no libtinfo.so. Any objections? I can
> take care of ChangeLog and commit message since it is a very small
> change, but next time please make sure to follow the checklist [1].
>
> Thanks,
>
> Simon
>
> [1] https://sourceware.org/gdb/wiki/ContributionChecklist
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linking gdb with -ltinfow, if libtinfo is not available
2018-12-05 16:42 ` Дилян Палаузов
@ 2018-12-05 19:59 ` Simon Marchi
2018-12-05 23:09 ` Дилян Палаузов
0 siblings, 1 reply; 6+ messages in thread
From: Simon Marchi @ 2018-12-05 19:59 UTC (permalink / raw)
To: Дилян
Палаузов,
Simon Marchi
Cc: gdb-patches
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 <simon.marchi@ericsson.com>
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 <simon.marchi@ericsson.com>
Дилян Палаузов <dilyan.palauzov@aegee.org>
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(-)
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"
--
2.19.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linking gdb with -ltinfow, if libtinfo is not available
2018-12-05 19:59 ` Simon Marchi
@ 2018-12-05 23:09 ` Дилян Палаузов
2018-12-09 0:44 ` Simon Marchi
0 siblings, 1 reply; 6+ messages in thread
From: Дилян Палаузов @ 2018-12-05 23:09 UTC (permalink / raw)
To: Simon Marchi, Simon Marchi; +Cc: gdb-patches
Hello,
my name is spelled correctly.
A further test would to have libtermcap and no libtinfo.so on the -L
explicit and implicit paths.
Regards
ÐилÑн
On Wed, 2018-12-05 at 19:59 +0000, Simon Marchi wrote:
> 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 <simon.marchi@ericsson.com>
> 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 <simon.marchi@ericsson.com>
> ÐилÑн ÐалаÑзов <dilyan.palauzov@aegee.org>
>
> 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(-)
>
> 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"
> --
> 2.19.2
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linking gdb with -ltinfow, if libtinfo is not available
2018-12-05 23:09 ` Дилян Палаузов
@ 2018-12-09 0:44 ` Simon Marchi
0 siblings, 0 replies; 6+ messages in thread
From: Simon Marchi @ 2018-12-09 0:44 UTC (permalink / raw)
To: Дилян
Палаузов
Cc: Simon Marchi, gdb-patches
On 2018-12-05 18:08, ÐилÑн ÐалаÑзов wrote:
> Hello,
>
> my name is spelled correctly.
Thanks, I pushed the patch.
> A further test would to have libtermcap and no libtinfo.so on the -L
> explicit and implicit paths.
Can you try and report if there's any problem?
Simon
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-12-09 0:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 7:23 Linking gdb with -ltinfow, if libtinfo is not available Дилян Палаузов
2018-12-05 14:49 ` Simon Marchi
2018-12-05 16:42 ` Дилян Палаузов
2018-12-05 19:59 ` Simon Marchi
2018-12-05 23:09 ` Дилян Палаузов
2018-12-09 0:44 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox