I got tired of looking at this, so I wrote the little bit of shell code to simplistically guess the type of the list parameter to XawListChange. I just committed it to TL, r74082. Maybe it will work in practice? But I won't be surprised if I overlooked something that makes it fail. The diff is attached, I hope.
The gcc-14 is in Debian testing and we (Debian) intend to release soon. As said: the incompatibility is present for a while now (see build log using gcc-13). Finally one could argue that changing the API of libXaw without doing an so-name bump could be treated as bug on libXaw side.
Thanks for the investigations, Paul. That sort of -D + cast does not look like it could work for TL. I still don't see a plausible fix short of a configure test :(.
Unfortunately, I don't have any easy way to install gcc-14 (I'm using Debian-12 (bookworm, =stable), which doesn't have a gcc-14 package). However, looking in the various archives, I see that xdm-1.14 is compiling with -D_CONST_X_STRING (see https://gitlab.freedesktop.org/xorg/app/xdm/-/commit/2b451b9915e3a379974a3c2b5fe9d4798f0c136b) and then casts to _Xconst char : XawListChange (list, (_Xconst char ) newTable, size, 0, TRUE); I don't have much time to look into it further right now. Paul On Sat,...
The issue should not be closed. unfortunately, using String does not solve the problem in general. I suggested that in the thread around https://tug.org/pipermail/tex-k/2024-February/004012.html and it remains pointer-incompatible. I believe the only general fix suitable for upstream is a configure test to determine the type of the list parameter in the XawListChange function, and then cast to that type. The problem is that different systems have different incompatible types for that parameter, so...
I just noticed that the issue is specific to Debian and an incompatible change in libxaw7. Debian still has version 1.0.14, meanwhile the issue would not exist, when 1.0.16 would have been packaged. Here is the changelog from the libxaw source: commit d0fcbd9722ad691ca0b5873c98e8e9c236fa718b Author: Thomas E. Dickey dickey@invisible-island.net Date: Sun Mar 3 20:21:40 2024 -0500 amend change to XawListChange() My previous commit in July 2019 build-fixes when _CONST_X_STRING is defined modified the...
xdvi fails to build w/ gcc-14
Update copyright dates in main.c and string-utils.c
Add descriptions of "-debug find" and "-debug files" to the man page
Resolve xdvi crashing under MacOS after hitting `R' in some situations:
Pull in changes from TeX Live tree:
Avoid duplicate info symbol from .h file; update copyright dates
Fix segmentation fault that occurs when -debug is used with a non-numerical argument.
Widgets tiny on high resolution screens
dviout, a Windows dvi previewer supports tpic specials, as do the conversion programs dvips and dvipdfm.
Specification of tpic specials: http://ftp.tug.org/svn/dviout/trunk/htmlhelp/htmle/IDH_CMDTPIC.html?revision=229&view=co
tpic specials
Xdvik crashes scrolling down fast
Here dvi is a shell script !/bin/bash written by Sheen. Usage: dvi dvi invokes xdvi. Options are all passed onto acrorad. infile=$1; if [ $# -eq 1 ]; then case "${infile}" in .dvi) base=basename "${infile}" .dvi ;; .) base=basename "${infile}" . ;; *) base=basename "${infile}" ;; esac outfile="${base}".dvi else outfile=$2 fi if [ -e $outfile ]; then xdvi -s 3 -gamma 10. -fg black -bg grey85 -cr red -q -expertmode 4 $outfile & else echo $outfile does not exist.... fi
XDvi 22.87.04 (Xaw toolkit): Failed assertion
xdvi crashes with this file
Minor man page tweaks, and update version to 22.87.05.
eps picture overlays
xdvi crashes during string search
"Cannot convert string to type FontStruct error message
xdvik-22.87: build failure with toolkit Xaw3D
Version 22.87.04
Update support libraries from TeX Live 2020 (r53905)
Address some gcc-8 compile errors
Fixed in r3810
psgs.c: Fix erroneous comment in previous commit 01fa27
psgs.c: Fix bug in which PostScript images are truncated after changing page size
psgs.c: Fix bug in which PostScript images are truncated after changing page size
Fix kpathsea version in texk/kpathsea/configure
eps picture overlays
Fix bug #400 (eps picture overlays)
Fix bug #400 (eps picture overlays)
Fix the Ghostscript handler to work with gs 9.27
Some man page tweaks from Debian (TeX Live r50583, 2019-03-25)
Some man page tweaks from Debian, Norbert, and Karl (TeX Live r46371, 2018-01-18)
Add xdvi.desktop and a mechanism to install it (TeX Live r46347)
Upgrade kpathsea library to version 6.3.2/dev, from TeX Live (r51709)
Upgrade FreeType library to version 2.10.1, from TeX Live (r51709)
Incorporate build-related files from TeX Live (r51709)
Update documentation files from TeX Live (r51709), except libs/freetype2, texk/kpathsea, and texk/xdvik
Update documentation files specific to SourceForge
Rename README.CVS to README.SVN and update the file accordingly.
Delete subdirectory xdvi, which has been moved to the (git) repository
psgs.c: Fix bug in which PostScript diagrams did not appear, with ghostscript version 9.27.
Add support for newer versions of freetype2 (allow pkg-config) (configure.in,
Update configure test for XInput 2.1 functionality (from texlive 2016)
22.22 [30 November 1999] Implemented customization of mouse
22.09 [16 June 1999] Fixed a bug with handling of temporary files
22.27 [30 April 2000] Added an optimization for when the dvi file is
22.04 [7 April 1999] Added handlers for SIGINT, SIGQUIT, and SIGTERM
21.31
22.05 [14 April 1999] Another attempt to get xdvi to clean up after
21.33
22.10 [7 July 1999] Fixed a problem that caused rules to fail to
22.06 [10 May 1999] Renamed sendfile to avoid possible conflict with
22.17 [27 August 1999] Bug fixes.
22.14 [13 August 1999] Fixed a compilation problem with linux.
21.24
22.15 [19 August 1999] Worked around a bug in HP-UX, and made some
22.26 [1 March 2000] Fixed up some things I forgot to do in 22.24.
22.24 [18 January 2000] Fixed up the cursors for image dragging.
22.03 [25 March 1999] Cleaned up compiler errors on some platforms.
22.01 [15 February 1999] Added 'V' keystroke to toggle the -gsalpha
22.07 [15 May 1999] Removed register declarations on variables.
renamed some files from *-* to *_*
22.13 [10 August 1999] Some portability changes (esp. for Solaris
22.19 [5 November 1999] Compatibility changes (for machines that put
22.21 [27 November 1999] Fixed a bug concerning negative values of the
21.32
21.34
first import of Paul's xdvi branch, starting with xdvi-21.22
21.28
21.25
22.20 [24 November 1999] Improved the code for interrupting display of
21.27
22.08 [28 May 1999] Internal changes for HP-UX (added support for
22.31 [8 January 2001] Made xdvi look also for config file entries
22.23 [15 December 1999] Added support for wheel mice, implemented
21.30
22.18 [27 September 1999] Added the ability to customize the buttons,
22.30 [15 October 2000] Fixed some bugs in the filefind routines.
22.02 [22 February 1999] Fixed a bug in the Display PostScript
22.16 [25 August 1999] Added the ability to customize keystroke
21.23
21.29
22.29 [7 September 2000] Made a minor change in the module for
22.11 [14 July 1999] Added minimal support for the Xaw3d toolkit.