81db39fb99f0053e836a949cb2b7c6439e53d064
[sxemacs] / PROBLEMS
1                                                   -*- mode:outline -*-
2
3 At the time of this release (SXEmacs 22.1.14), SXEmacs has the
4 following idiosyncrasies: 
5
6 * File Locations
7 ================
8
9 ** User init file (C-h v user-init-file)
10
11 SXEmacs searches for its init file in `~/.sxemacs/init.el'.
12 Symlinking your old ~/.xemacs directory should be enough to get you up
13 and running.
14
15     $ ln -s ~/.xemacs ~/.sxemacs RET
16
17 BTW, unlike XEmacs, SXEmacs doesn't attempt to "migrate" your old init
18 file or Gnu/Emacs .emacs file.
19
20 ** Packages Hierarchy
21
22 The default location that SXEmacs searches for packages is
23 `$prefix/share/sxemacs/'.  The same as for the user-init-file, a
24 symlink is all you need to get up and running.
25
26     $ ln -s /usr/local/lib/xemacs /usr/local/share/sxemacs RET
27
28
29 * Build Quirks
30 ==============
31
32 ** FFI
33
34 *** FFI is not included with your distro
35
36 Sadly, some Linux distributions (hello Fedora) don't ship a libffi
37 package, and their GCC does NOT include libffi or FFI headers either.
38 In this instance you have 2 options...
39
40   1) Get the standalone package of libffi at
41      <http://sourceware.org/libffi/>.
42
43   2) Compile your own GCC from source, making sure you enable the java
44      compiler.  Enabling java in your GCC build is the only way to get
45      libffi built.
46
47 Obviously, option #1 there is the easiest and quickest path to
48 FFI-enabled SXEmacsen, and it is the option that we recommend.
49
50 Oh, and please nag your distro to have FFI included by default.
51
52 *** FFI is included in your GCC but you see missing header errors
53
54 Often libffi headers aren't completely installed.  If you are getting
55 errors in effi.c that seem to be hinged from something like...
56
57   /usr/include/ffi.h:63:23: ffitarget.h: No such file or directory
58
59 You need to find `ffitarget.h' and put it in the same directory as
60 your `ffi.h'.  Your libffi came with GCC, so you'll find it within
61 your GCC directories:
62
63   $ dirname $(gcc -print-libgcc-file-name)
64 /usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.1
65
66 Using that example, ffitarget.h would be in...
67
68   /usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.1/libffi/
69
70 Just copy or symlink the ffitarget.h there to /usr/include
71
72 *** FFI on SELinux enabled machines
73
74 If you are running with SELinux enabled and configure fails with
75 messages like the following in `config.log'...
76
77   error while loading shared libraries: /usr/local/lib/libffi.so.1:
78   cannot restore segment prot after reloc: Permission denied
79
80 You need to correct the default security context for `libffi.so'.
81
82   $ chcon -t textrel_shlib_t /usr/local/lib/libffi.so
83
84 ** PostgreSQL
85
86 The autoconf tests for PostgreSQL support have changed.  SXEmacs'
87 configure script now uses `pg_config' to determine whether or not to
88 enable PostgreSQL.  Because of this you may have to set you $PATH
89 environment to include the pgsql bin directory.  It is normally
90 `/usr/local/pgsql/bin/'.  Another popular directory on Solaris 9 is
91 `/opt/crw/postgresql/bin/'.  Check with your site administrator.
92
93 Bash users can do it like this...
94
95   export PATH=/usr/local/pgsql/bin:$PATH
96
97 *** Solaris 9 with 64-bit PostgreSQL
98
99 There has also been a report that on Solaris 9 you may also need to
100 configure with `--with-cflags='-mcpu=ultrasparc -m64''.  Apparently
101 GCC on Solaris 9 defaults to building 32-bit, so you lose if you have
102 64-bit PostgreSQL.
103
104 ** 64-bit test suite failure
105
106 We have had a couple of reports of the test suite failing on 64-bit
107 systems.  The error is like this (or similar)...
108
109 Testing /usr/src/sxemacs/modules/ase/ase-heap-tests.el...
110 Loading ase_heap v0.0.0 (SXEmacs module: ase-heap)
111 Loaded module ase_heap v0.0.0 (SXEmacs module: ase-heap)Fatal error: assertion failed, file alloc.c, line 298, block != (void*)0xCAFEBABEDEADBEEF
112 make[3]: *** [check-am] Aborted
113
114 At this point we are not too sure exactly what the issue is.  It looks
115 like it might be a bug in the malloc or free code of the libc.  We do
116 know that not all 64-bit systems are affected, so far, only Fedora
117 Core 7, and Gentoo on x86_64.
118
119 One user has reported that using `-O1' in CFLAGS prevents it.
120
121 But even with this test failure, SXEmacs still runs and opperates
122 without incident.  In fact, the failure can't be reproduced when
123 running the test suite interactively.  With that in mind, it should be
124 safe to install if you see this failure.
125
126 We'll endeavour to get to the bottom of this one ASAP, if you think
127 you can help, let us know.
128
129 ** m4, libtool, autoconf, automake, and whatnot
130
131 SXEmacs tries to cope with any combination of versions of the above
132 programs.  However, there is one lower bound, autoconf 2.60, and
133 unfortunately this has an impact on the other parts of the build
134 tools.
135
136 To cut it really short, here is the minimum known-to-work combination:
137 - autoconf 2.62, automake 1.9.6, libtool 1.5.22, m4 1.4.6
138
139 In general we support (as of April, 2010):
140 - autoconf >= 2.62, including current git versions
141 - automake 1.9.6, 1.10, 1.10a, 1.11.1, and current git versions
142 - libtool 1.5.N with N >= 22, libtool >= 2.1a (current CVS version)
143 - m4 1.4.M with M >= 6 plus current git versions
144
145 Note that many libtool packages shipped with the distros (OpenSuSE,
146 Debian, just to name two) are _broken_.  Make sure you compile
147 your own libtool in case you want to rerun autogen.sh or bootstrap
148 the build chain, and double check that you use --enable-ltdl-install
149 when doing so.
150
151 If you are on a platform that has its own _non_gnu libtool (like OS/X
152 Leopard) add --program-prefix=g to your gnu libtool configure so it
153 installs as glibtool and doesn't clobber your other one.
154
155 Sometimes it helps just to copy over the libtool script manually:
156 cp -a $(type -p libtool) ${top_builddir}
157
158 *** ylwrap fails with sed errors
159
160 Some versions of the ylwrap script provided by autotools uses commas
161 as separators in sed commands. As such if your build path uses commas
162 the ylwrap will fail. 
163
164 Sample message (where the build path was /Users/njsf/Projects/SXEmacs/nsx-up/,,mac):
165
166 /Users/njsf/Projects/SXEmacs/nsx-up/,,mac/lib-src/make-docfile --modname cl-loop -E cl-loop.doc.c ../../../modules/cl/cl-loop.c
167 /bin/sh ../../../ylwrap ../../../modules/cl/cl-loop-parser.y y.tab.c cl-loop-parser.c y.tab.h cl-loop-parser.h y.output
168 cl-loop-parser.output -- bison -y  -d
169 sed: 1: "s,/Users/njsf/Projects/ ...": bad flag in substitute command: 'm'
170 sed: 1: "s,/Users/njsf/Projects/ ...": bad flag in substitute command: 'm'
171
172 The workaround is to use a path without commas in it.
173
174
175 *** Missing libltdl.la (Solaris 2.8)
176
177 We've had a report that missing libtool on Solaris 2.8 isn't detected
178 and so the included libtool still isn't used.  If you see an error
179 about a missing libltdl.la all you need to do is configure SXEmacs
180 with... 
181
182   --with-included-ltdl
183
184 ** configure
185
186 *** configure on FreeBSD, NetBSD, OpenBSD, etc.
187
188 Building SXEmacs on *BSD as far as we know requires the GNU Bourne
189 Again SHell (bash) versions 3 or 4.
190
191 bash is available for all tier 1 architectures as a binary package and 
192 and for tier 2/3 as a port.
193
194 To run configure successfully...
195
196     CONFIG_SHELL=/path/to/bash $CONFIG_SHELL configure [option, ...]
197
198 ** bdwgc and gcc and code optimisation
199
200 There are some weird optimisation issues with the Boehm-Demers-Weiser
201 garbage collector (hereafter BDWGC) and the GCC C compilers of the 2 and
202 3 series.  The build will crash like this:
203
204   Loading build-autoloads.el...
205   Loading loadup-el.el...
206   Loading loadup.el...make[3]: *** [auto-autoloads.el] Segmentation fault
207   (core dumped)
208   make[3]: Leaving directory
209
210 The C backtrace will look like:
211
212   #0  0xbff9a2f0 in ?? ()
213   #1  0xb7eaf7d6 in GC_invoke_finalizers () at finalize.c:787
214   #2  0xb7eaf8ed in GC_notify_or_invoke_finalizers () at finalize.c:844
215   #3  0xb7eb2c8c in GC_generic_malloc (lb=32, k=0) at malloc.c:190
216
217 If this is true for you, you may want to try another optimisation level:
218
219   ./configure CFLAGS="-g -O2"
220
221 If this still does not work out either dispense with BDWGC support or
222 use a recent C compiler.  ATTOW, all GCC 4.x compilers (including SVN)
223 should work.
224
225 ** ENT
226
227 ENT is basically a conglomerate of internally and externally implemented
228 arithmetics.  Hence it supports a number of libraries, some of which
229 overlap in their functionality, some others do not but then break at the
230 compatibility layer.
231
232 One of the most likely problems is the GMP vs. MPFR issue.  In past
233 times, mpfr (a multiprecision library for floats with exact rounding
234 facilities) has been a part of the GMP distribution.  Later on, mpfr got
235 separated from it and has been developed independently while the version
236 of mpfr which ships with GMP stayed the same.  Now that scenario is
237 exactly the problem.
238
239 Inattentive distributions (like Fedora) still deliver packages of GMP
240 with the old'n'incompatible mpfr library.  SXEmacs will disable the MPFR
241 support on such systems by default (at configure time).  However, if you
242 install a supported version of mpfr in parallel to the packaged ones on
243 such a system SXEmacs autodetection correctly reports that a sane
244 version of mpfr is available and enables it.  Nonetheless, the according
245 build may fail (or the build may even succeed but calling the binary may
246 fail), like this:
247
248 number-mpfr.o: In function `ent_lt_BIGFR_T':
249 /home/martin/src/edit/sxemacs-main/src/number-mpfr.c:661: undefined
250 reference to `mpfr_less_p'
251 number-mpfr.o: In function `ent_gt_BIGFR_T':
252 /home/martin/src/edit/sxemacs-main/src/number-mpfr.c:671: undefined
253 reference to `mpfr_greater_p'
254 ...
255
256 Especially note that we _only_ support the standalone version of MPFR,
257 and not the one distributed with GMP.
258
259 Solution:
260 ---------
261 Either:
262    Badger your distributor and demand separate packages for GMP and
263    MPFR.
264 Or:
265    Remove the GMP package and install your own build -- available at
266    http://swox.com/gmp -- afterwards install your own build of mpfr (the
267    one from http://www.mpfr.org)
268
269 Reconfigure and rebuild SXEmacs afterwards.
270
271
272 * XEmacs Packages
273 =================
274
275 We have identified 2 packages so far that don't work "out of the box"
276 with SXEmacs.  In both of these the problem is with parsing version
277 information.  Patches have been sent to the appropriate maintainer to
278 fix the problem and are included here in case the packages haven't
279 been updated by the time you install SXEmacs.
280
281 Update:  The EFS, and Dired XEmacs packages that are currently
282 available from the "Pre-Releases" area of XEmacs package mirrors are
283 both now compatible with SXEmacs and do not need the patches mentioned
284 here.
285
286 ** EFS
287
288 Here is the patch to make EFS work with SXEmacs:
289
290 (Note: the current EFS package that XEmacs distributes has this
291 patch installed) 
292
293 Index: ChangeLog
294 ===================================================================
295 RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/efs/ChangeLog,v
296 retrieving revision 1.41
297 diff -u -U0 -r1.41 ChangeLog
298 --- ChangeLog   4 Oct 2004 08:54:56 -0000       1.41
299 +++ ChangeLog   14 Jan 2005 02:43:10 -0000
300 @@ -0,0 +1,6 @@
301 +2005-01-14  Steve Youngs  <steve@sxemacs.org>
302 +
303 +       * efs-fnh.el (efs-handle-emacs-version): Use `emacs-*-version'
304 +       variables for version info instead of string-matching through
305 +       `emacs-version'. 
306 +
307 Index: efs-fnh.el
308 ===================================================================
309 RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/efs/efs-fnh.el,v
310 retrieving revision 1.13
311 diff -u -u -r1.13 efs-fnh.el
312 --- efs-fnh.el  2 Oct 2004 14:06:00 -0000       1.13
313 +++ efs-fnh.el  14 Jan 2005 02:42:59 -0000
314 @@ -36,15 +36,17 @@
315    (let ((ehev-match-data (match-data)))
316      (unwind-protect
317         (let ((xemacsp (string-match "XEmacs" emacs-version))
318 -             ver subver)
319 -         (or (string-match "^\\([0-9]+\\)\\.\\([0-9]+\\)" emacs-version)
320 -             (error "efs does not work with emacs version %s" emacs-version))
321 -         (setq ver (string-to-int (substring emacs-version
322 -                                             (match-beginning 1)
323 -                                             (match-end 1)))
324 -               subver (string-to-int (substring emacs-version
325 -                                                (match-beginning 2)
326 -                                                (match-end 2))))
327 +             (ver emacs-major-version)
328 +             (subver emacs-minor-version))
329 +         (unless ver
330 +           (or (string-match "^\\([0-9]+\\)\\.\\([0-9]+\\)" emacs-version)
331 +               (error "efs does not work with emacs version %s" emacs-version))
332 +           (setq ver (string-to-int (substring emacs-version
333 +                                               (match-beginning 1)
334 +                                               (match-end 1)))
335 +                 subver (string-to-int (substring emacs-version
336 +                                                  (match-beginning 2)
337 +                                                  (match-end 2)))))
338           (cond
339            
340            ;; XEmacs (emacs-version looks like \"19.xx XEmacs\")
341
342 ** Dired
343
344 Here is the patch to make Dired work with SXEmacs:
345
346 (Note: the current Dired package that XEmacs distributes has this
347 patch installed) 
348
349 Index: ChangeLog
350 ===================================================================
351 RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/dired/ChangeLog,v
352 retrieving revision 1.19
353 diff -u -U0 -r1.19 ChangeLog
354 --- ChangeLog   4 Oct 2004 08:54:24 -0000       1.19
355 +++ ChangeLog   14 Jan 2005 02:37:37 -0000
356 @@ -0,0 +1,7 @@
357 +2005-01-14  Steve Youngs  <steve@sxemacs.org>
358 +
359 +       * dired.el: Use `emacs-*-version' variables for finding version
360 +       information instead of string-matching through `emacs-version'.
361 +
362 +       * diff.el (diff-emacs-19-p): Ditto.
363 +
364 Index: diff.el
365 ===================================================================
366 RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/dired/diff.el,v
367 retrieving revision 1.4
368 diff -u -u -r1.4 diff.el
369 --- diff.el     2 Oct 2004 14:06:17 -0000       1.4
370 +++ diff.el     14 Jan 2005 02:37:23 -0000
371 @@ -72,7 +72,7 @@
372  ;;; Internal variables
373  
374  (defconst diff-emacs-19-p
375 -  (let ((ver (string-to-int (substring emacs-version 0 2))))
376 +  (let ((ver emacs-major-version))
377      (>= ver 19)))
378  
379  (or diff-emacs-19-p (require 'emacs-19))
380 Index: dired.el
381 ===================================================================
382 RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/dired/dired.el,v
383 retrieving revision 1.7
384 diff -u -u -r1.7 dired.el
385 --- dired.el    2 Oct 2004 14:06:19 -0000       1.7
386 +++ dired.el    14 Jan 2005 02:37:25 -0000
387 @@ -80,13 +80,15 @@
388  ;; Testing against the string `Lucid' breaks InfoDock.  How many years has
389  ;; it been since Lucid went away?
390  (let ((lucid-p (string-match "XEmacs" emacs-version))
391 -      ver subver)
392 -  (or (string-match "^\\([0-9]+\\)\\.\\([0-9]+\\)" emacs-version)
393 -      (error "dired does not work with emacs version %s" emacs-version))
394 -  (setq ver (string-to-int (substring emacs-version (match-beginning 1)
395 -                                     (match-end 1)))
396 -       subver (string-to-int (substring emacs-version (match-beginning 2)
397 -                                        (match-end 2))))
398 +      (ver emacs-major-version)
399 +      (subver emacs-minor-version))
400 +  (unless ver
401 +    (or (string-match "^\\([0-9]+\\)\\.\\([0-9]+\\)" emacs-version)
402 +       (error "dired does not work with emacs version %s" emacs-version))
403 +    (setq ver (string-to-int (substring emacs-version (match-beginning 1)
404 +                                       (match-end 1)))
405 +         subver (string-to-int (substring emacs-version (match-beginning 2)
406 +                                          (match-end 2)))))
407    (cond
408     ((= ver 18)
409      (require 'emacs-19)
410 @@ -6616,11 +6618,12 @@
411  ;;;; --------------------------------------------------------------
412  
413  (let ((lucid-p (string-match "XEmacs" emacs-version))
414 -      ver)
415 -  (or (string-match "^\\([0-9]+\\)\\." emacs-version)
416 -      (error "Weird emacs version %s" emacs-version))
417 -  (setq ver (string-to-int (substring emacs-version (match-beginning 1)
418 -                                     (match-end 1))))
419 +      (ver emacs-major-version))
420 +  (unless ver
421 +    (or (string-match "^\\([0-9]+\\)\\." emacs-version)
422 +       (error "Weird emacs version %s" emacs-version))
423 +    (setq ver (string-to-int (substring emacs-version (match-beginning 1)
424 +                                       (match-end 1)))))
425  
426    ;; Reading with history.
427    (if (>= ver 19)
428
429
430 * Problems with running SXEmacs
431 ===============================
432
433 ** FFI Related
434
435 *** ffi-wand.el refuses to load.
436
437 Can't load library `libMagickWand': libgomp.so.1: shared object cannot be
438 dlopen()ed
439
440 If you get that error when trying to load ffi-wand, it is because you
441 have a ImageMagick that is using OpenMP (currently only svn HEAD).  To
442 fix this you will need to rebuild ImageMagick, making sure that you
443 configure it using --disable-openmp.
444
445 See: <http://issues.sxemacs.org/show_bug.cgi?id=104>
446
447 ** Multimedia Goodness
448
449 *** SXEmacs hangs or crashes during (init-asynchronousity).
450
451 This is most likely a known effect (we do not want to call it bug,
452 since there is no definite location) with certain (g)libc and kernel
453 combinations under Linux.  If it crashes analyse the core file, it
454 should look like this:
455
456 #0  0x4014ebc4 in __sigsuspend (set=0xbffffbb4) at 
457 ../sysdeps/unix/sysv/linux/sigsuspend.c:48
458 #1  0x40101b34 in __pthread_wait_for_restart_signal (self=0x401116e0) at 
459 pthread.c:786
460 #2  0x40101138 in __pthread_create_2_1 (thread=0x206f8dc, attr=0xbffffc58, 
461 start_routine=0x20043ac <console>, arg=0xbffffd88) at restart.h:26
462
463 A definite fault-prone setup is using kernel 2.6.x in conjunction with
464 glibc-2.1.1.
465
466 *** SXEmacs hangs or crashes before it ought to playback sound.
467
468 As before, this is most likely a suspicious (g)libc/kernel
469 combination.
470
471 *** SXEmacs dumps core when using the ALSA audio device
472
473 This has been reported to happen with old ALSA libraries (1.0.3 to be
474 precise).  At the moment it is uncertain at which version these
475 problems disappear (no developer wants to downgrade to a non-working
476 ALSA :D).  We highly suggest to use the version 1.0.10 and above, or
477 not use ALSA at all.
478
479 *** SXEmacs in async mode does not play simultaneous sounds with ALSA
480
481 This is due to missing (hardware-)mixing capabilities of your
482 soundcard.  There is a user-space plugin called dmix, which can
483 effectively circumvent this issue.
484
485 *** SXEmacs dumps core when using the aRts audio device
486
487 Does it?  Please report details (version number of aRts, backtrace,
488 etc.).
489
490 *** SXEmacs crashes when using state sentinels with asynchronous sounds
491
492 This is a known bug (#13 in our bug database).  At the moment the only
493 advise we can give is: do not use sentinels before 22.1.7.
494 Also see our bug database at http://issues.sxemacs.org
495
496 *** make-media-stream seems to recognise any file as valid audio
497
498 This is a known issue with fully-featured ffmpeg builds.  The current
499 code in SXEmacs blindly relies on FFmpeg when it reports a file or
500 string as valid audio.  There is no way to double-check that at the
501 moment.  However, you can perform the additional check yourself if
502 you have taglib installed.  Use the included ffi-taglib.el.
503
504
505 * Original XEmacs PROBLEMS File
506 ===============================
507 From here down is a reproduction of the original XEmacs PROBLEMS
508 file.  Much of it is already fixed in SXEmacs (and in XEmacs too).
509 We're keeping it here for prosperity, or until somebody finds the time
510 to go through it all and remove the irrelevant stuff. :-)
511
512 Note: Some irrelevant stuff purged (mostly windows rubbish) 2010-04-01
513
514 This file describes various problems that have been encountered
515 in compiling, installing and running XEmacs.  It has been updated for
516 XEmacs 21.5.
517
518 This file is rather large, but we have tried to sort the entries by
519 their respective relevance for XEmacs, but may have not succeeded
520 completely in that task.  The file is divided into four parts:
521
522  - Problems with building XEmacs
523  - Problems with running XEmacs
524  - Compatibility problems
525  - Mule issues
526
527 Use `C-c C-f' to move to the next equal level of outline, and
528 `C-c C-b' to move to previous equal level.  `C-h m' will give more
529 info about the Outline mode.
530
531 Also, Try finding the things you need using one of the search commands
532 XEmacs provides (e.g. `C-s').
533
534 General advice:
535
536     WATCH OUT for your init file! (~/.xemacs/init.el or ~/.emacs)  If
537     you observe strange problems, invoke XEmacs with the `-vanilla'
538     option and see if you can repeat the problem.
539
540     Note that most of the problems described here manifest at RUN
541     time, even those described as BUILD problems.  It is quite unusual
542     for a released XEmacs to fail to build.  So a "build problem"
543     requires you to tweak the build environment, then rebuild XEmacs.
544     A "runtime problem" is one that can be fixed by proper
545     configuration of the existing build.  Compatibility problems and
546     Mule issues are generally runtime problems, but are treated
547     separately for convenience.
548
549
550 * Problems with building XEmacs
551 ===============================
552
553 ** General
554
555     Much general information is in INSTALL.  If it's covered in
556     INSTALL, we don't repeat it here.
557
558 *** How do I configure to get the buffer tabs/progress bars?
559
560 These features depend on support for "native widgets".  Use the
561 --with-widgets option to configure.  Configuration of widgets is
562 automatic for "modern" toolkits (MS Windows, GTK, and Motif), but if
563 you are using Xt and the Athena widgets, you will probably want to
564 specify a "3d" widget set.  See configure --usage, and don't forget to
565 install the corresponding development libraries.
566
567 *** I know I have libfoo installed, but configure doesn't find it.
568
569 Typical of Linux systems with package managers.  To link with a shared
570 library, you only need the shared library.  To compile objects that
571 link with it, you need the headers---and distros don't provide them with
572 the libraries.  You need the additional "development" package, too.
573
574 *** When using gcc, you get the error message "undefined symbol __fixunsdfsi".
575 When using gcc, you get the error message "undefined symbol __main".
576
577 This means that you need to link with the gcc library.  It may be called
578 "gcc-gnulib" or "libgcc.a"; figure out where it is, and define LIB_GCC in
579 config.h to point to it.
580
581 It may also work to use the GCC version of `ld' instead of the standard one.
582
583 *** src/Makefile and lib-src/Makefile are truncated--most of the file missing.
584
585 This can happen if configure uses GNU sed version 2.03.  That version
586 had a bug.  GNU sed version 2.05 works properly.
587
588 ** Motif
589
590 Motif is the X11 version of the Gnus torture test: if there's a way to
591 crash, Motif will find it.  With the open source release of Motif, it
592 seems like a good idea to collect all Motif-related issues in one
593 place.
594
595 You should also look in your OS's section, as it may not be Motif's
596 fault.
597
598 *** XEmacs visibly repaints itty-bitty rectangles very slowly.
599
600 This should only be visible on a slow X connection (ISDN, maybe T1).
601
602 At least some versions of Motif apparently do not implement
603 XtExposeCompressMaximal properly, so it is disabled.  If you wish to
604 experiment, you can remove the #ifdef LWLIB_NEEDS_MOTIF at line 238
605 (or so) of src/EmacsFrame.c, leaving only the line
606
607     /* compress_exposure        */      XtExposeCompressMaximal | XtExposeNoRegion,
608
609 and recompile.  This enables exposure compression, giving a 10:1 or
610 better speedup for some users.  However, on some Motif platforms (Red
611 Hat Linux 9.0 and Solaris 2.8, at least), this causes XEmacs to hang
612 while displaying the progress bar (eg, in font-lock).  A workaround
613 for that problem is to setq `progress-feedback-use-echo-area' to `t'.
614
615 *** XEmacs crashes on exit (#1).
616
617 The backtrace is something like:
618
619     (gdb) where
620     #0  0xfeb9a480 in _libc_kill () from /usr/lib/libc.so.1
621     #1  0x000b0388 in fatal_error_signal ()
622     #2  <signal handler called>
623     #3  YowIter (ht=0xb, id=0x0, v=0x74682074, client=0x47e3c0)
624         at ImageCache.c:1159
625     #4  0xff26cc5c in _LTHashTableForEachItem (ht=0x4725e8,
626         iter=0xff26dda0 <YowIter>, ClientData=0x47e3c0) at Hash.c:671
627     #5  0xff2a4664 in destroy (w=0x496550) at Screen.c:352
628     #6  0xfef92118 in Phase2Destroy () from /usr/openwin/lib/libXt.so.4
629     #7  0xfef91940 in Recursive () from /usr/openwin/lib/libXt.so.4
630     #8  0xfef91e44 in XtPhase2Destroy () from /usr/openwin/lib/libXt.so.4
631     #9  0xfef91ae8 in _XtDoPhase2Destroy () from /usr/openwin/lib/libXt.so.4
632     #10 0xfef918cc in XtDestroyWidget () from /usr/openwin/lib/libXt.so.4
633     #11 0xfef91438 in CloseDisplay () from /usr/openwin/lib/libXt.so.4
634     #12 0xfef91394 in XtCloseDisplay () from /usr/openwin/lib/libXt.so.4
635     #13 0x0025b8b0 in x_delete_device ()
636     #14 0x000940b0 in delete_device_internal ()
637     #15 0x000806a0 in delete_console_internal ()
638
639 This is known to happen with Lesstif version 0.93.36.  Similar
640 backtraces have also been observed on HP/UX and Solaris.  There is a
641 patch for Lesstif.  (This is not a solution; it just stops the crash.
642 It may or may not be harmless, but "it works for the author".)
643
644 Note that this backtrace looks a lot like the one in the next item.
645 However, this one is invulnerable to the Solaris patches mentioned there.
646
647 Frank McIngvale <frankm@hiwaay.net> says:
648
649     Ok, 0.93.34 works, and I tracked down the crash to a section
650     marked "experimental" in 0.93.36. Patch attached, "works for me".
651
652 diff -u -r lesstif-0.93.36/lib/Xm/ImageCache.c lesstif-0.93.36-mod/lib/Xm/ImageCache.c
653 --- lesstif-0.93.36/lib/Xm/ImageCache.c 2002-08-05 14:53:24.000000000 -0500
654 +++ lesstif-0.93.36-mod/lib/Xm/ImageCache.c     2002-11-11 11:13:12.000000000 -0600
655 @@ -1166,5 +1166,4 @@
656         DEBUGOUT(_LtDebug0(__FILE__, NULL, "_LtImageCacheScreenDestroy (XmGetPixmapByDepth) %p\n",
657                 s));
658  
659 -       (void) _LTHashTableForEachItem(PixmapCache, YowIter, (XtPointer)s);
660  }
661
662 *** XEmacs crashes on exit (#2)
663
664 Especially frequent with multiple frames.  Crashes that produce C
665 backtraces like this:
666
667 #0  0xfec9a118 in _libc_kill () from /usr/lib/libc.so.1
668 #1  0x77f48 in fatal_error_signal (sig=11)
669     at /codes/rpluim/xemacs-21.4/src/emacs.c:539
670 #2  <signal handler called>
671 #3  0xfee929f4 in XFindContext () from /usr/openwin/lib/libX11.so.4
672 #4  0xfee92930 in XFindContext () from /usr/openwin/lib/libX11.so.4
673 #5  0xff297e54 in DisplayDestroy () from /usr/dt/lib/libXm.so.4
674 #6  0xfefbece0 in XtCallCallbackList () from /usr/openwin/lib/libXt.so.4
675 #7  0xfefc486c in XtPhase2Destroy () from /usr/openwin/lib/libXt.so.4
676 #8  0xfefc45d0 in _XtDoPhase2Destroy () from /usr/openwin/lib/libXt.so.4
677 #9  0xfefc43b4 in XtDestroyWidget () from /usr/openwin/lib/libXt.so.4
678 #10 0x15cf9c in x_delete_device (d=0x523f00)
679
680 are caused by buggy Motif libraries.  Installing the following patches
681 has been reported to solve the problem on Solaris 2.7:
682
683 107081-40 107656-07
684
685 For information (although they have not been confirmed to work), the
686 equivalent patches for Solaris 2.8 are:
687
688 108940-33 108652-25
689
690 *** On HP-UX 11.0 XEmacs causes excessive X11 errors when running.
691     (also appears on AIX as reported in comp.emacs.xemacs)
692
693 Marcus Thiessel <marcus@xemacs.org>
694
695   Unfortunately, XEmacs releases prior to 21.0 don't work with
696   Motif2.1. It will compile but you will get excessive X11 errors like
697
698   xemacs: X Error of failed request:  BadGC (invalid GC parameter)
699
700   and finally XEmacs gets killed. A workaround is to use the
701   Motif1.2_R6 libraries. You can the following line to your call to
702   configure:
703
704      --x-libraries="/usr/lib/Motif1.2_R6 -L/usr/lib/X11R6"
705
706   Make sure /usr/lib/Motif1.2_R6/libXm.sl is a link to
707   /usr/lib/Motif1.2_R6/libXm.3.
708
709 *** On HP-UX 11.0: Object "" does not have windowed ancestor
710
711 Marcus Thiessel <marcus@xemacs.org>
712
713   XEmacs dies without core file and reports:
714
715     Error: Object "" does not have windowed ancestor.
716
717   This is a bug. Please apply the patch PHSS_19964 (check if
718   superseded). The other alternative is to link with Motif1.2_R6 (see
719   previous item).
720
721 *** Motif dialog boxes lose on Irix.
722
723 Larry Auton <lda@control.att.com> writes:
724 Beware of not specifying
725
726         --with-dialogs=athena
727
728 if it builds with the motif dialogs [boom!] you're a dead man.
729
730
731 ** AIX
732 *** IBM compiler fails: "The character # is not a valid C source character."
733
734 Most recently observed in 21.5.9, due to USE_KKCC ifdefs (they just
735 happen to tickle the implementation).
736
737 Valdis Kletnieks says:
738
739   The problem is that IBM defines a *MACRO* called 'memcpy', and we
740   have stuck a #ifdef/#endif inside the macro call.  As a workaround,
741   try adding '-U__STR__' to your CFLAGS - this will cause string.h to
742   not do a #define for strcpy() to __strcpy() - it uses this for
743   automatic inlining support.
744
745   (For the record, the same issue affects a number of other functions
746   defined in string.h - basically anything the compiler knows how to
747   inline.)
748
749 *** On AIX 4.3, you must specify --with-dialogs=athena with configure
750
751 *** The libXt shipped with AIX 4.3 up to 4.3.2 is broken.  This causes
752     xemacs -nw to fail in various ways.  The official APAR is this:
753
754 APAR NUMBER: <IX89470>            RESOLVED AS: PROGRAM ERROR
755
756 ABSTRACT:
757 <IX89470>: LIBXT.A INCORRECT HANDLING OF EXCEPTIONS IN XTAPPADDINPUT
758
759     The solution is to install X11.base.lib at version >=4.3.2.5.
760
761 *** On AIX, you get this compiler error message:
762
763     Processing include file ./XMenuInt.h
764         1501-106: (S) Include file X11/Xlib.h not found.
765
766 This means your system was installed with only the X11 runtime i.d
767 libraries.  You have to find your sipo (bootable tape) and install
768 X11Dev... with smit.
769
770 *** On AIX 4.1.2, linker error messages such as
771    ld: 0711-212 SEVERE ERROR: Symbol .__quous, found in the global symbol table
772          of archive /usr/lib/libIM.a, was not defined in archive member shr.o.
773
774 This is a problem in libIM.a.  You can work around it by executing
775 these shell commands in the src subdirectory of the directory where
776 you build Emacs:
777
778     cp /usr/lib/libIM.a .
779     chmod 664 libIM.a
780     ranlib libIM.a
781
782 Then change -lIM to ./libIM.a in the command to link temacs (in
783 Makefile).
784
785 *** Excessive optimization on AIX 4.2 can lead to compiler failure.
786
787 Valdis.Kletnieks@vt.edu writes:
788   At least at the b34 level, and the latest-and-greatest IBM xlc
789   (3.1.4.4), there are problems with -O3.  I haven't investigated
790   further.
791
792
793 ** SunOS/Solaris
794 *** Dumping error when using GNU binutils / GNU ld on a Sun.
795
796 Errors similar to the following:
797
798    Dumping under the name xemacs unexec():
799    dldump(/space/rpluim/xemacs-obj/src/xemacs): ld.so.1: ./temacs:
800    fatal: /space/rpluim/xemacs-obj/src/xemacs: unknown dynamic entry:
801    1879048176
802
803 are caused by using GNU ld.  There are several workarounds available:
804
805 In XEmacs 21.2 or later, configure using the new portable dumper
806 (--pdump).
807
808 Alternatively, you can link using the Sun version of ld, which is
809 normally held in /usr/ccs/bin.  This can be done by one of:
810
811 - building gcc with these configure flags:
812   configure --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as
813
814 - adding -B/usr/ccs/bin/ to CFLAGS used to configure XEmacs
815   (Note: The trailing '/' there is significant.)
816
817 - uninstalling GNU ld.
818
819 The Solaris2 FAQ claims:
820
821     When you install gcc, don't make the mistake of installing
822     GNU binutils or GNU libc, they are not as capable as their
823     counterparts you get with Solaris 2.x.
824
825 *** Link failure when using acc on a Sun.
826
827 To use acc, you need additional options just before the libraries, such as
828
829    /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1
830
831 and you need to add -lansi just before -lc.
832
833 The precise file names depend on the compiler version, so we
834 cannot easily arrange to supply them.
835
836 *** Problems finding X11 libraries on Solaris with Openwindows
837
838 Some users have reported problems in this area.  The reported solution
839 is to define the environment variable OPENWINHOME, even if you must set
840 it to `/usr/openwin'.
841
842 *** Sed problems on Solaris 2.5
843
844 There have been reports of Sun sed truncating very lines in the
845 Makefile during configuration.  The workaround is to use GNU sed or,
846 even better, think of a better way to generate Makefile, and send us a
847 patch. :-)
848
849 *** On Solaris 2 I get undefined symbols from libcurses.a.
850
851 You probably have /usr/ucblib/ on your LD_LIBRARY_PATH.  Do the link with
852 LD_LIBRARY_PATH unset.  Generally, avoid using any ucb* stuff when
853 building XEmacs.
854
855 *** On Solaris 2 I cannot make alloc.o, glyphs.o or process.o.
856
857 The SparcWorks C compiler may have difficulty building those modules
858 with optimization level -xO4.  Try using only "-fast" optimization
859 for just those modules.  (Or use gcc).
860
861 *** Solaris 2.3 /bin/sh coredumps during configuration.
862
863 This only occurs if you have LANG != C.  This is a known bug with
864 /bin/sh fixed by installing Patch-ID# 101613-01.  Or, you can use
865 bash by setting the environment variable CONFIG_SHELL to /bin/bash
866
867 *** Solaris 2.x configure/Makefile syntax "errors"
868
869 This is a known bug with /bin/sh and /bin/test, i.e. they do not
870 support the XPG4 standard.  You can use bash as a workaround or an
871 XPG4-compliant Bourne shell such as the Sun-supplied /usr/xpg4/bin/sh
872 by setting the environment variable CONFIG_SHELL to /usr/xpg4/bin/sh
873
874 *** On SunOS, you get linker errors
875     ld: Undefined symbol
876        _get_wmShellWidgetClass
877        _get_applicationShellWidgetClass
878
879 The fix to this is to install patch 100573 for OpenWindows 3.0
880 or link libXmu statically.
881
882 *** On Sunos 4, you get the error ld: Undefined symbol __lib_version.
883
884 This is the result of using cc or gcc with the shared library meant
885 for acc (the Sunpro compiler).  Check your LD_LIBRARY_PATH and delete
886 /usr/lang/SC2.0.1 or some similar directory.
887
888 *** Undefined symbols when linking on Sunos 4.1.
889
890 If you get the undefined symbols _atowc _wcslen, _iswprint, _iswspace,
891 _iswcntrl, _wcscpy, and _wcsncpy, then you need to add -lXwchar after
892 -lXaw in the command that links temacs.
893
894 This problem seems to arise only when the international language
895 extensions to X11R5 are installed.
896
897 *** On a Sun running SunOS 4.1.1, you get this error message from GNU ld:
898
899     /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment
900
901 The problem is in the Sun shared C library, not in GNU ld.
902
903 The solution is to install Patch-ID# 100267-03 from Sun.
904
905 *** SunOS 4.1.2: undefined symbol _get_wmShellWidgetClass
906
907   Apparently the version of libXmu.so.a that Sun ships is hosed: it's missing
908   some stuff that is in libXmu.a (the static version).  Sun has a patch for
909   this, but a workaround is to use the static version of libXmu, by changing
910   the link command from "-lXmu" to "-Bstatic -lXmu -Bdynamic".  If you have
911   OpenWindows 3.0, ask Sun for these patches:
912     100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
913     100573-03       4.1.x OpenWindows 3.0 undefined symbols with shared libXmu
914
915 *** Random other SunOS 4.1.[12] link errors.
916
917   The X headers and libraries that Sun ships in /usr/{include,lib}/X11 are
918   broken.  Use the ones in /usr/openwin/{include,lib} instead.
919
920 ** Linux
921
922 See also Intel Architecture General, above.
923
924 *** Under Linux, you get "too many arguments to function `getpgrp'".
925
926 You have probably installed LessTiff under `/usr/local' and `libXm.so'
927 could not be found when linking `getpgrp()' test program, making XEmacs
928 think that `getpgrp()' takes an argument. Try adding `/usr/local/lib'
929 in `/etc/ld.so.conf' and run `ldconfig'. Then run XEmacs's `configure'
930 again.  As with all problems of this type, reading the config.log file
931 generated from configure and seeing the log of how the test failed can
932 prove enlightening.
933
934 *** `Error: No ExtNode to pop!' on Linux systems with Lesstif.
935
936 This error message has been observed with lesstif-0.75a.  It does not
937 appear to cause any harm.
938
939 ** IRIX
940
941 *** More coredumping in Irix (6.5 known to be vulnerable)
942
943 No fix is known yet.  Here's the best information we have:
944
945 Valdis Kletnieks <Valdis.Kletnieks@vt.edu> writes:
946
947   Were xemacs and [any 3rd party, locally-compiled] libraries [you use]
948   all compiled with the same ABI ( -o32, -n32, -64) and
949   mips2/mips3/mips4 flags, and are they appropriate for the machine in
950   question?  I know the IP30 implies an Octane, so it should be an R10K
951   chipset and above such nonsense, but I've seen the most astoundingly
952   bizzare crashes when somebody managed to compile with -mips4 and get
953   it to run on an R4400 or R5K system. ;)
954
955   Also, since you're using gcc, try re-running fixincludes and *then*
956   rebuilding xemacs and [any] libraries - mismatched headers can do that
957   sort of thing to you with little or no clue what's wrong (often you
958   get screwed when one routine does an malloc(sizeof(foo_struct)) and
959   passes the result to something that things foo_struct is a bit bigger,
960   trashing memory....
961
962 Here's typical crash backtrace.  With --pdump, this occurs usually at
963 startup under X windows and xemacs -nw at least starts, while without
964 --pdump a similar crash is observed during build.
965
966 #0  0x0fa460b8 in kill () at regcomp.c:637
967 637     regcomp.c: No such file or directory.
968         in regcomp.c
969 (gdb) where
970 #0  0x0fa460b8 in kill () at regcomp.c:637
971 #1  0x10087f34 in fatal_error_signal ()
972 (gdb) quit
973
974 This is confusing because there is no such file in the XEmacs
975 distribution.  This is seen on (at least) the following configurations:
976
977 uname -a: IRIX64 oct202 6.5 01091821 IP30
978 XEmacs 21.4.9 "Informed Management" configured for `mips-sgi-irix6.5'.
979 XEmacs 21.5-b9 "brussels sprouts"  configured for `mips-sgi-irix6.5'.
980
981 *** On Irix 6.5, the MIPSpro compiler gets an internal compiler error
982
983 The MIPSpro Compiler (at least version 7.2.1) can't seem to handle the
984 union type properly, and fails to compile src/glyphs.c.  To avoid this
985 problem, always build ---use-union-type=no (but that's the default, so
986 you should only see this problem if you're an XEmacs maintainer).
987
988 *** Linking with -rpath on IRIX.
989
990 Darrell Kindred <dkindred@cmu.edu> writes:
991 There are a couple of problems [with use of -rpath with Irix ld], though:
992
993   1. The ld in IRIX 5.3 ignores all but the last -rpath
994      spec, so the patched configure spits out a warning
995      if --x-libraries or --site-runtime-libraries are
996      specified under irix 5.x, and it only adds -rpath
997      entries for the --site-runtime-libraries.  This bug was
998      fixed sometime between 5.3 and 6.2.
999
1000   2. IRIX gcc 2.7.2 doesn't accept -rpath directly, so
1001      it would have to be prefixed by -Xlinker or "-Wl,".
1002      This would be fine, except that configure compiles with
1003         ${CC-cc} $CFLAGS $LDFLAGS ...
1004      rather than quoting $LDFLAGS with prefix-args, like
1005      src/Makefile does.  So if you specify --x-libraries
1006      or --site-runtime-libraries, you must use --use-gcc=no,
1007      or configure will fail.
1008
1009 *** On Irix 6.3, the SGI ld quits with segmentation fault when linking temacs
1010
1011 This occurs if you use the SGI linker version 7.1.  Installing the
1012 patch SG0001872 fixes this problem.
1013
1014 *** On Irix 6.0, make tries (and fails) to build a program named unexelfsgi
1015
1016 A compiler bug inserts spaces into the string "unexelfsgi . o"
1017 in src/Makefile.  Edit src/Makefile, after configure is run,
1018 find that string, and take out the spaces.
1019
1020 Compiler fixes in Irix 6.0.1 should eliminate this problem.
1021
1022 *** On Irix 5.2, unexelfsgi.c can't find cmplrs/stsupport.h.
1023
1024 The file cmplrs/stsupport.h was included in the wrong file set in the
1025 Irix 5.2 distribution.  You can find it in the optional fileset
1026 compiler_dev, or copy it from some other Irix 5.2 system.  A kludgy
1027 workaround is to change unexelfsgi.c to include sym.h instead of
1028 syms.h.
1029
1030 *** Coredumping in Irix 6.2
1031
1032 Pete Forman <gsez020@compo.bedford.waii.com> writes:
1033 A problem noted by myself and others (I've lost the references) was
1034 that XEmacs coredumped when the cut or copy toolbar buttons were
1035 pressed.  This has been fixed by loading the SGI patchset (Feb 98)
1036 without having to recompile XEmacs.
1037
1038 My versions are XEmacs 20.3 (problem first noted in 19.15) and IRIX
1039 6.2, compiled using -n32.  I'd guess that the relevant individual
1040 patch was "SG0002580: multiple fixes for X libraries".  SGI recommends
1041 that the complete patch set be installed rather than parts of it.
1042
1043 ** Digital UNIX/OSF/VMS
1044 *** On Digital UNIX, the DEC C compiler might have a problem compiling
1045 some files.
1046
1047 In particular, src/extents.c and src/faces.c might cause the DEC C
1048 compiler to abort.  When this happens: cd src, compile the files by
1049 hand, cd .., and redo the "make" command.  When recompiling the files by
1050 hand, use the old C compiler for the following versions of Digital UNIX:
1051   - V3.n: Remove "-migrate" from the compile command.
1052   - V4.n: Add "-oldc" to the compile command.
1053
1054 A related compiler bug has been fixed by the DEC compiler team.  The
1055 new versions of the compiler should run fine.
1056
1057 *** Under some versions of OSF XEmacs runs fine if built without
1058 optimization but will crash randomly if built with optimization.
1059
1060 Using 'cc -g' is not sufficient to eliminate all optimization.  Try
1061 'cc -g -O0' instead.
1062
1063 *** Compilation errors on VMS.
1064
1065 Sorry, XEmacs does not work under VMS.  You might consider working on
1066 the port if you really want to have XEmacs work under VMS.
1067
1068 ** HP-UX
1069 *** On HPUX, the HP C compiler might have a problem compiling some files
1070 with optimization.
1071
1072 Richard Cognot <cognot@ensg.u-nancy.fr> writes:
1073
1074   Had to drop once again to level 2 optimization, at least to
1075   compile lstream.c. Otherwise, I get a "variable is void: \if"
1076   problem while dumping (this is a problem I already reported
1077   with vanilla hpux 10.01 and 9.07, which went away after
1078   applying patches for the C compiler). Trouble is I still
1079   haven't found the same patch for hpux 10.10, and I don't
1080   remember the patch numbers. I think potential XEmacs builders
1081   on HP should be warned about this.
1082
1083 *** I don't have `xmkmf' and `imake' on my HP.
1084
1085   You can get these standard X tools by anonymous FTP to
1086   hpcvaaz.cv.hp.com.  Essentially all X programs need these.
1087
1088 *** On HP-UX, problems with make
1089
1090 Marcus Thiessel <marcus@xemacs.org>
1091
1092   Some releases of XEmacs (e.g. 20.4) require GNU make to build
1093   successfully. You don't need GNU make when building 21.x.
1094
1095 *** On HP-UX 9.05 XEmacs won't compile or coredump during the build.
1096
1097 Marcus Thiessel <marcus@xemacs.org>
1098
1099   This might be a sed problem. For your own safety make sure to use
1100   GNU sed while dumping XEmacs.
1101
1102
1103 ** SCO OpenServer
1104 *** Native cc on SCO OpenServer 5 is now OK.  Icc may still throw you
1105 a curve.  Here is what Robert Lipe <robertl@arnet.com> says:
1106
1107 Unlike XEmacs 19.13, building with the native cc on SCO OpenServer 5
1108 now produces a functional binary.   I will typically build this
1109 configuration for COFF with:
1110
1111         /path_to_xemacs_source/configure --with-gcc=no \
1112           --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
1113           --with-xpm --with-xface --with-sound=nas
1114
1115 This version now supports ELF builds.  I highly recommend this to
1116 reduce the in-core footprint of XEmacs.  This is now how I compile
1117 all my test releases.  Build it like this:
1118
1119         /path_to_XEmacs_source/configure --with-gcc=no \
1120           --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
1121           --with-xpm --with-xface --with-sound=nas --dynamic
1122
1123 The compiler known as icc [ supplied with the OpenServer 5 Development
1124 System ] generates a working binary, but it takes forever to generate
1125 XEmacs.  ICC also whines more about the code than /bin/cc does.  I do
1126 believe all its whining is legitimate, however.    Note that you do
1127 have to 'cd src ; make  LD=icc' to avoid linker errors.
1128
1129 The way I handle the build procedure is:
1130
1131         /path_to_XEmacs_source/configure --with-gcc=no \
1132           --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
1133           --with-xpm --with-xface --with-sound=nas --dynamic --compiler="icc"
1134
1135 NOTE I have the xpm, xface, and audio libraries and includes in
1136         /usr/local/lib, /usr/local/include.  If you don't have these,
1137         don't include the "--with-*" arguments in any of my examples.
1138
1139 In previous versions of XEmacs, you had to override the defaults while
1140 compiling font-lock.o and extents.o when building with icc.  This seems
1141 to no longer be true, but I'm including this old information in case it
1142 resurfaces.  The process I used was:
1143
1144         make -k
1145         [ procure pizza, beer, repeat ]
1146         cd src
1147         make CC="icc -W0,-mP1COPT_max_tree_size=3000" font-lock.o extents.o
1148         make LD=icc
1149
1150 If you want sound support, get the tls566 supplement from
1151 ftp.sco.com:/TLS or any of its mirrors.  It works just groovy
1152 with XEmacs.
1153
1154 The M-x manual-entry is known not to work.  If you know Lisp and would
1155 like help in making it work, e-mail me at <robertl@dgii.com>.
1156 (UNCHECKED for 19.15 -- it might work).
1157
1158 In earlier releases, gnuserv/gnuclient/gnudoit would open a frame
1159 just fine, but the client would lock up and the server would
1160 terminate when you used C-x # to close the frame.   This is now
1161 fixed in XEmacs.
1162
1163 In etc/ there are two files of note. emacskeys.sco and emacsstrs.sco.
1164 The comments at the top of emacskeys.sco describe its function, and
1165 the emacstrs.sco is a suitable candidate for /usr/lib/keyboard/strings
1166 to take advantage of the keyboard map in emacskeys.sco.
1167
1168 Note: Much of the above entry is probably not valid for XEmacs 21.0
1169 and later.
1170
1171 * Problems with running XEmacs
1172 ==============================
1173 ** General
1174
1175 *** XEmacs consistently crashes in a particular strange place.
1176
1177 One known case is on Red Hat Linux, compiled with GCC, attempting to
1178 render PNG images.  The problem is that XEmacs code is not compliant
1179 with ANSI rules about aliasing.  Adding -fno-strict-aliasing to CFLAGS
1180 may help (or the equivalent for your compiler).  (Some versions of
1181 XEmacs may already do this automatically, but if you specify CFLAGS or
1182 --cflags yourself, you will have to add this flag by hand.)
1183
1184 If you diagnose this bug for some other symptoms or systems, please
1185 let us know (if you can send mail from the affected system, use M-x
1186 report-xemacs-bug) so we can update this entry.
1187
1188 *** Changes made to .el files do not take effect.
1189
1190 You may have forgotten to recompile them into .elc files.  Then the
1191 old .elc files will be loaded, and your changes will not be seen.  To
1192 fix this, do `M-x byte-recompile-directory' and specify the directory
1193 that contains the Lisp files.
1194
1195 Note that you will get a warning when loading a .elc file that is
1196 older than the corresponding .el file.
1197
1198 *** VM appears to hang in large folders.
1199
1200 This is normal (trust us) when upgrading to VM-6.22 from earlier
1201 versions.  Let VM finish what it is doing and all will be well.
1202
1203 *** Starting with 21.4.x, killing text is absurdly slow.
1204
1205 See FAQ Q3.10.6.  Should be available on the web near
1206 http://www.xemacs.org/faq/xemacs-faq.html#SEC160.
1207
1208 *** Whenever I try to retrieve a remote file, I have problems.
1209
1210 A typical error: FTP Error: USER request failed; 500 AUTH not understood.
1211 Thanks to giacomo boffi <giacomo.boffi@polimi.it> on comp.emacs.xemacs:
1212
1213    tell your ftp client to not attempt AUTH authentication (or do not
1214    use FTP servers that don't understand AUTH)
1215
1216 and notes that you need to add an element (often "-u") to
1217 `efs-ftp-program-args'.  Use M-x customize-variable, and verify the
1218 needed flag with `man ftp' or other local documentation.
1219
1220 *** gnuserv is running, some clients can connect, but others cannot.
1221
1222 The code in gnuslib.c respects the value of TMPDIR.  If the server and
1223 the client have different values in their environment, you lose.
1224 One program known to set TMPDIR and manifest this problem is exmh.
1225 You can defeat the use of TMPDIR by unsetting USE_TMPDIR at the top of
1226 gnuserv.h at build time.
1227
1228 ** General Unix
1229
1230 *** You type Control-H (Backspace) expecting to delete characters.
1231
1232 Emacs has traditionally used Control-H for help; unfortunately this
1233 interferes with its use as Backspace on TTY's.  As of XEmacs 21,
1234 XEmacs looks at the "erase" setting of TTY structures and maps C-h to
1235 backspace when erase is set to C-h.  This is sort of a special hack,
1236 but it makes it possible for you to use the standard:
1237
1238     stty erase ^H
1239
1240 to get your backspace key to erase characters.  The erase setting is
1241 recorded in the Lisp variable `tty-erase-char', which you can use to
1242 tune the settings in your .emacs.
1243
1244 A major drawback of this is that when C-h becomes backspace, it no
1245 longer invokes help.  In that case, you need to use f1 for help, or
1246 bind another key.  An example of the latter is the following code,
1247 which moves help to Meta-? (ESC ?):
1248
1249     (global-set-key "\M-?" 'help-command)
1250
1251 *** At startup I get a warning on stderr about missing charsets:
1252  
1253     Warning: Missing charsets in String to FontSet conversion
1254  
1255 You need to specify appropriate charsets for your locale (usually the
1256 value of the LANG environment variable) in .Xresources.  See
1257 etc/Emacs.ad for the relevant resources (mostly menubar fonts and
1258 fontsets).  Do not edit this file, it's purely informative.
1259
1260 If you have no satisfactory fonts for iso-8859-1, XEmacs will crash.
1261
1262 It looks like XFree86 4.x (the usual server on Linux and *BSD) has
1263 some braindamage where .UTF-8 locales will always generate this
1264 message, because the XFree86 (font)server doesn't know that UTF-8 will
1265 use the ISO10646-1 font registry (or a Cmap or something).
1266
1267 If you are not using a .UTF-8 locale and see this warning for a
1268 character set not listed in the default in Emacs.ad, please let
1269 xemacs-beta@xemacs.org know about it, so we can add fonts to the
1270 appropriate fontsets and stifle this warning.  (Unfortunately it's
1271 buried in Xlib, so we can't easily get rid of it otherwise.)
1272
1273 *** Mail agents (VM, Gnus, rmail) cannot get new mail
1274
1275 rmail and VM get new mail from /usr/spool/mail/$USER using a program
1276 called `movemail'.  This program interlocks with /bin/mail using the
1277 protocol defined by /bin/mail.
1278
1279 There are two different protocols in general use.  One of them uses
1280 the `flock' system call.  The other involves creating a lock file;
1281 `movemail' must be able to write in /usr/spool/mail in order to do
1282 this.  You control which one is used by defining, or not defining, the
1283 macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes.  IF
1284 YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR SYSTEM,
1285 YOU CAN LOSE MAIL!
1286
1287 If your system uses the lock file protocol, and fascist restrictions
1288 prevent ordinary users from writing the lock files in /usr/spool/mail,
1289 you may need to make `movemail' setgid to a suitable group such as
1290 `mail'.  To do this, use the following commands (as root) after doing
1291 the make install.
1292
1293         chgrp mail movemail
1294         chmod 2755 movemail
1295
1296 Installation normally copies movemail from the build directory to an
1297 installation directory which is usually under /usr/local/lib.  The
1298 installed copy of movemail is usually in the directory
1299 /usr/local/lib/emacs/VERSION/TARGET.  You must change the group and
1300 mode of the installed copy; changing the group and mode of the build
1301 directory copy is ineffective.
1302
1303 *** Things which should be bold or italic (such as the initial
1304 copyright notice) are not.
1305
1306 The fonts of the "bold" and "italic" faces are generated from the font
1307 of the "default" face; in this way, your bold and italic fonts will
1308 have the appropriate size and family.  However, emacs can only be
1309 clever in this way if you have specified the default font using the
1310 XLFD (X Logical Font Description) format, which looks like
1311
1312         *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
1313
1314 if you use any of the other, less strict font name formats, some of
1315 which look like:
1316
1317                 lucidasanstypewriter-12
1318 and             fixed
1319 and             9x13
1320
1321 then emacs won't be able to guess the names of the "bold" and "italic"
1322 versions.  All X fonts can be referred to via XLFD-style names, so you
1323 should use those forms.  See the man pages for X(1), xlsfonts(1), and
1324 xfontsel(1).
1325
1326 *** The dumped Emacs crashes when run, trying to write pure data.
1327
1328 Two causes have been seen for such problems.
1329
1330 1) On a system where getpagesize is not a system call, it is defined
1331 as a macro.  If the definition (in both unexec.c and malloc.c) is wrong,
1332 it can cause problems like this.  You might be able to find the correct
1333 value in the man page for a.out (5).
1334
1335 2) Some systems allocate variables declared static among the
1336 initialized variables.  Emacs makes all initialized variables in most
1337 of its files pure after dumping, but the variables declared static and
1338 not initialized are not supposed to be pure.  On these systems you
1339 may need to add "#define static" to the m- or the s- file.
1340
1341 *** Reading and writing files is very very slow.
1342
1343 Try evaluating the form (setq lock-directory nil) and see if that helps.
1344 There is a problem with file-locking on some systems (possibly related
1345 to NFS) that I don't understand.  Please send mail to the address
1346 xemacs-beta@xemacs.org if you figure this one out.
1347
1348 *** When emacs starts up, I get lots of warnings about unknown keysyms.
1349
1350 If you are running the prebuilt binaries, the Motif library expects to find
1351 certain thing in the XKeysymDB file.  This file is normally in /usr/lib/X11/
1352 or in /usr/openwin/lib/.  If you keep yours in a different place, set the
1353 environment variable $XKEYSYMDB to point to it before starting emacs.  If
1354 you still have the problem after doing that, perhaps your version of X is
1355 too old.  There is a copy of the MIT X11R5 XKeysymDB file in the emacs `etc'
1356 directory.  Try using that one.
1357
1358 *** My X resources used to work, and now some of them are being ignored.
1359
1360 Check the resources in .../etc/Emacs.ad (which is the same as the file
1361 sample.Xresources).  Perhaps some of the default resources built in to
1362 emacs are now overriding your existing resources.  Copy and edit the
1363 resources in Emacs.ad as necessary.
1364
1365 *** I have focus problems when I use `M-o' to switch to another screen
1366 without using the mouse.
1367
1368 The focus issues with a program like XEmacs, which has multiple
1369 homogeneous top-level windows, are very complicated, and as a result,
1370 most window managers don't implement them correctly.
1371
1372 The R4/R5 version of twm (and all of its descendants) had buggy focus
1373 handling.  Sufficiently recent versions of tvtwm have been fixed.  In
1374 addition, if you're using twm, make sure you have not specified
1375 "NoTitleFocus" in your .tvtwmrc file.  The very nature of this option
1376 makes twm do some illegal focus tricks, even with the patch.
1377
1378 It is known that olwm and olvwm are buggy, and in different ways.  If
1379 you're using click-to-type mode, try using point-to-type, or vice
1380 versa.
1381
1382 In older versions of NCDwm, one could not even type at XEmacs windows.
1383 This has been fixed in newer versions (2.4.3, and possibly earlier).
1384
1385 (Many people suggest that XEmacs should warp the mouse when focusing
1386 on another screen in point-to-type mode.  This is not ICCCM-compliant
1387 behavior.  Implementing such policy is the responsibility of the
1388 window manager itself, it is not legal for a client to do this.)
1389
1390 *** Emacs spontaneously displays "I-search: " at the bottom of the screen.
1391
1392 This means that Control-S/Control-Q (XON/XOFF) "flow control" is being
1393 used.  C-s/C-q flow control is bad for Emacs editors because it takes
1394 away C-s and C-q as user commands.  Since editors do not output long
1395 streams of text without user commands, there is no need for a
1396 user-issuable "stop output" command in an editor; therefore, a
1397 properly designed flow control mechanism would transmit all possible
1398 input characters without interference.  Designing such a mechanism is
1399 easy, for a person with at least half a brain.
1400
1401 There are three possible reasons why flow control could be taking place:
1402
1403   1) Terminal has not been told to disable flow control
1404   2) Insufficient padding for the terminal in use
1405   3) Some sort of terminal concentrator or line switch is responsible
1406
1407 First of all, many terminals have a set-up mode which controls whether
1408 they generate XON/XOFF flow control characters.  This must be set to
1409 "no XON/XOFF" in order for Emacs to work.  Sometimes there is an
1410 escape sequence that the computer can send to turn flow control off
1411 and on.  If so, perhaps the termcap `ti' string should turn flow
1412 control off, and the `te' string should turn it on.
1413
1414 Once the terminal has been told "no flow control", you may find it
1415 needs more padding.  The amount of padding Emacs sends is controlled
1416 by the termcap entry for the terminal in use, and by the output baud
1417 rate as known by the kernel.  The shell command `stty' will print
1418 your output baud rate; `stty' with suitable arguments will set it if
1419 it is wrong.  Setting to a higher speed causes increased padding.  If
1420 the results are wrong for the correct speed, there is probably a
1421 problem in the termcap entry.  You must speak to a local Unix wizard
1422 to fix this.  Perhaps you are just using the wrong terminal type.
1423
1424 For terminals that lack a "no flow control" mode, sometimes just
1425 giving lots of padding will prevent actual generation of flow control
1426 codes.  You might as well try it.
1427
1428 If you are really unlucky, your terminal is connected to the computer
1429 through a concentrator which sends XON/XOFF flow control to the
1430 computer, or it insists on sending flow control itself no matter how
1431 much padding you give it.  Unless you can figure out how to turn flow
1432 control off on this concentrator (again, refer to your local wizard),
1433 you are screwed!  You should have the terminal or concentrator
1434 replaced with a properly designed one.  In the mean time, some drastic
1435 measures can make Emacs semi-work.
1436
1437 You can make Emacs ignore C-s and C-q and let the operating system
1438 handle them.  To do this on a per-session basis, just type M-x
1439 enable-flow-control RET.  You will see a message that C-\ and C-^ are
1440 now translated to C-s and C-q.  (Use the same command M-x
1441 enable-flow-control to turn *off* this special mode.  It toggles flow
1442 control handling.)
1443
1444 If C-\ and C-^ are inconvenient for you (for example, if one of them
1445 is the escape character of your terminal concentrator), you can choose
1446 other characters by setting the variables flow-control-c-s-replacement
1447 and flow-control-c-q-replacement.  But choose carefully, since all
1448 other control characters are already used by emacs.
1449
1450 IMPORTANT: if you type C-s by accident while flow control is enabled,
1451 Emacs output will freeze, and you will have to remember to type C-q in
1452 order to continue.
1453
1454 If you work in an environment where a majority of terminals of a
1455 certain type are flow control hobbled, you can use the function
1456 `enable-flow-control-on' to turn on this flow control avoidance scheme
1457 automatically.  Here is an example:
1458
1459 (enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
1460
1461 If this isn't quite correct (e.g. you have a mixture of flow-control hobbled
1462 and good vt200 terminals), you can still run enable-flow-control
1463 manually.
1464
1465 I have no intention of ever redesigning the Emacs command set for the
1466 assumption that terminals use C-s/C-q flow control.  XON/XOFF flow
1467 control technique is a bad design, and terminals that need it are bad
1468 merchandise and should not be purchased.  Now that X is becoming
1469 widespread, XON/XOFF seems to be on the way out.  If you can get some
1470 use out of GNU Emacs on inferior terminals, more power to you, but I
1471 will not make Emacs worse for properly designed systems for the sake
1472 of inferior systems.
1473
1474 *** Control-S and Control-Q commands are ignored completely.
1475
1476 For some reason, your system is using brain-damaged C-s/C-q flow
1477 control despite Emacs's attempts to turn it off.  Perhaps your
1478 terminal is connected to the computer through a concentrator
1479 that wants to use flow control.
1480
1481 You should first try to tell the concentrator not to use flow control.
1482 If you succeed in this, try making the terminal work without
1483 flow control, as described in the preceding section.
1484
1485 If that line of approach is not successful, map some other characters
1486 into C-s and C-q using keyboard-translate-table.  The example above
1487 shows how to do this with C-^ and C-\.
1488
1489 *** Control-S and Control-Q commands are ignored completely on a net
1490 connection.
1491
1492 Some versions of rlogin (and possibly telnet) do not pass flow
1493 control characters to the remote system to which they connect.
1494 On such systems, emacs on the remote system cannot disable flow
1495 control on the local system.
1496
1497 One way to cure this is to disable flow control on the local host
1498 (the one running rlogin, not the one running rlogind) using the
1499 stty command, before starting the rlogin process.  On many systems,
1500 `stty start u stop u' will do this.
1501
1502 Some versions of tcsh will prevent even this from working.  One way
1503 around this is to start another shell before starting rlogin, and
1504 issue the stty command to disable flow control from that shell.
1505
1506 If none of these methods work, the best solution is to type
1507 `M-x enable-flow-control' at the beginning of your emacs session, or
1508 if you expect the problem to continue, add a line such as the
1509 following to your .emacs (on the host running rlogind):
1510
1511 (enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
1512
1513 See the entry about spontaneous display of I-search (above) for more
1514 info.
1515
1516 *** TTY redisplay is slow.
1517
1518 XEmacs has fairly new TTY redisplay support (beginning from 19.12),
1519 which doesn't include some basic TTY optimizations -- like using
1520 scrolling regions to move around blocks of text.  This is why
1521 redisplay on the traditional terminals, or over slow lines can be very
1522 slow.
1523
1524 If you are interested in fixing this, please let us know at
1525 <xemacs-beta@xemacs.org>.
1526
1527 *** Screen is updated wrong, but only on one kind of terminal.
1528
1529 This could mean that the termcap entry you are using for that terminal
1530 is wrong, or it could mean that Emacs has a bug handing the
1531 combination of features specified for that terminal.
1532
1533 The first step in tracking this down is to record what characters
1534 Emacs is sending to the terminal.  Execute the Lisp expression
1535 (open-termscript "./emacs-script") to make Emacs write all terminal
1536 output into the file ~/emacs-script as well; then do what makes the
1537 screen update wrong, and look at the file and decode the characters
1538 using the manual for the terminal.  There are several possibilities:
1539
1540 1) The characters sent are correct, according to the terminal manual.
1541
1542 In this case, there is no obvious bug in Emacs, and most likely you
1543 need more padding, or possibly the terminal manual is wrong.
1544
1545 2) The characters sent are incorrect, due to an obscure aspect of the
1546    terminal behavior not described in an obvious way by termcap.
1547
1548 This case is hard.  It will be necessary to think of a way for Emacs
1549 to distinguish between terminals with this kind of behavior and other
1550 terminals that behave subtly differently but are classified the same
1551 by termcap; or else find an algorithm for Emacs to use that avoids the
1552 difference.  Such changes must be tested on many kinds of terminals.
1553
1554 3) The termcap entry is wrong.
1555
1556 See the file etc/TERMS for information on changes that are known to be
1557 needed in commonly used termcap entries for certain terminals.
1558
1559 4) The characters sent are incorrect, and clearly cannot be right for
1560    any terminal with the termcap entry you were using.
1561
1562 This is unambiguously an Emacs bug, and can probably be fixed in
1563 termcap.c, terminfo.c, tparam.c, cm.c, redisplay-tty.c,
1564 redisplay-output.c, or redisplay.c.
1565
1566 *** My buffers are full of \000 characters or otherwise corrupt.
1567
1568 Some compilers have trouble with gmalloc.c and ralloc.c; try recompiling
1569 without optimization.  If that doesn't work, try recompiling with
1570 SYSTEM_MALLOC defined, and/or with REL_ALLOC undefined.
1571
1572 *** A position you specified in .Xresources is ignored, using twm.
1573
1574 twm normally ignores "program-specified" positions.
1575 You can tell it to obey them with this command in your `.twmrc' file:
1576
1577   UsePPosition  "on"            #allow clents to request a position
1578
1579 *** With M-x enable-flow-control, you need to type C-\ twice to do
1580 incremental search--a single C-\ gets no response.
1581
1582 This has been traced to communicating with your machine via kermit,
1583 with C-\ as the kermit escape character.  One solution is to use
1584 another escape character in kermit.  One user did
1585
1586    set escape-character 17
1587
1588 in his .kermrc file, to make C-q the kermit escape character.
1589
1590 *** The Motif version of Emacs paints the screen a solid color.
1591
1592 This has been observed to result from the following X resource:
1593
1594    Emacs*default.attributeFont: -*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*
1595
1596 That the resource has this effect indicates a bug in something, but we
1597 do not yet know what.  If it is an Emacs bug, we hope someone can
1598 explain what the bug is so we can fix it.  In the mean time, removing
1599 the resource prevents the problem.
1600
1601 *** After running emacs once, subsequent invocations crash.
1602
1603 Some versions of SVR4 have a serious bug in the implementation of the
1604 mmap () system call in the kernel; this causes emacs to run correctly
1605 the first time, and then crash when run a second time.
1606
1607 Contact your vendor and ask for the mmap bug fix; in the mean time,
1608 you may be able to work around the problem by adding a line to your
1609 operating system description file (whose name is reported by the
1610 configure script) that reads:
1611 #define SYSTEM_MALLOC
1612 This makes Emacs use memory less efficiently, but seems to work around
1613 the kernel bug.
1614
1615 *** Inability to send an Alt-modified key, when Emacs is communicating
1616 directly with an X server.
1617
1618 If you have tried to bind an Alt-modified key as a command, and it
1619 does not work to type the command, the first thing you should check is
1620 whether the key is getting through to Emacs.  To do this, type C-h c
1621 followed by the Alt-modified key.  C-h c should say what kind of event
1622 it read.  If it says it read an Alt-modified key, then make sure you
1623 have made the key binding correctly.
1624
1625 If C-h c reports an event that doesn't have the Alt modifier, it may
1626 be because your X server has no key for the Alt modifier.  The X
1627 server that comes from MIT does not set up the Alt modifier by
1628 default.
1629
1630 If your keyboard has keys named Alt, you can enable them as follows:
1631
1632     xmodmap -e 'add mod2 = Alt_L'
1633     xmodmap -e 'add mod2 = Alt_R'
1634
1635 If the keyboard has just one key named Alt, then only one of those
1636 commands is needed.  The modifier `mod2' is a reasonable choice if you
1637 are using an unmodified MIT version of X.  Otherwise, choose any
1638 modifier bit not otherwise used.
1639
1640 If your keyboard does not have keys named Alt, you can use some other
1641 keys.  Use the keysym command in xmodmap to turn a function key (or
1642 some other 'spare' key) into Alt_L or into Alt_R, and then use the
1643 commands show above to make them modifier keys.
1644
1645 Note that if you have Alt keys but no Meta keys, Emacs translates Alt
1646 into Meta.  This is because of the great importance of Meta in Emacs.
1647
1648 *** In Shell mode, you get a ^M at the end of every line.
1649
1650 This happens to people who use tcsh, because it is trying to be too
1651 smart.  It sees that the Shell uses terminal type `unknown' and turns
1652 on the flag to output ^M at the end of each line.  You can fix the
1653 problem by adding this to your .cshrc file:
1654
1655     if ($?EMACS) then
1656         if ($EMACS == "t") then
1657             unset edit
1658             stty  -icrnl -onlcr -echo susp ^Z
1659         endif
1660     endif
1661
1662 *** An error message such as `X protocol error: BadMatch (invalid
1663 parameter attributes) on protocol request 93'.
1664
1665 This comes from having an invalid X resource, such as
1666    emacs*Cursor:   black
1667 (which is invalid because it specifies a color name for something
1668 that isn't a color.)
1669
1670 The fix is to correct your X resources.
1671
1672 *** Once you pull down a menu from the menubar, it won't go away.
1673
1674 It has been claimed that this is caused by a bug in certain very old
1675 (1990?)  versions of the twm window manager.  It doesn't happen with
1676 recent vintages, or with other window managers.
1677
1678 *** Emacs ignores the "help" key when running OLWM.
1679
1680 OLWM grabs the help key, and retransmits it to the appropriate client
1681 using XSendEvent.  Allowing emacs to react to synthetic events is a
1682 security hole, so this is turned off by default.  You can enable it by
1683 setting the variable x-allow-sendevents to t.  You can also cause fix
1684 this by telling OLWM to not grab the help key, with the null binding
1685 "OpenWindows.KeyboardCommand.Help:".
1686
1687 *** Programs running under terminal emulator do not recognize `emacs'
1688 terminal type.
1689
1690 The cause of this is a shell startup file that sets the TERMCAP
1691 environment variable.  The terminal emulator uses that variable to
1692 provide the information on the special terminal type that Emacs
1693 emulates.
1694
1695 Rewrite your shell startup file so that it does not change TERMCAP
1696 in such a case.  You could use the following conditional which sets
1697 it only if it is undefined.
1698
1699     if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file
1700
1701 Or you could set TERMCAP only when you set TERM--which should not
1702 happen in a non-login shell.
1703
1704 *** The popup menu appears at the bottom/right of my screen.
1705
1706 You probably have something like the following in your ~/.Xresources
1707
1708         Emacs.geometry:         81x56--9--1
1709
1710 Use the following instead
1711
1712         Emacs*EmacsFrame.geometry:              81x56--9--1
1713
1714 *** When I try to use the PostgreSQL functions, I get a message about
1715 undefined symbols.
1716
1717 The only known case in which this happens is if you are using gcc, you
1718 configured with --error-checking=all and --with-modules, and you
1719 compiled with no optimization.  If you encounter this problem in any
1720 other situation, please inform xemacs-beta@xemacs.org.
1721
1722 This problem stems from a gcc bug.  With no optimization, functions
1723 declared `extern inline' sometimes are not completely compiled away.  An
1724 undefined symbol with the function's name is put into the resulting
1725 object file.  In this case, when the postgresql module is loaded, the
1726 linker is unable to resolve that symbol, so the module load fails.  The
1727 workaround is to recompile the module with optimization turned on.  Any
1728 optimization level, including -Os, appears to work.
1729
1730 *** C-z just refreshes the screen instead of suspending Emacs.
1731
1732 You are probably using a shell that doesn't support job control, even
1733 though the system itself is capable of it.  Try using a different
1734 shell.
1735
1736 ** MacOS/X, Darwin
1737 *** XEmacs crashes on MacOS within font-lock, or when dealing
1738 with large compilation buffers, or in other regex applications.
1739
1740 The default stack size under MacOS/X is rather small (512k as opposed
1741 to Solaris 8M), hosing the regexp code, which uses alloca()
1742 extensively, overflowing the stack when complex regexps are used.
1743 Workarounds:
1744
1745 1) Increase your stack size, using `ulimit -s 8192' or a (t)csh
1746    equivalent;
1747
1748 2) Recompile regex.c with REGEX_MALLOC defined.
1749
1750 ** AIX
1751 *** Your Delete key sends a Backspace to the terminal, using an AIXterm.
1752
1753 The solution is to include in your .Xresources the lines:
1754
1755    *aixterm.Translations: #override <Key>BackSpace: string(0x7f)
1756    aixterm*ttyModes: erase ^?
1757
1758 This makes your Backspace key send DEL (ASCII 127).
1759
1760 *** On AIX 4, some programs fail when run in a Shell buffer
1761 with an error message like No terminfo entry for "unknown".
1762
1763 On AIX, many terminal type definitions are not installed by default.
1764 `unknown' is one of them.  Install the "Special Generic Terminal
1765 Definitions" to make them defined.
1766
1767 *** On AIX, you get this message when running Emacs:
1768
1769     Could not load program emacs
1770     Symbol smtcheckinit in csh is undefined
1771     Error was: Exec format error
1772
1773 or this one:
1774
1775     Could not load program .emacs
1776     Symbol _system_con in csh is undefined
1777     Symbol _fp_trapsta in csh is undefined
1778     Error was: Exec format error
1779
1780 These can happen when you try to run on AIX 3.2.5 a program that was
1781 compiled with 3.2.4.  The fix is to recompile.
1782
1783 *** Trouble using ptys on AIX.
1784
1785 People often install the pty devices on AIX incorrectly.
1786 Use `smit pty' to reinstall them properly.
1787
1788
1789 ** SunOS/Solaris
1790 *** The Emacs window disappears when you type M-q.
1791
1792 Some versions of the Open Look window manager interpret M-q as a quit
1793 command for whatever window you are typing at.  If you want to use
1794 Emacs with that window manager, you should try to configure the window
1795 manager to use some other command.   You can disable the
1796 shortcut keys entirely by adding this line to ~/.OWdefaults:
1797
1798     OpenWindows.WindowMenuAccelerators: False
1799
1800 *** When Emacs tries to ring the bell, you get an error like
1801
1802         audio: sst_open: SETQSIZE" Invalid argument
1803         audio: sst_close: SETREG MMR2, Invalid argument
1804
1805 you have probably compiled using an ANSI C compiler, but with non-ANSI
1806 include files.  In particular, on Suns, the file
1807 /usr/include/sun/audioio.h uses the _IOW macro to define the constant
1808 AUDIOSETQSIZE.  _IOW in turn uses a K&R preprocessor feature that is
1809 now explicitly forbidden in ANSI preprocessors, namely substitution
1810 inside character constants.  All ANSI C compilers must provide a
1811 workaround for this problem.  Lucid's C compiler is shipped with a new
1812 set of system include files.  If you are using GCC, there is a script
1813 called fixincludes that creates new versions of some system include
1814 files that use this obsolete feature.
1815
1816 *** On Solaris 2.6, XEmacs dumps core when exiting.
1817
1818 This happens if you're XEmacs is running on the same machine as the X
1819 server, and the optimized memory transport has been turned on by
1820 setting the environment variable XSUNTRANSPORT.  The crash occurs
1821 during the call to XCloseDisplay.
1822
1823 If this describes your situation, you need to undefine the
1824 XSUNTRANSPORT environment variable.
1825
1826 *** On Solaris, C-x doesn't get through to Emacs when you use the console.
1827
1828 This is a Solaris feature (at least on Intel x86 cpus).  Type C-r
1829 C-r C-t, to toggle whether C-x gets through to Emacs.
1830
1831 *** On Solaris 2.4, Dired hangs and C-g does not work.  Or Emacs hangs
1832 forever waiting for termination of a subprocess that is a zombie.
1833
1834 casper@fwi.uva.nl says the problem is in X11R6.  Rebuild libX11.so
1835 after changing the file xc/config/cf/sunLib.tmpl.  Change the lines
1836
1837     #if ThreadedX
1838     #define SharedX11Reqs -lthread
1839     #endif
1840
1841 to:
1842
1843     #if OSMinorVersion < 4
1844     #if ThreadedX
1845     #define SharedX11Reqs -lthread
1846     #endif
1847     #endif
1848
1849 Be sure also to edit x/config/cf/sun.cf so that OSMinorVersion is 4
1850 (as it should be for Solaris 2.4).  The file has three definitions for
1851 OSMinorVersion: the first is for x86, the second for SPARC under
1852 Solaris, and the third for SunOS 4.  Make sure to update the
1853 definition for your type of machine and system.
1854
1855 Then do `make Everything' in the top directory of X11R6, to rebuild
1856 the makefiles and rebuild X.  The X built this way work only on
1857 Solaris 2.4, not on 2.3.
1858
1859 For multithreaded X to work it necessary to install patch
1860 101925-02 to fix problems in header files [2.4].  You need
1861 to reinstall gcc or re-run just-fixinc after installing that
1862 patch.
1863
1864 However, Frank Rust <frust@iti.cs.tu-bs.de> used a simpler solution:
1865 he changed
1866     #define ThreadedX          YES
1867 to
1868     #define ThreadedX          NO
1869 in sun.cf and did `make World' to rebuild X11R6.  Removing all
1870 `-DXTHREAD*' flags and `-lthread' entries from lib/X11/Makefile and
1871 typing 'make install' in that directory also seemed to work.
1872
1873 *** On SunOS 4.1.3, Emacs unpredictably crashes in _yp_dobind_soft.
1874
1875 This happens if you configure Emacs specifying just `sparc-sun-sunos4'
1876 on a system that is version 4.1.3.  You must specify the precise
1877 version number (or let configure figure out the configuration, which
1878 it can do perfectly well for SunOS).
1879
1880 *** Mail is lost when sent to local aliases.
1881
1882 Many emacs mail user agents (VM and rmail, for instance) use the
1883 sendmail.el library.  This library can arrange for mail to be
1884 delivered by passing messages to the /usr/lib/sendmail (usually)
1885 program .  In doing so, it passes the '-t' flag to sendmail, which
1886 means that the name of the recipient of the message is not on the
1887 command line and, therefore, that sendmail must parse the message to
1888 obtain the destination address.
1889
1890 There is a bug in the SunOS4.1.1 and SunOS4.1.3 versions of sendmail.
1891 In short, when given the -t flag, the SunOS sendmail won't recognize
1892 non-local (i.e. NIS) aliases.  It has been reported that the Solaris
1893 2.x versions of sendmail do not have this bug.  For those using SunOS
1894 4.1, the best fix is to install sendmail V8 or IDA sendmail (which
1895 have other advantages over the regular sendmail as well).  At the time
1896 of this writing, these official versions are available:
1897
1898  Sendmail V8 on ftp.cs.berkeley.edu in /ucb/sendmail:
1899    sendmail.8.6.9.base.tar.Z (the base system source & documentation)
1900    sendmail.8.6.9.cf.tar.Z   (configuration files)
1901    sendmail.8.6.9.misc.tar.Z (miscellaneous support programs)
1902    sendmail.8.6.9.xdoc.tar.Z (extended documentation, with postscript)
1903
1904  IDA sendmail on vixen.cso.uiuc.edu in /pub:
1905    sendmail-5.67b+IDA-1.5.tar.gz
1906
1907 *** Emacs fails to understand most Internet host names, even though
1908 the names work properly with other programs on the same system.
1909   Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0.
1910   Gnus can't make contact with the specified host for nntp.
1911
1912 This typically happens on Suns and other systems that use shared
1913 libraries.  The cause is that the site has installed a version of the
1914 shared library which uses a name server--but has not installed a
1915 similar version of the unshared library which Emacs uses.
1916
1917 The result is that most programs, using the shared library, work with
1918 the nameserver, but Emacs does not.
1919
1920 The fix is to install an unshared library that corresponds to what you
1921 installed in the shared library, and then relink Emacs.
1922
1923 On SunOS 4.1, simply define HAVE_RES_INIT.
1924
1925 If you have already installed the name resolver in the file libresolv.a,
1926 then you need to compile Emacs to use that library.  The easiest way to
1927 do this is to add to config.h a definition of LIBS_SYSTEM, LIBS_MACHINE
1928 or LIB_STANDARD which uses -lresolv.  Watch out!  If you redefine a macro
1929 that is already in use in your configuration to supply some other libraries,
1930 be careful not to lose the others.
1931
1932 Thus, you could start by adding this to config.h:
1933
1934 #define LIBS_SYSTEM -lresolv
1935
1936 Then if this gives you an error for redefining a macro, and you see that
1937 the s- file defines LIBS_SYSTEM as -lfoo -lbar, you could change config.h
1938 again to say this:
1939
1940 #define LIBS_SYSTEM -lresolv -lfoo -lbar
1941
1942 *** With process-connection-type set to t, each line of subprocess
1943 output is terminated with a ^M, making ange-ftp and GNUS not work.
1944
1945 On SunOS systems, this problem has been seen to be a result of an
1946 incomplete installation of gcc 2.2 which allowed some non-ANSI
1947 compatible include files into the compilation.  In particular this
1948 affected virtually all ioctl() calls.
1949
1950
1951 ** Linux
1952 *** XEmacs crashes on startup, in make-frame.
1953
1954 Typically the Lisp backtrace includes
1955
1956    make-frame(nil #<x-device on ":0.0" 0x2558>)
1957
1958 somewhere near the top.  The problem is due to an improvement in GNU
1959 ld that sorts the ELF reloc sections in the executable, giving
1960 dramatic speedups in startup for large executables.  It also confuses
1961 the traditional unexec code in XEmacs, leading to the core dump.  The
1962 solution is to use the --pdump or --ldflags='-z nocombreloc' options
1963 to configure.  Recent 21.4 and 12.5 autodetect this in configure.
1964
1965 Red Hat and SuSE (at least) distributed a prerelease version of ld
1966 (versions around 2.11.90.x.y) where autodetection is impossible.  The
1967 recommended procedure is to upgrade to binutils >= 2.12 and rerun
1968 configure.  Otherwise you must apply the flags by hand.  --pdump is
1969 recommended.
1970
1971 *** I want XEmacs to use the Alt key, not the XXX key, for Meta commands
1972
1973 For historical reasons, XEmacs looks for a Meta key, then an Alt key.
1974 It binds Meta commands to the X11 modifier bit attached to the first
1975 of these it finds.  On PCs, the Windows key is often assigned the Meta
1976 bit, but many desktop environments go to great lengths to get all apps
1977 to use the Alt key, and reserve the Windows key to (sensibly enough)
1978 the window manager.
1979
1980 One correct way to implement this was suggested on comp.emacs.xemacs
1981 (by Kilian Foth and in more detail by Michael Piotrowski): unmap the
1982 Meta modifier using xmodmap or xkb, and then map the Meta/Windows key
1983 to the Super or Hyper keysym and an appropriate mod bit.  XEmacs will
1984 not find the Meta keysym, and default to using the Alt key for Meta
1985 keybindings.  Typically few applications use the (X11) Meta modifier;
1986 it is tedious but not too much so to teach the ones you need to use
1987 Super instead of Meta.  There may be further useful hints in the
1988 discussion of keymapping on non-Linux platforms.
1989
1990 *** The color-gcc wrapper
1991
1992 This wrapper colorizes the error messages from gcc.  By default XEmacs
1993 does not interpret the escape sequences used to generate colors,
1994 resulting in a cluttered, hard-to-read buffer.  You can remove the
1995 wrapper, or defeat the wrapper colorization in Emacs process buffers
1996 by editing the "nocolor" attribute in /etc/colorgccrc:
1997
1998 $ diff -u /etc/colorgccrc.old /etc/colorgccrc
1999 --- /etc/colorgccrc.old Tue Dec 26 02:17:46 2000
2000 +++ /etc/colorgccrc     Tue Dec 26 02:15:48 2000
2001 @@ -34,1 +34,1 @@
2002 -nocolor: dumb
2003 +nocolor: dumb emacs
2004
2005 If you want colorization in your Emacs buffers, you may get good
2006 results from the ansi-color.el library:
2007
2008 http://www.geocities.com/kensanata/color-emacs.html#ansicolors
2009
2010 This is written for the mainline GNU Emacs but the author has made
2011 efforts to adapt it to XEmacs.  YMMV.
2012
2013 *** Slow startup on Linux.
2014
2015 People using systems based on the Linux kernel sometimes report that
2016 startup takes 10 to 15 seconds longer than `usual'.  There are two
2017 problems, one older, one newer.
2018
2019 **** Old problem: IPv4 host lookup
2020
2021 On older systems, this is because Emacs looks up the host name when it
2022 starts.  Normally, this takes negligible time; the extra delay is due
2023 to improper system configuration.  (Recent Linux distros usually have
2024 this configuration correct "out of the box".)  This problem can occur
2025 for both networked and non-networked machines.
2026
2027 Here is how to fix the configuration.  It requires being root.
2028
2029 ***** Networked Case
2030
2031 First, make sure the files `/etc/hosts' and `/etc/host.conf' both
2032 exist.  The first line in the `/etc/hosts' file should look like this
2033 (replace HOSTNAME with your host name):
2034
2035     127.0.0.1      localhost HOSTNAME
2036
2037 Also make sure that the `/etc/host.conf' files contains the following
2038 lines:
2039
2040     order hosts, bind
2041     multi on
2042
2043 Any changes, permanent and temporary, to the host name should be
2044 indicated in the `/etc/hosts' file, since it acts a limited local
2045 database of addresses and names (e.g., some SLIP connections
2046 dynamically allocate ip addresses).
2047
2048 ***** Non-Networked Case
2049
2050 The solution described in the networked case applies here as well.
2051 However, if you never intend to network your machine, you can use a
2052 simpler solution: create an empty `/etc/host.conf' file.  The command
2053 `touch /etc/host.conf' suffices to create the file.  The `/etc/hosts'
2054 file is not necessary with this approach.
2055
2056 **** New problem: IPv6 CNAME lookup
2057
2058 A newer problem is due to XEmacs changing to use the modern
2059 getaddrinfo() interface from the older gethostbyname() interface.  The
2060 solution above is insufficient, because getaddrinfo() by default tries
2061 to get IPv6 information for localhost.  This always involves a dns
2062 lookup to get the CNAME, and the strategies above don't work.  It then
2063 falls back to IPv4 behavior.  This is good[tm] according the people at
2064 WIDE who know about IPv6.
2065
2066 ***** Robust network case
2067
2068 Configure your network so that there are no nameservers configured
2069 until the network is actually running.  getaddrinfo() will not try to
2070 access a nameserver that isn't configured.
2071
2072 ***** Flaky network case
2073
2074 If you have a flaky modem or DSL connection that can be relied on only
2075 to go down whenever you want to bring XEmacs up, you need to force
2076 IPv4 behavior.  Explicitly setting DISPLAY=127.0.0.1:0.0 (or whatever
2077 is appropriate) works in most cases.
2078
2079 If you cannot or do not want to do that, you can hard code IPv4
2080 behavior in src/process-unix.c.  This is bad[tm], on your own head be
2081 it.  Use the configure option `--with-ipv6-cname=no'.
2082
2083 *** Mandrake
2084
2085 The Mandrake Linux distribution is attempting to comprehensively
2086 update the user interface, and make it consistent across
2087 applications.  This is very difficult, and will occasionally cause
2088 conflicts with applications like Emacs with their own long-established
2089 interfaces.  Known issues specific to Mandrake or especially common:
2090
2091 Some versions of XEmacs (21.1.9 is known) distributed with Mandrake
2092 were patched to make the Meta and Alt keysyms synonymous.  These
2093 normally work as expected in the Mandrake environment.  However,
2094 custom-built XEmacsen (including all 21.2 betas) will "inexplicably"
2095 not respect the "Alt-invokes-Meta-commands" convention.  See "I want
2096 XEmacs to use the Alt key" below.
2097
2098 The color-gcc wrapper (see below) is in common use on the Mandrake
2099 platform.
2100
2101 *** You get crashes in a non-C locale with Linux GNU Libc 2.0.
2102
2103 Internationalization was not the top priority for GNU Libc 2.0.
2104 As of this writing (1998-12-28) you may get crashes while running
2105 XEmacs in a non-C locale.  For example, `LC_ALL=en_US xemacs' crashes
2106 while `LC_ALL=C xemacs' runs fine.  This happens for example with GNU
2107 libc 2.0.7.  Installing libintl.a and libintl.h built from gettext
2108 0.10.35 and re-building XEmacs solves the crashes.  Presumably soon
2109 everyone will upgrade to GNU Libc 2.1 and this problem will go away.
2110
2111 *** `C-z', or `M-x suspend-emacs' hangs instead of suspending.
2112
2113 If you build with `gpm' support on Linux, you cannot suspend XEmacs
2114 because gpm installs a buggy SIGTSTP handler.  Either compile with
2115 `--with-gpm=no', or don't suspend XEmacs on the Linux console until
2116 this bug is fixed.
2117
2118 *** With certain fonts, when the cursor appears on a character, the
2119 character doesn't appear--you get a solid box instead.
2120
2121 One user on a Linux system reported that this problem went away with
2122 installation of a new X server.  The failing server was XFree86 3.1.1.
2123 XFree86 3.1.2 works.
2124
2125 ** IRIX
2126 *** On Irix, I don't see the toolbar icons and I'm getting lots of
2127 entries in the warnings buffer.
2128
2129 SGI ships a really old Xpm library in /usr/lib which does not work at
2130 all well with XEmacs.  The solution is to install your own copy of the
2131 latest version of Xpm somewhere and then use the --site-includes and
2132 --site-libraries flags to tell configure where to find it.
2133
2134 *** Trouble using ptys on IRIX, or running out of ptys.
2135
2136 The program mkpts (which may be in `/usr/adm' or `/usr/sbin') needs to
2137 be set-UID to root, or non-root programs like Emacs will not be able
2138 to allocate ptys reliably.
2139
2140 *** Beware of the default image & graphics library on Irix
2141
2142 Richard Cognot <cognot@ensg.u-nancy.fr> writes:
2143
2144 You *have* to compile your own jpeg lib. The one delivered with SGI
2145 systems is a C++ lib, which apparently XEmacs cannot cope with.
2146
2147
2148 ** Digital UNIX/OSF/VMS/Ultrix
2149 *** XEmacs crashes on Digital Unix within font-lock, or when dealing
2150 with large compilation buffers, or in other regex applications.
2151
2152 The default stack size under Digital Unix is rather small (2M as
2153 opposed to Solaris 8M), hosing the regexp code, which uses alloca()
2154 extensively, overflowing the stack when complex regexps are used.
2155 Workarounds:
2156
2157 1) Increase your stack size, using `ulimit -s 8192' or a (t)csh
2158    equivalent;
2159
2160 2) Recompile regex.c with REGEX_MALLOC defined.
2161
2162 *** The `Alt' key doesn't behave as `Meta' when running DECwindows.
2163
2164 The default DEC keyboard mapping has the Alt keys set up to generate the
2165 keysym `Multi_key', which has a meaning to xemacs which is distinct from that
2166 of the `Meta_L' and `Meta-R' keysyms.  A second problem is that certain keys
2167 have the Mod2 modifier attached to them for no adequately explored reason.
2168 The correct fix is to pass this file to xmodmap upon starting X:
2169
2170         clear mod2
2171         keysym Multi_key = Alt_L
2172         add mod1 = Alt_L
2173         add mod1 = Alt_R
2174
2175 *** The Compose key on a DEC keyboard does not work as Meta key.
2176
2177 This shell command should fix it:
2178
2179   xmodmap -e 'keycode 0xb1 = Meta_L'
2180
2181 *** `expand-file-name' fails to work on any but the machine you dumped
2182 Emacs on.
2183
2184 On Ultrix, if you use any of the functions which look up information
2185 in the passwd database before dumping Emacs (say, by using
2186 expand-file-name in site-init.el), then those functions will not work
2187 in the dumped Emacs on any host but the one Emacs was dumped on.
2188
2189 The solution?  Don't use expand-file-name in site-init.el, or in
2190 anything it loads.  Yuck - some solution.
2191
2192 I'm not sure why this happens; if you can find out exactly what is
2193 going on, and perhaps find a fix or a workaround, please let us know.
2194 Perhaps the YP functions cache some information, the cache is included
2195 in the dumped Emacs, and is then inaccurate on any other host.
2196
2197
2198 ** HP-UX
2199 *** I get complaints about the mapping of my HP keyboard at startup,
2200 but I haven't changed anything.
2201
2202 The default HP keymap is set up to have Mod1 assigned to two different keys:
2203 Meta_L and Mode_switch (even though there is not actually a Mode_switch key on
2204 the keyboard -- it uses an "imaginary" keycode.)  There actually is a reason
2205 for this, but it's not a good one.  The correct fix is to execute this command
2206 upon starting X:
2207
2208         xmodmap -e 'remove mod1 = Mode_switch'
2209
2210 *** On HP-UX, you get "poll: Interrupted system call" message in the
2211 window where XEmacs was launched.
2212
2213 Richard Cognot <cognot@ensg.u-nancy.fr> writes:
2214
2215   I get a very strange problem when linking libc.a dynamically: every
2216   event (mouse, keyboard, expose...) results in a "poll: Interrupted
2217   system call" message in the window where XEmacs was
2218   launched. Forcing a static link of libc.a alone by adding
2219   /usr/lib/libc.a at the end of the link line solves this. Note that
2220   my 9.07 build of 19.14b17 and my (old) build of 19.13 both exhibit
2221   the same behavior. I've tried various hpux patches to no avail. If
2222   this problem cannot be solved before the release date, binary kits
2223   for HP *must* be linked statically against libc, otherwise this
2224   problem will show up. (This is directed at whoever will volunteer
2225   for this kit, as I won't be available to do it, unless 19.14 gets
2226   delayed until mid-june ;-). I think this problem will be an FAQ soon
2227   after the release otherwise.
2228
2229 Note: The above entry is probably not valid for XEmacs 21.0 and
2230 later.
2231
2232 *** The right Alt key works wrong on German HP keyboards (and perhaps
2233    other non-English HP keyboards too).
2234
2235 This is because HP-UX defines the modifiers wrong in X.  Here is a
2236 shell script to fix the problem; be sure that it is run after VUE
2237 configures the X server.
2238
2239     xmodmap 2> /dev/null - << EOF
2240     keysym Alt_L = Meta_L
2241     keysym Alt_R = Meta_R
2242     EOF
2243
2244     xmodmap - << EOF
2245     clear mod1
2246     keysym Mode_switch = NoSymbol
2247     add mod1 = Meta_L
2248     keysym Meta_R = Mode_switch
2249     add mod2 = Mode_switch
2250     EOF
2251
2252
2253 *** XEmacs dumps core at startup when native audio is used.  Native
2254 audio does not work with recent versions of HP-UX.
2255
2256 Under HP-UX 10.20 and later (e.g., HP-UX 11.XX), with native audio
2257 enabled, the dumped XEmacs binary ("xemacs") core dumps at startup if
2258 recent versions of the libAlib.sl audio shared library is used.  Note
2259 that "temacs" will run, but "xemacs" will dump core.  This, of course,
2260 causes the XEmacs build to fail.  If GNU malloc is enabled, a stack
2261 trace will show XEmacs to have crashed in the "first" call to malloc().
2262
2263 This bug currently exists in all versions of XEmacs, when the undump
2264 mechanism is used.  It is not known if using the experimental portable
2265 dumper will allow native audio to work.
2266
2267 **** Cause:
2268
2269 Recent versions of the HP-UX 10.20 (and later) audio shared library (in
2270 /opt/audio/lib), pulls in the libdce shared library, which pulls in a
2271 thread (libcma) library.  This prevents the HP-UX undump() routine (in
2272 unexhp9k800.c) from properly working.  What's happening is that some
2273 initialization routines are being called in the libcma library, *BEFORE*
2274 main() is called, and these initialization routines are calling
2275 malloc().  Unfortunately, in order for the undumper to work, XEmacs must
2276 adjust (move upwards) the sbrk() value *BEFORE* the first call to
2277 malloc(); if malloc() is called before XEmacs has properly adjusted sbrk
2278 (which is what is happening), dumped memory that is being used by
2279 XEmacs, is improperly re-allocated for use by malloc() and the dumped
2280 memory is corrupted.  This causes XEmacs to die an horrible death.
2281
2282 It is believed that versions of the audio library past December 1998
2283 will trigger this problem.  Under HP-UX 10.20, you probably have to
2284 install audio library patches to encounter this.  It's probable that
2285 recent "fresh, out-of-the-box" HP-UX 11.XX workstations also have this
2286 problem.  For HP-UX 10.20, it's believed that audio patch PHSS_17121 (or
2287 a superceeding one, like PHSS_17554, PHSS_17971, PHSS_18777, PHSS_21481,
2288 or PHSS_21662, etc.) will trigger this.
2289
2290 To check if your audio library will cause problems for XEmacs, run
2291 "chatr /opt/audio/lib/libAlib.sl".  If "libdce" appears in the displayed
2292 shared library list, XEmacs will probably encounter problems if audio is
2293 enabled.
2294
2295 **** Workaround:
2296
2297 Don't enable native audio.  Re-run configure without native audio
2298 support.
2299
2300 If your site supports it, try using NAS (Network Audio Support).
2301
2302 Try using the experimental portable dumper.  It may work, or it may
2303 not.
2304
2305
2306 *** `Pid xxx killed due to text modification or page I/O error'
2307
2308 On HP-UX, you can get that error when the Emacs executable is on an NFS
2309 file system.  HP-UX responds this way if it tries to swap in a page and
2310 does not get a response from the server within a timeout whose default
2311 value is just ten seconds.
2312
2313 If this happens to you, extend the timeout period.
2314
2315 *** Shell mode on HP-UX gives the message, "`tty`: Ambiguous".
2316
2317 christos@theory.tn.cornell.edu says:
2318
2319 The problem is that in your .cshrc you have something that tries to
2320 execute `tty`. If you are not running the shell on a real tty then tty
2321 will print "not a tty". Csh expects one word in some places, but tty
2322 is giving it back 3.
2323
2324 The solution is to add a pair of quotes around `tty` to make it a
2325 single word:
2326
2327 if (`tty` == "/dev/console")
2328
2329 should be changed to:
2330
2331 if ("`tty`" == "/dev/console")
2332
2333 Even better, move things that set up terminal sections out of .cshrc
2334 and into .login.
2335
2336
2337 ** SCO
2338 *** Regular expressions matching bugs on SCO systems.
2339
2340 On SCO, there are problems in regexp matching when Emacs is compiled
2341 with the system compiler.  The compiler version is "Microsoft C
2342 version 6", SCO 4.2.0h Dev Sys Maintenance Supplement 01/06/93; Quick
2343 C Compiler Version 1.00.46 (Beta).  The solution is to compile with
2344 GCC.
2345
2346
2347 * Compatibility problems (with Emacs 18, GNU Emacs, or previous XEmacs/lemacs)
2348 ==============================================================================
2349
2350 *** "Symbol's value as variable is void: unread-command-char".
2351  "Wrong type argument: arrayp, #<keymap 143 entries>"
2352  "Wrong type argument: stringp, [#<keypress-event return>]"
2353
2354 There are a few incompatible changes in XEmacs, and these are the
2355 symptoms.  Some of the emacs-lisp code you are running needs to be
2356 updated to be compatible with XEmacs.
2357
2358 The code should not treat keymaps as arrays (use `define-key', etc.),
2359 should not use obsolete variables like `unread-command-char' (use
2360 `unread-command-events').  Many (most) of the new ways of doing things
2361 are compatible in GNU Emacs and XEmacs.
2362
2363 Modern Emacs packages (Gnus, VM, W3, efs, etc) are written to support
2364 GNU Emacs and XEmacs.  We have provided modified versions of several
2365 popular emacs packages (dired, etc) which are compatible with this
2366 version of emacs.  Check to make sure you have not set your load-path
2367 so that your private copies of these packages are being found before
2368 the versions in the lisp directory.
2369
2370 Make sure that your load-path and your $EMACSLOADPATH environment
2371 variable are not pointing at an Emacs18 lisp directory.  This will
2372 cripple emacs.
2373
2374 ** Some packages that worked before now cause the error
2375 Wrong type argument: arrayp, #<face ... >
2376
2377 Code which uses the `face' accessor functions must be recompiled with
2378 xemacs 19.9 or later.  The functions whose callers must be recompiled
2379 are: face-font, face-foreground, face-background,
2380 face-background-pixmap, and face-underline-p.  The .elc files
2381 generated by version 19.9 will work in 19.6 and 19.8, but older .elc
2382 files which contain calls to these functions will not work in 19.9.
2383
2384 ** Signaling: (error "Byte code stack underflow (byte compiler bug), pc 38")
2385
2386 This error is given when XEmacs 20 is compiled without MULE support
2387 but is attempting to load a .elc which requires MULE support.  The fix
2388 is to rebytecompile the offending file.
2389
2390 ** Signaling: (wrong-type-argument ...) when loading mail-abbrevs
2391
2392 The is seen when installing the Insidious Big Brother Data Base (bbdb)
2393 which includes an outdated copy of mail-abbrevs.el.  Remove the copy
2394 that comes with bbdb and use the one that comes with XEmacs.
2395
2396
2397 * MULE issues
2398 =============
2399
2400 ** A reminder: XEmacs/Mule work does not currently receive *any*
2401 funding, and all work is done by volunteers.  If you think you can
2402 help, please contact the XEmacs maintainers.
2403
2404 ** XEmacs/Mule doesn't support TTY's satisfactorily.
2405
2406 This is a major problem, which we plan to address in a future release
2407 of XEmacs.  Basically, XEmacs should have primitives to be told
2408 whether the terminal can handle international output, and which
2409 locale.  Also, it should be able to do approximations of characters to
2410 the nearest supported by the locale.
2411
2412 ** Internationalized (Asian) Isearch doesn't work.
2413
2414 Currently, Isearch doesn't directly support any of the input methods
2415 that are not XIM based (like egg, canna and quail) (and there are
2416 potential problems with XIM version too...).  If you're using egg
2417 there is a workaround.  Hitting <RET> right after C-s to invoke
2418 Isearch will put Isearch in string mode, where a complete string can
2419 be typed into the minibuffer and then processed by Isearch afterwards.
2420 Since egg is now supported in the minibuffer using string mode you can
2421 now use egg to input your Japanese, Korean or Chinese string, then hit
2422 return to send that to Isearch and then use standard Isearch commands
2423 from there.
2424
2425 ** Using egg and mousing around while in 'fence' mode screws up my
2426 buffer.
2427
2428 Don't do this. The fence modes of egg and canna are currently very
2429 modal, and messing with where they expect point to be and what they
2430 think is the current buffer is just asking for trouble. If you're
2431 lucky they will realize that something is awry, and simply delete the
2432 fence, but worst case can trash other buffers too. We've tried to
2433 protect against this where we can, but there still are many ways to
2434 shoot yourself in the foot. So just finish what you are typing into
2435 the fence before reaching for the mouse.
2436
2437 ** Not all languages in Quail are supported like Devanagari and Indian
2438 languages, Lao and Tibetan.
2439
2440 Quail requires more work and testing.  Although it has been ported to
2441 XEmacs, it works really well for Japanese and for the European
2442 languages.
2443
2444 ** Right-to-left mode is not yet implemented, so languages like
2445 Arabic, Hebrew and Thai don't work.
2446
2447 Getting this right requires more work.  It may be implemented in a
2448 future XEmacs version, but don't hold your breath.  If you know
2449 someone who is ready to implement this, please let us know.
2450
2451 ** We need more developers and native language testers.  It's extremely
2452 difficult (and not particularly productive) to address languages that
2453 nobody is using and testing.
2454
2455 ** The kWnn and cWnn support for Chinese and Korean needs developers
2456 and testers.  It probably doesn't work.
2457
2458 ** There are no `native XEmacs' TUTORIALs for any Asian languages,
2459 including Japanese.  FSF Emacs and XEmacs tutorials are quite similar,
2460 so it should be sufficient to skim through the differences and apply
2461 them to the Japanese version.
2462
2463 ** We only have localized menus translated for Japanese, and the
2464 Japanese menus are developing bitrot (the Mule menu appears in
2465 English).
2466
2467 ** XIM is untested for any language other than Japanese.