Fix TTY cursor reset problem
[sxemacs] / PROBLEMS.XEmacs
1                                                   -*- mode:outline -*-
2
3 * XEmacs PROBLEMS file
4 ======================
5
6 Following is a reproduction of the XEmacs PROBLEMS file, preserved for 
7 posterity. Many of the problems mentioned below have been fixed in 
8 SXEmacs (and in XEmacs). 
9
10 Note: Some irrelevant stuff purged (mostly windows rubbish) 2010-04-01
11
12 This file describes various problems that have been encountered
13 in compiling, installing and running XEmacs.  It has been updated for
14 XEmacs 21.5.
15
16 This file is rather large, but we have tried to sort the entries by
17 their respective relevance for XEmacs, but may have not succeeded
18 completely in that task.  The file is divided into four parts:
19
20  - Problems with building XEmacs
21  - Problems with running XEmacs
22  - Compatibility problems
23  - Mule issues
24
25 Use `C-c C-f' to move to the next equal level of outline, and
26 `C-c C-b' to move to previous equal level.  `C-h m' will give more
27 info about the Outline mode.
28
29 Also, Try finding the things you need using one of the search commands
30 XEmacs provides (e.g. `C-s').
31
32 General advice:
33
34     WATCH OUT for your init file! (~/.xemacs/init.el or ~/.emacs)  If
35     you observe strange problems, invoke XEmacs with the `-vanilla'
36     option and see if you can repeat the problem.
37
38     Note that most of the problems described here manifest at RUN
39     time, even those described as BUILD problems.  It is quite unusual
40     for a released XEmacs to fail to build.  So a "build problem"
41     requires you to tweak the build environment, then rebuild XEmacs.
42     A "runtime problem" is one that can be fixed by proper
43     configuration of the existing build.  Compatibility problems and
44     Mule issues are generally runtime problems, but are treated
45     separately for convenience.
46
47
48 * Problems with building XEmacs
49 ===============================
50
51 ** General
52
53     Much general information is in INSTALL.  If it's covered in
54     INSTALL, we don't repeat it here.
55
56 *** How do I configure to get the buffer tabs/progress bars?
57
58 These features depend on support for "native widgets".  Use the
59 --with-widgets option to configure.  Configuration of widgets is
60 automatic for "modern" toolkits (MS Windows, GTK, and Motif), but if
61 you are using Xt and the Athena widgets, you will probably want to
62 specify a "3d" widget set.  See configure --usage, and don't forget to
63 install the corresponding development libraries.
64
65 *** I know I have libfoo installed, but configure doesn't find it.
66
67 Typical of Linux systems with package managers.  To link with a shared
68 library, you only need the shared library.  To compile objects that
69 link with it, you need the headers---and distros don't provide them with
70 the libraries.  You need the additional "development" package, too.
71
72 *** When using gcc, you get the error message "undefined symbol __fixunsdfsi".
73 When using gcc, you get the error message "undefined symbol __main".
74
75 This means that you need to link with the gcc library.  It may be called
76 "gcc-gnulib" or "libgcc.a"; figure out where it is, and define LIB_GCC in
77 config.h to point to it.
78
79 It may also work to use the GCC version of `ld' instead of the standard one.
80
81 *** src/Makefile and lib-src/Makefile are truncated--most of the file missing.
82
83 This can happen if configure uses GNU sed version 2.03.  That version
84 had a bug.  GNU sed version 2.05 works properly.
85
86 ** Motif
87
88 Motif is the X11 version of the Gnus torture test: if there's a way to
89 crash, Motif will find it.  With the open source release of Motif, it
90 seems like a good idea to collect all Motif-related issues in one
91 place.
92
93 You should also look in your OS's section, as it may not be Motif's
94 fault.
95
96 *** XEmacs visibly repaints itty-bitty rectangles very slowly.
97
98 This should only be visible on a slow X connection (ISDN, maybe T1).
99
100 At least some versions of Motif apparently do not implement
101 XtExposeCompressMaximal properly, so it is disabled.  If you wish to
102 experiment, you can remove the #ifdef LWLIB_NEEDS_MOTIF at line 238
103 (or so) of src/EmacsFrame.c, leaving only the line
104
105     /* compress_exposure        */      XtExposeCompressMaximal | XtExposeNoRegion,
106
107 and recompile.  This enables exposure compression, giving a 10:1 or
108 better speedup for some users.  However, on some Motif platforms (Red
109 Hat Linux 9.0 and Solaris 2.8, at least), this causes XEmacs to hang
110 while displaying the progress bar (eg, in font-lock).  A workaround
111 for that problem is to setq `progress-feedback-use-echo-area' to `t'.
112
113 *** XEmacs crashes on exit (#1).
114
115 The backtrace is something like:
116
117     (gdb) where
118     #0  0xfeb9a480 in _libc_kill () from /usr/lib/libc.so.1
119     #1  0x000b0388 in fatal_error_signal ()
120     #2  <signal handler called>
121     #3  YowIter (ht=0xb, id=0x0, v=0x74682074, client=0x47e3c0)
122         at ImageCache.c:1159
123     #4  0xff26cc5c in _LTHashTableForEachItem (ht=0x4725e8,
124         iter=0xff26dda0 <YowIter>, ClientData=0x47e3c0) at Hash.c:671
125     #5  0xff2a4664 in destroy (w=0x496550) at Screen.c:352
126     #6  0xfef92118 in Phase2Destroy () from /usr/openwin/lib/libXt.so.4
127     #7  0xfef91940 in Recursive () from /usr/openwin/lib/libXt.so.4
128     #8  0xfef91e44 in XtPhase2Destroy () from /usr/openwin/lib/libXt.so.4
129     #9  0xfef91ae8 in _XtDoPhase2Destroy () from /usr/openwin/lib/libXt.so.4
130     #10 0xfef918cc in XtDestroyWidget () from /usr/openwin/lib/libXt.so.4
131     #11 0xfef91438 in CloseDisplay () from /usr/openwin/lib/libXt.so.4
132     #12 0xfef91394 in XtCloseDisplay () from /usr/openwin/lib/libXt.so.4
133     #13 0x0025b8b0 in x_delete_device ()
134     #14 0x000940b0 in delete_device_internal ()
135     #15 0x000806a0 in delete_console_internal ()
136
137 This is known to happen with Lesstif version 0.93.36.  Similar
138 backtraces have also been observed on HP/UX and Solaris.  There is a
139 patch for Lesstif.  (This is not a solution; it just stops the crash.
140 It may or may not be harmless, but "it works for the author".)
141
142 Note that this backtrace looks a lot like the one in the next item.
143 However, this one is invulnerable to the Solaris patches mentioned there.
144
145 Frank McIngvale <frankm@hiwaay.net> says:
146
147     Ok, 0.93.34 works, and I tracked down the crash to a section
148     marked "experimental" in 0.93.36. Patch attached, "works for me".
149
150 diff -u -r lesstif-0.93.36/lib/Xm/ImageCache.c lesstif-0.93.36-mod/lib/Xm/ImageCache.c
151 --- lesstif-0.93.36/lib/Xm/ImageCache.c 2002-08-05 14:53:24.000000000 -0500
152 +++ lesstif-0.93.36-mod/lib/Xm/ImageCache.c     2002-11-11 11:13:12.000000000 -0600
153 @@ -1166,5 +1166,4 @@
154         DEBUGOUT(_LtDebug0(__FILE__, NULL, "_LtImageCacheScreenDestroy (XmGetPixmapByDepth) %p\n",
155                 s));
156  
157 -       (void) _LTHashTableForEachItem(PixmapCache, YowIter, (XtPointer)s);
158  }
159
160 *** XEmacs crashes on exit (#2)
161
162 Especially frequent with multiple frames.  Crashes that produce C
163 backtraces like this:
164
165 #0  0xfec9a118 in _libc_kill () from /usr/lib/libc.so.1
166 #1  0x77f48 in fatal_error_signal (sig=11)
167     at /codes/rpluim/xemacs-21.4/src/emacs.c:539
168 #2  <signal handler called>
169 #3  0xfee929f4 in XFindContext () from /usr/openwin/lib/libX11.so.4
170 #4  0xfee92930 in XFindContext () from /usr/openwin/lib/libX11.so.4
171 #5  0xff297e54 in DisplayDestroy () from /usr/dt/lib/libXm.so.4
172 #6  0xfefbece0 in XtCallCallbackList () from /usr/openwin/lib/libXt.so.4
173 #7  0xfefc486c in XtPhase2Destroy () from /usr/openwin/lib/libXt.so.4
174 #8  0xfefc45d0 in _XtDoPhase2Destroy () from /usr/openwin/lib/libXt.so.4
175 #9  0xfefc43b4 in XtDestroyWidget () from /usr/openwin/lib/libXt.so.4
176 #10 0x15cf9c in x_delete_device (d=0x523f00)
177
178 are caused by buggy Motif libraries.  Installing the following patches
179 has been reported to solve the problem on Solaris 2.7:
180
181 107081-40 107656-07
182
183 For information (although they have not been confirmed to work), the
184 equivalent patches for Solaris 2.8 are:
185
186 108940-33 108652-25
187
188 *** On HP-UX 11.0 XEmacs causes excessive X11 errors when running.
189     (also appears on AIX as reported in comp.emacs.xemacs)
190
191 Marcus Thiessel <marcus@xemacs.org>
192
193   Unfortunately, XEmacs releases prior to 21.0 don't work with
194   Motif2.1. It will compile but you will get excessive X11 errors like
195
196   xemacs: X Error of failed request:  BadGC (invalid GC parameter)
197
198   and finally XEmacs gets killed. A workaround is to use the
199   Motif1.2_R6 libraries. You can the following line to your call to
200   configure:
201
202      --x-libraries="/usr/lib/Motif1.2_R6 -L/usr/lib/X11R6"
203
204   Make sure /usr/lib/Motif1.2_R6/libXm.sl is a link to
205   /usr/lib/Motif1.2_R6/libXm.3.
206
207 *** On HP-UX 11.0: Object "" does not have windowed ancestor
208
209 Marcus Thiessel <marcus@xemacs.org>
210
211   XEmacs dies without core file and reports:
212
213     Error: Object "" does not have windowed ancestor.
214
215   This is a bug. Please apply the patch PHSS_19964 (check if
216   superseded). The other alternative is to link with Motif1.2_R6 (see
217   previous item).
218
219 *** Motif dialog boxes lose on Irix.
220
221 Larry Auton <lda@control.att.com> writes:
222 Beware of not specifying
223
224         --with-dialogs=athena
225
226 if it builds with the motif dialogs [boom!] you're a dead man.
227
228
229 ** AIX
230 *** IBM compiler fails: "The character # is not a valid C source character."
231
232 Most recently observed in 21.5.9, due to USE_KKCC ifdefs (they just
233 happen to tickle the implementation).
234
235 Valdis Kletnieks says:
236
237   The problem is that IBM defines a *MACRO* called 'memcpy', and we
238   have stuck a #ifdef/#endif inside the macro call.  As a workaround,
239   try adding '-U__STR__' to your CFLAGS - this will cause string.h to
240   not do a #define for strcpy() to __strcpy() - it uses this for
241   automatic inlining support.
242
243   (For the record, the same issue affects a number of other functions
244   defined in string.h - basically anything the compiler knows how to
245   inline.)
246
247 *** On AIX 4.3, you must specify --with-dialogs=athena with configure
248
249 *** The libXt shipped with AIX 4.3 up to 4.3.2 is broken.  This causes
250     xemacs -nw to fail in various ways.  The official APAR is this:
251
252 APAR NUMBER: <IX89470>            RESOLVED AS: PROGRAM ERROR
253
254 ABSTRACT:
255 <IX89470>: LIBXT.A INCORRECT HANDLING OF EXCEPTIONS IN XTAPPADDINPUT
256
257     The solution is to install X11.base.lib at version >=4.3.2.5.
258
259 *** On AIX, you get this compiler error message:
260
261     Processing include file ./XMenuInt.h
262         1501-106: (S) Include file X11/Xlib.h not found.
263
264 This means your system was installed with only the X11 runtime i.d
265 libraries.  You have to find your sipo (bootable tape) and install
266 X11Dev... with smit.
267
268 *** On AIX 4.1.2, linker error messages such as
269    ld: 0711-212 SEVERE ERROR: Symbol .__quous, found in the global symbol table
270          of archive /usr/lib/libIM.a, was not defined in archive member shr.o.
271
272 This is a problem in libIM.a.  You can work around it by executing
273 these shell commands in the src subdirectory of the directory where
274 you build Emacs:
275
276     cp /usr/lib/libIM.a .
277     chmod 664 libIM.a
278     ranlib libIM.a
279
280 Then change -lIM to ./libIM.a in the command to link temacs (in
281 Makefile).
282
283 *** Excessive optimization on AIX 4.2 can lead to compiler failure.
284
285 Valdis.Kletnieks@vt.edu writes:
286   At least at the b34 level, and the latest-and-greatest IBM xlc
287   (3.1.4.4), there are problems with -O3.  I haven't investigated
288   further.
289
290
291 ** SunOS/Solaris
292 *** Dumping error when using GNU binutils / GNU ld on a Sun.
293
294 Errors similar to the following:
295
296    Dumping under the name xemacs unexec():
297    dldump(/space/rpluim/xemacs-obj/src/xemacs): ld.so.1: ./temacs:
298    fatal: /space/rpluim/xemacs-obj/src/xemacs: unknown dynamic entry:
299    1879048176
300
301 are caused by using GNU ld.  There are several workarounds available:
302
303 In XEmacs 21.2 or later, configure using the new portable dumper
304 (--pdump).
305
306 Alternatively, you can link using the Sun version of ld, which is
307 normally held in /usr/ccs/bin.  This can be done by one of:
308
309 - building gcc with these configure flags:
310   configure --with-ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as
311
312 - adding -B/usr/ccs/bin/ to CFLAGS used to configure XEmacs
313   (Note: The trailing '/' there is significant.)
314
315 - uninstalling GNU ld.
316
317 The Solaris2 FAQ claims:
318
319     When you install gcc, don't make the mistake of installing
320     GNU binutils or GNU libc, they are not as capable as their
321     counterparts you get with Solaris 2.x.
322
323 *** Link failure when using acc on a Sun.
324
325 To use acc, you need additional options just before the libraries, such as
326
327    /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1
328
329 and you need to add -lansi just before -lc.
330
331 The precise file names depend on the compiler version, so we
332 cannot easily arrange to supply them.
333
334 *** Problems finding X11 libraries on Solaris with Openwindows
335
336 Some users have reported problems in this area.  The reported solution
337 is to define the environment variable OPENWINHOME, even if you must set
338 it to `/usr/openwin'.
339
340 *** Sed problems on Solaris 2.5
341
342 There have been reports of Sun sed truncating very lines in the
343 Makefile during configuration.  The workaround is to use GNU sed or,
344 even better, think of a better way to generate Makefile, and send us a
345 patch. :-)
346
347 *** On Solaris 2 I get undefined symbols from libcurses.a.
348
349 You probably have /usr/ucblib/ on your LD_LIBRARY_PATH.  Do the link with
350 LD_LIBRARY_PATH unset.  Generally, avoid using any ucb* stuff when
351 building XEmacs.
352
353 *** On Solaris 2 I cannot make alloc.o, glyphs.o or process.o.
354
355 The SparcWorks C compiler may have difficulty building those modules
356 with optimization level -xO4.  Try using only "-fast" optimization
357 for just those modules.  (Or use gcc).
358
359 *** Solaris 2.3 /bin/sh coredumps during configuration.
360
361 This only occurs if you have LANG != C.  This is a known bug with
362 /bin/sh fixed by installing Patch-ID# 101613-01.  Or, you can use
363 bash by setting the environment variable CONFIG_SHELL to /bin/bash
364
365 *** Solaris 2.x configure/Makefile syntax "errors"
366
367 This is a known bug with /bin/sh and /bin/test, i.e. they do not
368 support the XPG4 standard.  You can use bash as a workaround or an
369 XPG4-compliant Bourne shell such as the Sun-supplied /usr/xpg4/bin/sh
370 by setting the environment variable CONFIG_SHELL to /usr/xpg4/bin/sh
371
372 *** On SunOS, you get linker errors
373     ld: Undefined symbol
374        _get_wmShellWidgetClass
375        _get_applicationShellWidgetClass
376
377 The fix to this is to install patch 100573 for OpenWindows 3.0
378 or link libXmu statically.
379
380 *** On Sunos 4, you get the error ld: Undefined symbol __lib_version.
381
382 This is the result of using cc or gcc with the shared library meant
383 for acc (the Sunpro compiler).  Check your LD_LIBRARY_PATH and delete
384 /usr/lang/SC2.0.1 or some similar directory.
385
386 *** Undefined symbols when linking on Sunos 4.1.
387
388 If you get the undefined symbols _atowc _wcslen, _iswprint, _iswspace,
389 _iswcntrl, _wcscpy, and _wcsncpy, then you need to add -lXwchar after
390 -lXaw in the command that links temacs.
391
392 This problem seems to arise only when the international language
393 extensions to X11R5 are installed.
394
395 *** On a Sun running SunOS 4.1.1, you get this error message from GNU ld:
396
397     /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment
398
399 The problem is in the Sun shared C library, not in GNU ld.
400
401 The solution is to install Patch-ID# 100267-03 from Sun.
402
403 *** SunOS 4.1.2: undefined symbol _get_wmShellWidgetClass
404
405   Apparently the version of libXmu.so.a that Sun ships is hosed: it's missing
406   some stuff that is in libXmu.a (the static version).  Sun has a patch for
407   this, but a workaround is to use the static version of libXmu, by changing
408   the link command from "-lXmu" to "-Bstatic -lXmu -Bdynamic".  If you have
409   OpenWindows 3.0, ask Sun for these patches:
410     100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
411     100573-03       4.1.x OpenWindows 3.0 undefined symbols with shared libXmu
412
413 *** Random other SunOS 4.1.[12] link errors.
414
415   The X headers and libraries that Sun ships in /usr/{include,lib}/X11 are
416   broken.  Use the ones in /usr/openwin/{include,lib} instead.
417
418 ** Linux
419
420 See also Intel Architecture General, above.
421
422 *** Under Linux, you get "too many arguments to function `getpgrp'".
423
424 You have probably installed LessTiff under `/usr/local' and `libXm.so'
425 could not be found when linking `getpgrp()' test program, making XEmacs
426 think that `getpgrp()' takes an argument. Try adding `/usr/local/lib'
427 in `/etc/ld.so.conf' and run `ldconfig'. Then run XEmacs's `configure'
428 again.  As with all problems of this type, reading the config.log file
429 generated from configure and seeing the log of how the test failed can
430 prove enlightening.
431
432 *** `Error: No ExtNode to pop!' on Linux systems with Lesstif.
433
434 This error message has been observed with lesstif-0.75a.  It does not
435 appear to cause any harm.
436
437 ** IRIX
438
439 *** More coredumping in Irix (6.5 known to be vulnerable)
440
441 No fix is known yet.  Here's the best information we have:
442
443 Valdis Kletnieks <Valdis.Kletnieks@vt.edu> writes:
444
445   Were xemacs and [any 3rd party, locally-compiled] libraries [you use]
446   all compiled with the same ABI ( -o32, -n32, -64) and
447   mips2/mips3/mips4 flags, and are they appropriate for the machine in
448   question?  I know the IP30 implies an Octane, so it should be an R10K
449   chipset and above such nonsense, but I've seen the most astoundingly
450   bizzare crashes when somebody managed to compile with -mips4 and get
451   it to run on an R4400 or R5K system. ;)
452
453   Also, since you're using gcc, try re-running fixincludes and *then*
454   rebuilding xemacs and [any] libraries - mismatched headers can do that
455   sort of thing to you with little or no clue what's wrong (often you
456   get screwed when one routine does an malloc(sizeof(foo_struct)) and
457   passes the result to something that things foo_struct is a bit bigger,
458   trashing memory..