After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 552096 - Detect tgetent if provided by libtinfo
Detect tgetent if provided by libtinfo
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.17.x
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-13 11:09 UTC by Patryk Zawadzki
Modified: 2008-12-02 22:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
The current patch we use (2.06 KB, patch)
2008-09-13 11:09 UTC, Patryk Zawadzki
none Details | Review
proposed patch (5.94 KB, patch)
2008-12-02 20:52 UTC, Christian Persch
committed Details | Review

Description Patryk Zawadzki 2008-09-13 11:09:26 UTC
In our ncurses 5.6, tgetent is provided by libtinfo, not by libncurses.

This bug is part of pushing PLD patches upstream.
Comment 1 Patryk Zawadzki 2008-09-13 11:09:42 UTC
Created attachment 118649 [details] [review]
The current patch we use
Comment 2 Christian Persch 2008-10-09 11:47:39 UTC
(In reply to comment #0)
> In our ncurses 5.6, tgetent is provided by libtinfo, not by libncurses.

Just to clarify, does that mean that this is a ncurses upstream feature, or does "our" imply it's a distro specific thing?
Comment 3 Patryk Zawadzki 2008-10-09 12:21:38 UTC
We use ncurses 5.6 patched up to 5.6-20080927 (official patches) - it doesn't seem to be a local change.
Comment 4 Behdad Esfahbod 2008-10-10 01:53:03 UTC
Are you using zdef linker stuff?  ncurses links to tgetent, right?
Comment 5 Patryk Zawadzki 2008-10-10 09:09:46 UTC
$ nm -D /usr/lib/libncurses.so | grep tget

$ nm -D /usr/lib/libtinfo.so | grep tget
0000a632 T tgetent
0000a48e T tgetflag
0000a3f0 T tgetnum
0000a521 T tgetstr

$ ldd /usr/lib/libncurses.so
	linux-gate.so.1 =>  (0xb7fd2000)
	libc.so.6 => /lib/libc.so.6 (0xb7e4e000)
	libdl.so.2 => /lib/libdl.so.2 (0xb7e4a000)
	libtinfo.so.5 => /lib/libtinfo.so.5 (0xb7e24000)
	/lib/ld-linux.so.2 (0xb7fd3000)

We link everything with --as-needed to eliminate unneeded deps so this might be part of the cause but in that case using libtinfo should also work for you (and fix it for us).
Comment 6 André Klapper 2008-11-21 22:42:41 UTC
*ping*
Comment 7 Behdad Esfahbod 2008-11-23 02:55:53 UTC
I like to fix this, but the part of configure.in the patch touches is so ugly I can't convince myself to commit the patch without a major cleanup of the configure stuff.  Lets see if Chris or ChPe beat me to it.
Comment 8 Christian Persch 2008-11-23 14:11:49 UTC
I had the same problem :) This code is totally intraceable, so I didn't want to risk touching it.
Comment 9 Christian Persch 2008-12-02 20:52:53 UTC
Created attachment 123825 [details] [review]
proposed patch

I tried to reverse-engineer that configure mess; this patch implements a hopefully more readable variant. I've added libtinfo checks in there. The lib check was adapted from bash's BASH_CHECK_LIB_TERMCAP; not sure the libc case is used on any platform or which headers to check for in this case...
Comment 10 Christian Persch 2008-12-02 20:54:01 UTC
I guess I could test this by just committing it and waiting for bug reports to come in :)
Comment 11 Behdad Esfahbod 2008-12-02 22:07:18 UTC
Sounds good to me.
Comment 12 Christian Persch 2008-12-02 22:10:38 UTC
Committed.