Title xemacs 21.5.31 fails compilation with +motif -xft
Type defect Module core build
Severity crash Platform N/A
Keywords Nosy List graaff
These controls should only be changed by committers and tracker administrators.
Status new   Reason
Priority normal   Assigned To

Created on 2011-06-30.18:23:35 by graaff, last changed 2011-07-07.04:57:55 by graaff.

msg2331 [hidden] ([hidden]) Date: 2011-07-07.04:57:55
Actually it turns out that this only happens when openmotif is compiled
with xft support and xemacs is compiled without it, which is not very
likely. In fact, with Gentoo we don't allow that combination, and I only
stumbled upon it by circumventing the system :-/

Still it's probably better to prefix such an internal define.
msg2323 [hidden] ([hidden]) Date: 2011-06-30.18:23:35
--with-widgets=motif --with-dialogs=motif --with-scrollbars=motif
--with-xft=no causes a compilation failure, at least with openmotif 2.3.3.

This happens because motif also defines USE_XFT and --with-xft=no does
not define HAVE_XFT in the source code, and then assumes that USE_XFT
won't be defined either. This leads to:

x86_64-pc-linux-gnu-gcc -c -Wall -Wno-switch -Wundef -Wsign-compare
-Wno-char-subscripts -Wpacked -Wshadow -Wmissing-declarations
-Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement 
-Wunused-parameter -g -O3 -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -Demacs -I.
-DHAVE_CONFIG_H -I/usr/X11R6/include redisplay-x.c
In file included from redisplay-x.c:33:
redisplay-xlike-inc.c: In function ‘separate_textual_runs_xft_mule’:
redisplay-xlike-inc.c:270: error: ‘XftChar16’ undeclared (first use in
this function)
redisplay-xlike-inc.c:270: error: (Each undeclared identifier is
reported only once
redisplay-xlike-inc.c:270: error: for each function it appears in.)
redisplay-xlike-inc.c:270: error: expected expression before ‘)’ token

I've applied the following fix in Gentoo:

	# Motif also defines USE_XFT so compiling with "motif -xft" fails,
	# since -xft turns off xft using HAVE_XFT and Motif enables only the
	# USE_XFT part.
	sed -i -e 's/USE_XFT/XEMACS_USE_XFT/' src/*xlike-inc* || die
Date User Action Args
2011-07-07 04:57:55graaffsetmessages: + msg2331
2011-06-30 18:23:35graaffcreate