ANN: xterm-356

Dennis Clarke dclarke at blastwave.org
Thu May 14 16:06:47 UTC 2020


On 5/11/20 8:51 PM, Thomas Dickey wrote:
> On Mon, May 11, 2020 at 05:10:27PM +0000, Dennis Clarke wrote:
>> On 5/3/20 12:56 AM, Thomas Dickey wrote:
>> <snip>
>>>                               Patch #356 - 2020/05/02
>>>
>>>        * revise  fix  for  Debian #954730, which interfered with wheel mouse
>>>          events (report by Gabriele Balducci).
>>>
>>
>> I ran into problems on FreeBSD 12.1 wherein I was surprised to see this
>> error during the compile stage :
> 
> I did test with FreeBSD 12.1, but didn't run into this problem.
> I don't recall making any recent change in this area, either.
>

Sorry for the delay and late reply.

I will look into this again today with FreeBSD 12.1 :


vesta$
vesta$ freebsd-version
12.1-RELEASE-p4
vesta$ uname -apKU
FreeBSD vesta 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 GENERIC  amd64 
amd64 1201000 1201000
vesta$


Also Red Hat Enterprise Linux 7.4 :

b$
b$ uname -a
Linux boe13.genunix.com 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 
EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
b$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
b$

Possibly Debian on IBM Power9 ppc64le if I can get to it.


>> misc.o print.o ptydata.o scrollback.o screen.o scrollbar.o tabs.o util.o
>> version.o xstrings.o xtermcap.o VTPrsTbl.o TekPrsTbl.o Tekproc.o charclass.o
>> precompose.o wcwidth.o html.o svg.o -lutil -lXaw -lXmu -lXt -lSM -lICE
>> -lXext -lXpm -lXt -lX11 -lSM -lICE
> ...
> 
> my generated makefile does this:
> 
> /bin/sh ./plink.sh gcc -g -O2 -pthread -pthread -pthread -pthread -pthread   -o resize resize.o version.o xstrings.o -lXft -L/usr/local/lib -lfontconfig -lfreetype -lXext -lutil -lXaw7 -L/usr/local/lib -lXmu -lXinerama -lXpm -L/usr/local/lib -lXt -lX11 -lSM -lICE -ltermcap
> 
> My configure script said this:
> 
> checking if we want full tgetent function... yes
> checking for full tgetent function... -ltermcap
> checking for termcap.h... yes
> 
>> ld: error: undefined symbol: tgetstr
>>>>> referenced by xtermcap.c:247 (./xtermcap.c:247)
>>>>>                xtermcap.o:(loadTermcapStrings)
> 
> I'd suppose that the configure script didn't succeed in the check for
> libtermcap -- which is actually a symbolic link to ncurses:
> 
> $ ls -l /usr/lib/libtermc*
> lrwxr-xr-x  1 root  wheel  12 Dec  6  2018 /usr/lib/libtermcap.a -> libncurses.a
> lrwxr-xr-x  1 root  wheel  13 Dec  6  2018 /usr/lib/libtermcap.so -> libncurses.so
> lrwxr-xr-x  1 root  wheel  14 Dec  6  2018 /usr/lib/libtermcap_p.a -> libncurses_p.a
> lrwxr-xr-x  1 root  wheel  13 Dec  6  2018 /usr/lib/libtermcapw.a -> libncursesw.a
> lrwxr-xr-x  1 root  wheel  14 Dec  6  2018 /usr/lib/libtermcapw.so -> libncursesw.so
> lrwxr-xr-x  1 root  wheel  15 Dec  6  2018 /usr/lib/libtermcapw_p.a -> libncursesw_p.a
> 
> 
>> To be clear I was trying to compile with strict C99 and also with
>> XOPEN_SOURCE defined at '600' which should keep me safely within the
>> POSIX "IEEE Std 1003.1, 2004 Edition" world.  Usually works fine.
> 
> usually :-)
>   
>> My compiler was the typical system LLVM/Clang version in FreeBSD :
>>
>>
>> vesta$ cc --version
>> FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM
>> 8.0.1)
>> Target: x86_64-unknown-freebsd12.1
>> Thread model: posix
>> InstalledDir: /usr/bin
>> vesta$
>>
>> With some rather strict flags and verbose warnings :
>>
>>
>>
>> CC=/usr/bin/cc
>> CFLAGS=-std=iso9899:1999 -pedantic -pedantic-errors -Weverything
>> -Wno-reserved-id-macro -Wno-missing-prototypes -m64 -g -O0 -fno-fast-math
>> -fno-builtin
>> CPPFLAGS=-D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE -D_TS_ERRNO
>> -D_XOPEN_SOURCE=600
>> CXX=/usr/bin/c++
>> CXXFLAGS=-m64 -g -O0 -fno-fast-math -fno-builtin -Wl,-rpath=/opt/bw/lib
>>
>> I have also tried various gymnastics with the FreeBSD system ld linker
>> which appears to be the LLVM linker ld.lld.
>>
>> Configure always runs clean and outputs a strange message as the last
>> line but not an error state :
> 
> ...yes - error-handling is a problem, because (when I can), I just report
> the problem in the configure script, and try to produce something that
> works.
>   
>> checking if POSIX saved-ids are supported... yes
>> checking if we want full tgetent function... yes
>> checking for full tgetent function... no
>> checking for partial tgetent function... no
> 
> well...,. the problem is this: the last test for tgetent fails
> because there's no prototype (cannot compile) rather than the intended
> runtime check.
> 
> The existence check (for tgetent) succeeds since that just uses "nm".
> 
> The original BSD termcap had no headers for declaring prototypes.
> That's only done in later stuff.  You'll notice a termcap.h file,
> which is from ncurses.  I don't check for that by default because
> a real termcap implementation (other than the GNU termcap which
> Slackware still uses...) hasn't got that header.

I will take a look into FreeBSD ports and see how they handle XTerm :



vesta$ cd xterm
vesta$ pwd
/usr/ports/x11/xterm

vesta$ ls -lap
total 48
drwxr-xr-x    3 root  wheel     8 Mar 17 23:56 ./
drwxr-xr-x  549 root  wheel   550 Mar 17 23:56 ../
-rw-r--r--    1 root  wheel  3097 Feb  3 05:53 Makefile
-rw-r--r--    1 root  wheel   279 Feb  3 05:53 distinfo
drwxr-xr-x    2 root  wheel     3 Mar 17 23:56 files/
-rw-r--r--    1 root  wheel   480 May 17  2019 pkg-descr
-rw-r--r--    1 root  wheel   506 Aug 14  2019 pkg-message.wchar
-rw-r--r--    1 root  wheel   635 Jan 22  2014 pkg-plist
vesta$
vesta$ cat  distinfo
TIMESTAMP = 1580708699
SHA256 (xterm-353.tgz) = 
e521d3ee9def61f5d5c911afc74dd5c3a56ce147c7071c74023ea24cac9bb768
SIZE (xterm-353.tgz) = 1407183
SHA256 (bsd-xterm-icons-1.tgz) = 
fcf51dce0e23e9911a16ed7f2ce835bb6ff2ada65f023c29fdd8abda2795bf7c
SIZE (bsd-xterm-icons-1.tgz) = 22718
vesta$
vesta$
vesta$ more Makefile
# Created by: krion
# $FreeBSD: head/x11/xterm/Makefile 525014 2020-02-03 05:53:36Z ehaupt $

PORTNAME=       xterm
PORTVERSION=    353
PORTREVISION=   1
CATEGORIES=     x11
MASTER_SITES=   ftp://ftp.invisible-island.net/xterm/:src1 \
                 https://invisible-mirror.net/archives/xterm/:src1 \
                 LOCAL/ehaupt:src1 LOCAL/ehaupt:src2
DISTFILES=      ${DISTNAME}${EXTRACT_SUFX}:src1 \
                 bsd-xterm-icons-${ICONVERSION}${EXTRACT_SUFX}:src2

MAINTAINER=     ehaupt at FreeBSD.org
COMMENT=        Terminal emulator for the X Window System

LICENSE=        MIT
LICENSE_FILE=   ${WRKSRC}/COPYING

USES=           cpe localbase ncurses tar:tgz xorg
USE_XORG=       xft xmu xt x11 xext xpm ice

GNU_CONFIGURE=  yes

CPE_VENDOR=     invisible-island

CONFIGURE_ARGS+=        --with-utempter --enable-narrowproto

CONFLICTS=      x11iraf-[0-9]*

ICONVERSION=    1

OPTIONS_DEFINE= WCHAR LUIT DECTERM PCRE DABBREV 256COLOR SIXEL GNOME 
LOGGING \
                 SCRNDUMP REGIS TOOLBAR XINERAMA
OPTIONS_RADIO=  3D
OPTIONS_RADIO_3D=       XAW3D XAW3DXFT NEXTAW

DABBREV_DESC=   Enable support for dabbrev-expand
DECTERM_DESC=   Enable DECterm Locator support
LUIT_DESC=      Use LUIT for locale convertion from/to UTF-8
SIXEL_DESC=     Enable Sixel graphics support
REGIS_DESC=     Enable ReGIS graphics support
WCHAR_DESC=     Enable wide-character support
256COLOR_DESC=  Enable 256-color support
LOGGING_DESC=   Enable logging terminal I/O to a file
XAW3D_DESC=     Link with Xaw 3d library
XAW3DXFT_DESC=  Link with Xaw 3d xft (extended fonts) library
NEXTAW_DESC=    Link with neXT Athena library
SCRNDUMP_DESC=  Enable XHTML and SVG screen dumps
TOOLBAR_DESC=   Enable pulldown menus with a toolbar

OPTIONS_DEFAULT=WCHAR LUIT 256COLOR

256COLOR_CONFIGURE_ENABLE=      256-color
LUIT_BUILD_DEPENDS=             luit:x11/luit
LUIT_CONFIGURE_ENABLE=          luit
LUIT_IMPLIES=                   WCHAR
WCHAR_CONFIGURE_ENABLE=         wide-chars
WCHAR_VARS=                     PKGMESSAGE="${PKGDIR}/pkg-message.wchar"
DECTERM_CONFIGURE_ENABLE=       dec-locator
PCRE_CONFIGURE_WITH=            pcre
PCRE_LIB_DEPENDS=               libpcre.so:devel/pcre
DABBREV_CONFIGURE_ENABLE=       dabbrev
SIXEL_CONFIGURE_ENABLE=         sixel-graphics
REGIS_CONFIGURE_ENABLE=         regis-graphics
GNOME_USES=                     desktop-file-utils
LOGGING_CONFIGURE_ENABLE=       logging
SCRNDUMP_CONFIGURE_ENABLE=      screen-dumps
XAW3D_CONFIGURE_WITH=           Xaw3d
XAW3D_LIB_DEPENDS=              libXaw3d.so:x11-toolkits/Xaw3d
XAW3DXFT_CONFIGURE_WITH=        Xaw3dxft
XAW3DXFT_LIB_DEPENDS=           libXaw3dxft.so:x11-toolkits/libxaw3dxft
NEXTAW_CONFIGURE_WITH=          neXtaw
NEXTAW_LIB_DEPENDS=             libneXtaw.so:x11-toolkits/neXtaw
TOOLBAR_CONFIGURE_ENABLE=       toolbar
WCHAR_LIB_DEPENDS=              libfreetype.so:print/freetype2
XINERAMA_USE=                   XORG=xinerama,xorgproto
XINERAMA_CONFIGURE_OFF=         --without-xinerama

LIB_DEPENDS+=   libfontconfig.so:x11-fonts/fontconfig

.include <bsd.port.options.mk>

.if ! ${PORT_OPTIONS:MXAW3D} && ! ${PORT_OPTIONS:MXAW3DXFT} && ! 
${PORT_OPTIONS:MNEXTAW}
USE_XORG+=      xaw
.endif

post-extract:
         @${CP} ${WRKDIR}/bsd-xterm-icons-1/*.png \
                 ${WRKDIR}/bsd-xterm-icons-1/*.xpm \
                         ${WRKSRC}/icons/

post-install:
.for f in koi8rxterm resize uxterm xterm
         @${CHMOD} ${BINMODE} ${STAGEDIR}${PREFIX}/bin/${f}
.endfor
         ${INSTALL_DATA} ${WRKSRC}/xterm.desktop \
                 ${STAGEDIR}${PREFIX}/share/applications/

.include <bsd.port.mk>
vesta$


Pretty darn up to date and no real surprises there.

I should see what happens if I change that to 356 but I bet
it all "just works"(tm).


> 
> In the more typical case, the script would find the terminfo interface
> (and the associated term.h file), but FreeBSD base doesn't _do_ that.
> 
> Given all of that, I can improve the configure script by checking for
> this case and disabling the tcap-query feature for FreeBSD if the
> configure script isn't able to compile/link the tgetent function.
> 

I'll mess around with this a bit today and let you know what I see, if
anything.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional


More information about the xorg mailing list