Add "Emacs crashes on startup after a glibc upgrade."
[bpt/emacs.git] / etc / PROBLEMS
CommitLineData
5b87ad55
GM
1Copyright (C) 1987, 1988, 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2 2001, 2002, 2003, 2004, 2005, 2006, 2007
3 Free Software Foundation, Inc.
4See the end of the file for license conditions.
5
6
a933dad1 7This file describes various problems that have been encountered
0a4dd4e4 8in compiling, installing and running GNU Emacs. Try doing Ctl-C Ctl-t
9dc15871 9and browsing through the outline headers.
a933dad1 10
9dc15871 11* Emacs startup failures
32364f49 12
9dc15871 13** Emacs fails to start, complaining about missing fonts.
32364f49 14
9dc15871 15A typical error message might be something like
32364f49 16
9dc15871 17 No fonts match `-*-fixed-medium-r-*--6-*-*-*-*-*-iso8859-1'
984002eb 18
9dc15871
EZ
19This happens because some X resource specifies a bad font family for
20Emacs to use. The possible places where this specification might be
21are:
984002eb 22
9dc15871 23 - in your ~/.Xdefaults file
984002eb 24
9dc15871
EZ
25 - client-side X resource file, such as ~/Emacs or
26 /usr/X11R6/lib/app-defaults/Emacs or
27 /usr/X11R6/lib/X11/app-defaults/Emacs
984002eb 28
9dc15871
EZ
29One of these files might have bad or malformed specification of a
30fontset that Emacs should use. To fix the problem, you need to find
31the problematic line(s) and correct them.
984002eb 32
9dc15871 33** Emacs aborts while starting up, only when run without X.
984002eb 34
9dc15871
EZ
35This problem often results from compiling Emacs with GCC when GCC was
36installed incorrectly. The usual error in installing GCC is to
37specify --includedir=/usr/include. Installation of GCC makes
38corrected copies of the system header files. GCC is supposed to use
39the corrected copies in preference to the original system headers.
40Specifying --includedir=/usr/include causes the original system header
41files to be used. On some systems, the definition of ioctl in the
42original system header files is invalid for ANSI C and causes Emacs
43not to work.
984002eb 44
9dc15871
EZ
45The fix is to reinstall GCC, and this time do not specify --includedir
46when you configure it. Then recompile Emacs. Specifying --includedir
47is appropriate only in very special cases and it should *never* be the
48same directory where system header files are kept.
984002eb 49
9dc15871 50** Emacs does not start, complaining that it cannot open termcap database file.
984002eb 51
9dc15871
EZ
52If your system uses Terminfo rather than termcap (most modern
53systems do), this could happen if the proper version of
54ncurses is not visible to the Emacs configure script (i.e. it
55cannot be found along the usual path the linker looks for
56libraries). It can happen because your version of ncurses is
57obsolete, or is available only in form of binaries.
f16a1bf6 58
9dc15871
EZ
59The solution is to install an up-to-date version of ncurses in
60the developer's form (header files, static libraries and
61symbolic links); in some GNU/Linux distributions (e.g. Debian)
62it constitutes a separate package.
f16a1bf6 63
9dc15871 64** Emacs 20 and later fails to load Lisp files at startup.
5b4ffca2 65
9dc15871 66The typical error message might be like this:
5b4ffca2 67
9dc15871 68 "Cannot open load file: fontset"
24efe898 69
9dc15871
EZ
70This could happen if you compress the file lisp/subdirs.el. That file
71tells Emacs what are the directories where it should look for Lisp
72files. Emacs cannot work with subdirs.el compressed, since the
73Auto-compress mode it needs for this will not be loaded until later,
74when your .emacs file is processed. (The package `fontset.el' is
75required to set up fonts used to display text on window systems, and
76it's loaded very early in the startup procedure.)
24efe898 77
9dc15871
EZ
78Similarly, any other .el file for which there's no corresponding .elc
79file could fail to load if it is compressed.
24efe898 80
9dc15871
EZ
81The solution is to uncompress all .el files which don't have a .elc
82file.
f0f62f71 83
9dc15871
EZ
84Another possible reason for such failures is stale *.elc files
85lurking somewhere on your load-path. The following command will
86print any duplicate Lisp files that are present in load-path:
f0f62f71 87
9dc15871 88 emacs -q -batch -f list-load-path-shadows
f0f62f71 89
9dc15871
EZ
90If this command prints any file names, some of these files are stale,
91and should be deleted or their directories removed from your
92load-path.
fc1bfc2a 93
9dc15871 94** Emacs prints an error at startup after upgrading from an earlier version.
fc1bfc2a 95
9dc15871 96An example of such an error is:
fc1bfc2a 97
9dc15871 98 x-complement-fontset-spec: "Wrong type argument: stringp, nil"
60f553d2 99
9dc15871
EZ
100This can be another symptom of stale *.elc files in your load-path.
101The following command will print any duplicate Lisp files that are
102present in load-path:
3f82efb4 103
9dc15871 104 emacs -q -batch -f list-load-path-shadows
3f82efb4 105
9dc15871
EZ
106If this command prints any file names, some of these files are stale,
107and should be deleted or their directories removed from your
108load-path.
3f82efb4 109
9dc15871 110** With X11R6.4, public-patch-3, Emacs crashes at startup.
3f82efb4 111
9dc15871 112Reportedly this patch in X fixes the problem.
cc305a60 113
9dc15871
EZ
114 --- xc/lib/X11/imInt.c~ Wed Jun 30 13:31:56 1999
115 +++ xc/lib/X11/imInt.c Thu Jul 1 15:10:27 1999
116 @@ -1,4 +1,4 @@
117 -/* $TOG: imInt.c /main/5 1998/05/30 21:11:16 kaleb $ */
118 +/* $TOG: imInt.c /main/5 1998/05/30 21:11:16 kaleb $ */
119 /******************************************************************
cc305a60 120
9dc15871
EZ
121 Copyright 1992, 1993, 1994 by FUJITSU LIMITED
122 @@ -166,8 +166,8 @@
123 _XimMakeImName(lcd)
124 XLCd lcd;
125 {
126 - char* begin;
127 - char* end;
128 + char* begin = NULL;
129 + char* end = NULL;
130 char* ret;
131 int i = 0;
132 char* ximmodifier = XIMMODIFIER;
133 @@ -182,7 +182,11 @@
134 }
135 ret = Xmalloc(end - begin + 2);
136 if (ret != NULL) {
137 - (void)strncpy(ret, begin, end - begin + 1);
138 + if (begin != NULL) {
139 + (void)strncpy(ret, begin, end - begin + 1);
140 + } else {
141 + ret[0] = '\0';
142 + }
143 ret[end - begin + 1] = '\0';
144 }
145 return ret;
fc2938d1 146
13673952
CY
147** Emacs crashes on startup after a glibc upgrade.
148
149This is caused by a binary incompatible change to the malloc
150implementation in glibc 2.5.90-22. As a result, Emacs binaries built
151using prior versions of glibc crash when run under 2.5.90-22.
152
153This problem was first seen in pre-release version of Fedora 7, and
154may be fixed in the final Fedora 7 release. To stop the crash from
155happening, first try upgrading to the newest version of glibc; if this
156does not work, rebuild Emacs with the same version of glibc that you
157will run it under. For details, see
158
159https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239344
160
161
9dc15871 162* Crash bugs
fc2938d1 163
9dc15871 164** Emacs crashes in x-popup-dialog.
177c0ea7 165
9dc15871
EZ
166This can happen if the dialog widget cannot find the font it wants to
167use. You can work around the problem by specifying another font with
168an X resource--for example, `Emacs.dialog*.font: 9x15' (or any font that
169happens to exist on your X server).
fc2938d1 170
9dc15871 171** Emacs crashes when you use Bibtex mode.
fc2938d1 172
9dc15871
EZ
173This happens if your system puts a small limit on stack size. You can
174prevent the problem by using a suitable shell command (often `ulimit')
175to raise the stack size limit before you run Emacs.
2aa82bcf 176
9dc15871
EZ
177Patches to raise the stack size limit automatically in `main'
178(src/emacs.c) on various systems would be greatly appreciated.
2aa82bcf 179
9dc15871
EZ
180** Error message `Symbol's value as variable is void: x', followed by
181a segmentation fault and core dump.
c93bdf05 182
9dc15871
EZ
183This has been tracked to a bug in tar! People report that tar erroneously
184added a line like this at the beginning of files of Lisp code:
4593687f 185
9dc15871 186 x FILENAME, N bytes, B tape blocks
9272ccfc 187
9dc15871
EZ
188If your tar has this problem, install GNU tar--if you can manage to
189untar it :-).
9272ccfc 190
9dc15871
EZ
191** Crashes when displaying GIF images in Emacs built with version
192libungif-4.1.0 are resolved by using version libungif-4.1.0b1.
193Configure checks for the correct version, but this problem could occur
194if a binary built against a shared libungif is run on a system with an
195older version.
9272ccfc 196
9dc15871 197** Emacs aborts inside the function `tparam1'.
7aa70236 198
9dc15871
EZ
199This can happen if Emacs was built without terminfo support, but the
200terminal's capabilities use format that is only supported by terminfo.
201If your system has ncurses installed, this might happen if your
202version of ncurses is broken; upgrading to a newer version of ncurses
203and reconfiguring and rebuilding Emacs should solve this.
7aa70236 204
9dc15871
EZ
205All modern systems support terminfo, so even if ncurses is not the
206problem, you should look for a way to configure Emacs so that it uses
207terminfo when built.
7c22dc9d 208
9dc15871 209** Emacs crashes when using the Exceed 6.0 X server.
7c22dc9d 210
9dc15871
EZ
211If you are using Exceed 6.1, upgrade to a later version. This was
212reported to prevent the crashes.
7c22dc9d 213
9dc15871 214** Emacs crashes with SIGSEGV in XtInitializeWidgetClass.
7c22dc9d 215
9dc15871 216It crashes on X, but runs fine when called with option "-nw".
7c22dc9d 217
9dc15871
EZ
218This has been observed when Emacs is linked with GNU ld but without passing
219the -z nocombreloc flag. Emacs normally knows to pass the -z nocombreloc
220flag when needed, so if you come across a situation where the flag is
221necessary but missing, please report it via M-x report-emacs-bug.
677e7496 222
9dc15871
EZ
223On platforms such as Solaris, you can also work around this problem by
224configuring your compiler to use the native linker instead of GNU ld.
677e7496 225
1437ec2b
JD
226** Emacs compiled with Gtk+ crashes when closing a display (x-close-connection).
227
228This happens because of bugs in Gtk+. Gtk+ 2.10 seems to be OK. See bug
229http://bugzilla.gnome.org/show_bug.cgi?id=85715.
230
1020d879 231** Emacs compiled with Gtk+ crashes on startup on Cygwin.
6df79155
JD
232
233A typical error message is
dc13f3f5 234 ***MEMORY-ERROR***: emacs[5172]: GSlice: failed to allocate 504 bytes
6df79155
JD
235 (alignment: 512): Function not implemented
236
237Emacs supplies its own malloc, but glib (part of Gtk+) calls memalign and on
1020d879
EZ
238Cygwin, that becomes the Cygwin supplied memalign. As malloc is not the
239Cygwin malloc, the Cygwin memalign always returns ENOSYS. A fix for this
6df79155
JD
240problem would be welcome.
241
9dc15871 242* General runtime problems
677e7496 243
9dc15871 244** Lisp problems
677e7496 245
9dc15871 246*** Changes made to .el files do not take effect.
677e7496 247
9dc15871
EZ
248You may have forgotten to recompile them into .elc files.
249Then the old .elc files will be loaded, and your changes
250will not be seen. To fix this, do M-x byte-recompile-directory
251and specify the directory that contains the Lisp files.
677e7496 252
9dc15871
EZ
253Emacs should print a warning when loading a .elc file which is older
254than the corresponding .el file.
9ed04369 255
9dc15871 256*** Watch out for .emacs files and EMACSLOADPATH environment vars.
9ed04369 257
9dc15871
EZ
258These control the actions of Emacs.
259~/.emacs is your Emacs init file.
260EMACSLOADPATH overrides which directories the function
261"load" will search.
b87207a0 262
9dc15871
EZ
263If you observe strange problems, check for these and get rid
264of them, then try again.
b87207a0 265
9dc15871 266*** Using epop3.el package causes Emacs to signal an error.
177c0ea7 267
9dc15871 268The error message might be something like this:
177c0ea7 269
9dc15871 270 "Lisp nesting exceeds max-lisp-eval-depth"
177c0ea7 271
9dc15871
EZ
272This happens because epop3 redefines the function gethash, which is a
273built-in primitive beginning with Emacs 21.1. We don't have a patch
274for epop3 that fixes this, but perhaps a newer version of epop3
275corrects that.
177c0ea7 276
9dc15871 277*** Buffers from `with-output-to-temp-buffer' get set up in Help mode.
b87207a0 278
9dc15871
EZ
279Changes in Emacs 20.4 to the hooks used by that function cause
280problems for some packages, specifically BBDB. See the function's
281documentation for the hooks involved. BBDB 2.00.06 fixes the problem.
61638355 282
9dc15871
EZ
283*** The Hyperbole package causes *Help* buffers not to be displayed in
284Help mode due to setting `temp-buffer-show-hook' rather than using
285`add-hook'. Using `(add-hook 'temp-buffer-show-hook
286'help-mode-maybe)' after loading Hyperbole should fix this.
61638355 287
9dc15871 288** Keyboard problems
a47a639f 289
9dc15871 290*** "Compose Character" key does strange things when used as a Meta key.
a47a639f 291
9dc15871
EZ
292If you define one key to serve as both Meta and Compose Character, you
293will get strange results. In previous Emacs versions, this "worked"
294in that the key acted as Meta--that's because the older Emacs versions
295did not try to support Compose Character. Now Emacs tries to do
296character composition in the standard X way. This means that you
297must pick one meaning or the other for any given key.
a47a639f 298
9dc15871
EZ
299You can use both functions (Meta, and Compose Character) if you assign
300them to two different keys.
a47a639f 301
9dc15871 302*** C-z just refreshes the screen instead of suspending Emacs.
61638355 303
9dc15871
EZ
304You are probably using a shell that doesn't support job control, even
305though the system itself is capable of it. Either use a different shell,
306or set the variable `cannot-suspend' to a non-nil value.
61638355 307
9dc15871
EZ
308*** With M-x enable-flow-control, you need to type C-\ twice
309to do incremental search--a single C-\ gets no response.
61638355 310
9dc15871
EZ
311This has been traced to communicating with your machine via kermit,
312with C-\ as the kermit escape character. One solution is to use
313another escape character in kermit. One user did
61638355 314
9dc15871 315 set escape-character 17
61638355 316
9dc15871 317in his .kermrc file, to make C-q the kermit escape character.
61638355 318
9dc15871 319** Mailers and other helper programs
61638355 320
9dc15871 321*** movemail compiled with POP support can't connect to the POP server.
61638355 322
9dc15871
EZ
323Make sure that the `pop' entry in /etc/services, or in the services
324NIS map if your machine uses NIS, has the same port number as the
325entry on the POP server. A common error is for the POP server to be
326listening on port 110, the assigned port for the POP3 protocol, while
327the client is trying to connect on port 109, the assigned port for the
328old POP protocol.
61638355 329
9dc15871 330*** RMAIL gets error getting new mail.
61638355 331
9dc15871
EZ
332RMAIL gets new mail from /usr/spool/mail/$USER using a program
333called `movemail'. This program interlocks with /bin/mail using
334the protocol defined by /bin/mail.
61638355 335
9dc15871
EZ
336There are two different protocols in general use. One of them uses
337the `flock' system call. The other involves creating a lock file;
338`movemail' must be able to write in /usr/spool/mail in order to do
339this. You control which one is used by defining, or not defining,
340the macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes.
341IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
342SYSTEM, YOU CAN LOSE MAIL!
61638355 343
9dc15871 344If your system uses the lock file protocol, and fascist restrictions
9dc15871
EZ
345prevent ordinary users from writing the lock files in /usr/spool/mail,
346you may need to make `movemail' setgid to a suitable group such as
347`mail'. To do this, use the following commands (as root) after doing the
348make install.
61638355 349
9dc15871
EZ
350 chgrp mail movemail
351 chmod 2755 movemail
61638355 352
9dc15871
EZ
353Installation normally copies movemail from the build directory to an
354installation directory which is usually under /usr/local/lib. The
355installed copy of movemail is usually in the directory
356/usr/local/lib/emacs/VERSION/TARGET. You must change the group and
357mode of the installed copy; changing the group and mode of the build
358directory copy is ineffective.
61638355 359
9dc15871 360*** rcs2log gives you the awk error message "too many fields".
61638355 361
9dc15871
EZ
362This is due to an arbitrary limit in certain versions of awk.
363The solution is to use gawk (GNU awk).
556a9fad 364
9dc15871 365** Problems with hostname resolution
61638355 366
9dc15871
EZ
367*** Emacs fails to understand most Internet host names, even though
368the names work properly with other programs on the same system.
369*** Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0.
20dc2215 370*** Gnus can't make contact with the specified host for nntp.
49172314 371
9dc15871
EZ
372This typically happens on Suns and other systems that use shared
373libraries. The cause is that the site has installed a version of the
374shared library which uses a name server--but has not installed a
375similar version of the unshared library which Emacs uses.
96bde66b 376
9dc15871
EZ
377The result is that most programs, using the shared library, work with
378the nameserver, but Emacs does not.
ed0d1d91 379
9dc15871
EZ
380The fix is to install an unshared library that corresponds to what you
381installed in the shared library, and then relink Emacs.
6e1a66dc 382
9dc15871
EZ
383On SunOS 4.1, simply define HAVE_RES_INIT.
384
385If you have already installed the name resolver in the file libresolv.a,
386then you need to compile Emacs to use that library. The easiest way to
387do this is to add to config.h a definition of LIBS_SYSTEM, LIBS_MACHINE
388or LIB_STANDARD which uses -lresolv. Watch out! If you redefine a macro
389that is already in use in your configuration to supply some other libraries,
390be careful not to lose the others.
6e1a66dc 391
9dc15871 392Thus, you could start by adding this to config.h:
3c418e54 393
9dc15871 394#define LIBS_SYSTEM -lresolv
3c418e54 395
9dc15871
EZ
396Then if this gives you an error for redefining a macro, and you see that
397the s- file defines LIBS_SYSTEM as -lfoo -lbar, you could change config.h
398again to say this:
3c418e54 399
9dc15871 400#define LIBS_SYSTEM -lresolv -lfoo -lbar
f9130829 401
9dc15871
EZ
402*** Emacs does not know your host's fully-qualified domain name.
403
53b30c38
GM
404For example, (system-name) returns some variation on
405"localhost.localdomain", rather the name you were expecting.
406
9dc15871 407You need to configure your machine with a fully qualified domain name,
53b30c38
GM
408(i.e. a name with at least one ".") either in /etc/hosts,
409/etc/hostname, the NIS, or wherever your system calls for specifying
410this.
9dc15871
EZ
411
412If you cannot fix the configuration, you can set the Lisp variable
413mail-host-address to the value you want.
414
415** NFS and RFS
416
417*** Emacs says it has saved a file, but the file does not actually
418appear on disk.
419
420This can happen on certain systems when you are using NFS, if the
421remote disk is full. It is due to a bug in NFS (or certain NFS
422implementations), and there is apparently nothing Emacs can do to
423detect the problem. Emacs checks the failure codes of all the system
424calls involved in writing a file, including `close'; but in the case
425where the problem occurs, none of those system calls fails.
426
427*** Editing files through RFS gives spurious "file has changed" warnings.
428It is possible that a change in Emacs 18.37 gets around this problem,
429but in case not, here is a description of how to fix the RFS bug that
430causes it.
431
432 There was a serious pair of bugs in the handling of the fsync() system
433 call in the RFS server.
434
435 The first is that the fsync() call is handled as another name for the
436 close() system call (!!). It appears that fsync() is not used by very
437 many programs; Emacs version 18 does an fsync() before closing files
438 to make sure that the bits are on the disk.
439
440 This is fixed by the enclosed patch to the RFS server.
441
442 The second, more serious problem, is that fsync() is treated as a
443 non-blocking system call (i.e., it's implemented as a message that
444 gets sent to the remote system without waiting for a reply). Fsync is
445 a useful tool for building atomic file transactions. Implementing it
446 as a non-blocking RPC call (when the local call blocks until the sync
447 is done) is a bad idea; unfortunately, changing it will break the RFS
448 protocol. No fix was supplied for this problem.
449
450 (as always, your line numbers may vary)
451
452 % rcsdiff -c -r1.2 serversyscall.c
453 RCS file: RCS/serversyscall.c,v
454 retrieving revision 1.2
455 diff -c -r1.2 serversyscall.c
456 *** /tmp/,RCSt1003677 Wed Jan 28 15:15:02 1987
457 --- serversyscall.c Wed Jan 28 15:14:48 1987
458 ***************
459 *** 163,169 ****
460 /*
461 * No return sent for close or fsync!
462 */
463 ! if (syscall == RSYS_close || syscall == RSYS_fsync)
464 proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
465 else
466 {
467 --- 166,172 ----
468 /*
469 * No return sent for close or fsync!
470 */
471 ! if (syscall == RSYS_close)
472 proc->p_returnval = deallocate_fd(proc, msg->m_args[0]);
473 else
474 {
475
476** PSGML
477
478*** Old versions of the PSGML package use the obsolete variables
479`before-change-function' and `after-change-function', which are no
480longer used by Emacs. Please use PSGML 1.2.3 or later.
481
482*** PSGML conflicts with sgml-mode.
483
484PSGML package uses the same names of some variables (like keymap)
485as built-in sgml-mode.el because it was created as a replacement
486of that package. The conflict will be shown if you load
487sgml-mode.el before psgml.el. E.g. this could happen if you edit
488HTML page and then start to work with SGML or XML file. html-mode
489(from sgml-mode.el) is used for HTML file and loading of psgml.el
490(for sgml-mode or xml-mode) will cause an error.
491
492*** Versions of the PSGML package earlier than 1.0.3 (stable) or 1.1.2
493(alpha) fail to parse DTD files correctly in Emacs 20.3 and later.
494Here is a patch for psgml-parse.el from PSGML 1.0.1 and, probably,
495earlier versions.
496
497--- psgml-parse.el 1998/08/21 19:18:18 1.1
498+++ psgml-parse.el 1998/08/21 19:20:00
499@@ -2383,7 +2383,7 @@ (defun sgml-push-to-entity (entity &opti
500 (setq sgml-buffer-parse-state nil))
501 (cond
502 ((stringp entity) ; a file name
503- (save-excursion (insert-file-contents entity))
504+ (insert-file-contents entity)
505 (setq default-directory (file-name-directory entity)))
506 ((consp (sgml-entity-text entity)) ; external id?
507 (let* ((extid (sgml-entity-text entity))
508
90a02640 509** AUCTeX
9dc15871 510
90a02640
DK
511You should not be using a version older than 11.52 if you can avoid
512it.
9dc15871 513
90a02640
DK
514*** Emacs 21 freezes when visiting a TeX file with AUCTeX installed.
515
516Emacs 21 needs version 10 or later of AUCTeX; upgrading should solve
9dc15871
EZ
517these problems.
518
90a02640 519*** No colors in AUCTeX with Emacs 21.
9dc15871
EZ
520
521Upgrade to AUC TeX version 10 or later, and make sure it is
522byte-compiled with Emacs 21.
523
73639601
EZ
524** PCL-CVS
525
526*** Lines are not updated or new lines are added in the buffer upon commit.
527
528When committing files located higher in the hierarchy than the examined
529directory, some versions of the CVS program return an ambiguous message
530from which PCL-CVS cannot extract the full location of the committed
531files. As a result, the corresponding lines in the PCL-CVS buffer are
532not updated with the new revision of these files, and new lines are
533added to the top-level directory.
534
535This can happen with CVS versions 1.12.8 and 1.12.9. Upgrade to CVS
5361.12.10 or newer to fix this problem.
537
9dc15871
EZ
538** Miscellaneous problems
539
540*** Self-documentation messages are garbled.
541
542This means that the file `etc/DOC-...' doesn't properly correspond
543with the Emacs executable. Redumping Emacs and then installing the
544corresponding pair of files should fix the problem.
545
546*** Programs running under terminal emulator do not recognize `emacs'
547terminal type.
548
549The cause of this is a shell startup file that sets the TERMCAP
550environment variable. The terminal emulator uses that variable to
551provide the information on the special terminal type that Emacs
552emulates.
553
554Rewrite your shell startup file so that it does not change TERMCAP
555in such a case. You could use the following conditional which sets
556it only if it is undefined.
557
558 if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file
559
560Or you could set TERMCAP only when you set TERM--which should not
561happen in a non-login shell.
562
563*** In Shell mode, you get a ^M at the end of every line.
564
565This happens to people who use tcsh, because it is trying to be too
566smart. It sees that the Shell uses terminal type `unknown' and turns
567on the flag to output ^M at the end of each line. You can fix the
568problem by adding this to your .cshrc file:
569
570 if ($?EMACS) then
4b1aaa8b 571 if ("$EMACS" =~ /*) then
9dc15871
EZ
572 unset edit
573 stty -icrnl -onlcr -echo susp ^Z
574 endif
575 endif
576
577*** Emacs startup on GNU/Linux systems (and possibly other systems) is slow.
578
579This can happen if the system is misconfigured and Emacs can't get the
580full qualified domain name, FQDN. You should have your FQDN in the
581/etc/hosts file, something like this:
582
583127.0.0.1 localhost
584129.187.137.82 nuc04.t30.physik.tu-muenchen.de nuc04
585
586The way to set this up may vary on non-GNU systems.
587
588*** Attempting to visit remote files via ange-ftp fails.
589
590If the error message is "ange-ftp-file-modtime: Specified time is not
591representable", then this could happen when `lukemftp' is used as the
592ftp client. This was reported to happen on Debian GNU/Linux, kernel
593version 2.4.3, with `lukemftp' 1.5-5, but might happen on other
594systems as well. To avoid this problem, switch to using the standard
595ftp client. On a Debian system, type
596
597 update-alternatives --config ftp
598
599and then choose /usr/bin/netkit-ftp.
600
601*** JPEG images aren't displayed.
602
603This has been reported when Emacs is built with jpeg-6a library.
604Upgrading to jpeg-6b solves the problem. Configure checks for the
605correct version, but this problem could occur if a binary built
606against a shared libjpeg is run on a system with an older version.
607
608*** Dired is very slow.
609
610This could happen if invocation of the `df' program takes a long
611time. Possible reasons for this include:
612
613 - ClearCase mounted filesystems (VOBs) that sometimes make `df'
614 response time extremely slow (dozens of seconds);
615
616 - slow automounters on some old versions of Unix;
617
618 - slow operation of some versions of `df'.
619
620To work around the problem, you could either (a) set the variable
621`directory-free-space-program' to nil, and thus prevent Emacs from
622invoking `df'; (b) use `df' from the GNU Fileutils package; or
623(c) use CVS, which is Free Software, instead of ClearCase.
624
625*** Versions of the W3 package released before Emacs 21.1 don't run
626under Emacs 21. This fixed in W3 version 4.0pre.47.
627
628*** The LDAP support rely on ldapsearch program from OpenLDAP version 2.
629
630It can fail to work with ldapsearch program from OpenLDAP version 1.
631Version 1 of OpenLDAP is now deprecated. If you are still using it,
632please upgrade to version 2. As a temporary workaround, remove
633argument "-x" from the variable `ldap-ldapsearch-args'.
634
635*** ps-print commands fail to find prologue files ps-prin*.ps.
636
637This can happen if you use an old version of X-Symbol package: it
638defines compatibility functions which trick ps-print into thinking it
639runs in XEmacs, and look for the prologue files in a wrong directory.
640
641The solution is to upgrade X-Symbol to a later version.
642
643*** On systems with shared libraries you might encounter run-time errors
644from the dynamic linker telling you that it is unable to find some
645shared libraries, for instance those for Xaw3d or image support.
646These errors mean Emacs has been linked with a library whose shared
647library is not in the default search path of the dynamic linker.
648
649Similar problems could prevent Emacs from building, since the build
650process invokes Emacs several times.
651
652On many systems, it is possible to set LD_LIBRARY_PATH in your
653environment to specify additional directories where shared libraries
654can be found.
655
656Other systems allow to set LD_RUN_PATH in a similar way, but before
657Emacs is linked. With LD_RUN_PATH set, the linker will include a
658specified run-time search path in the executable.
659
660On some systems, Emacs can crash due to problems with dynamic
661linking. Specifically, on SGI Irix 6.5, crashes were reported with
662backtraces like this:
663
664 (dbx) where
665 0 strcmp(0xf49239d, 0x4031184, 0x40302b4, 0x12, 0xf0000000, 0xf4923aa, 0x0, 0x492ddb2) ["/xlv22/ficus-jan23/work/irix/lib/libc/libc_n32_M3_ns/strings/strcmp.s":35, 0xfb7e480]
666 1 general_find_symbol(0xf49239d, 0x0, 0x0, 0x0, 0xf0000000, 0xf4923aa, 0x0, 0x492ddb2)
667 ["/comp2/mtibuild/v73/workarea/v7.3/rld/rld.c":2140, 0xfb65a98]
668 2 resolve_symbol(0xf49239d, 0x4031184, 0x0, 0xfbdd438, 0x0, 0xf4923aa, 0x0, 0x492ddb2)
669 ["/comp2/mtibuild/v73/workarea/v7.3/rld/rld.c":1947, 0xfb657e4]
670 3 lazy_text_resolve(0xd18, 0x1a3, 0x40302b4, 0x12, 0xf0000000, 0xf4923aa, 0x0, 0x492ddb2)
671 ["/comp2/mtibuild/v73/workarea/v7.3/rld/rld.c":997, 0xfb64d44]
672 4 _rld_text_resolve(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
673 ["/comp2/mtibuild/v73/workarea/v7.3/rld/rld_bridge.s":175, 0xfb6032c]
674
675(`rld' is the dynamic linker.) We don't know yet why this
676happens, but setting the environment variable LD_BIND_NOW to 1 (which
677forces the dynamic linker to bind all shared objects early on) seems
678to work around the problem.
679
680Please refer to the documentation of your dynamic linker for details.
681
682*** You request inverse video, and the first Emacs frame is in inverse
683video, but later frames are not in inverse video.
684
685This can happen if you have an old version of the custom library in
686your search path for Lisp packages. Use M-x list-load-path-shadows to
687check whether this is true. If it is, delete the old custom library.
688
689*** When you run Ispell from Emacs, it reports a "misalignment" error.
690
691This can happen if you compiled the Ispell program to use ASCII
692characters only and then try to use it from Emacs with non-ASCII
693characters, like Latin-1. The solution is to recompile Ispell with
694support for 8-bit characters.
695
696To see whether your Ispell program supports 8-bit characters, type
697this at your shell's prompt:
698
699 ispell -vv
700
701and look in the output for the string "NO8BIT". If Ispell says
702"!NO8BIT (8BIT)", your speller supports 8-bit characters; otherwise it
703does not.
704
705To rebuild Ispell with 8-bit character support, edit the local.h file
706in the Ispell distribution and make sure it does _not_ define NO8BIT.
707Then rebuild the speller.
708
709Another possible cause for "misalignment" error messages is that the
710version of Ispell installed on your machine is old. Upgrade.
711
712Yet another possibility is that you are trying to spell-check a word
713in a language that doesn't fit the dictionary you choose for use by
714Ispell. (Ispell can only spell-check one language at a time, because
715it uses a single dictionary.) Make sure that the text you are
716spelling and the dictionary used by Ispell conform to each other.
717
718If your spell-checking program is Aspell, it has been reported that if
719you have a personal configuration file (normally ~/.aspell.conf), it
720can cause this error. Remove that file, execute `ispell-kill-ispell'
721in Emacs, and then try spell-checking again.
722
723* Runtime problems related to font handling
724
725** Under X11, some characters appear as hollow boxes.
726
727Each X11 font covers just a fraction of the characters that Emacs
728supports. To display the whole range of Emacs characters requires
729many different fonts, collected into a fontset.
730
731If some of the fonts called for in your fontset do not exist on your X
732server, then the characters that have no font appear as hollow boxes.
733You can remedy the problem by installing additional fonts.
f9130829 734
9dc15871 735The intlfonts distribution includes a full spectrum of fonts that can
9222ba5e
EZ
736display all the characters Emacs supports. The etl-unicode collection
737of fonts (available from <URL:ftp://ftp.x.org/contrib/fonts/> and
738<URL:ftp://ftp.xfree86.org/pub/mirror/X.Org/contrib/fonts/>) includes
739fonts that can display many Unicode characters; they can also be used
740by ps-print and ps-mule to print Unicode characters.
f9130829 741
9dc15871
EZ
742Another cause of this for specific characters is fonts which have a
743missing glyph and no default character. This is known to occur for
744character number 160 (no-break space) in some fonts, such as Lucida
745but Emacs sets the display table for the unibyte and Latin-1 version
746of this character to display a space.
f9130829 747
9dc15871 748** Under X11, some characters appear improperly aligned in their lines.
f9130829 749
9222ba5e
EZ
750You may have bad X11 fonts; try installing the intlfonts distribution
751or the etl-unicode collection (see the previous entry).
f9130829 752
9dc15871 753** Certain fonts make each line take one pixel more than it "should".
f9130829 754
9dc15871
EZ
755This is because these fonts contain characters a little taller
756than the font's nominal height. Emacs needs to make sure that
757lines do not overlap.
ed85f61d 758
9dc15871 759** Loading fonts is very slow.
b300fd77 760
9dc15871
EZ
761You might be getting scalable fonts instead of precomputed bitmaps.
762Known scalable font directories are "Type1" and "Speedo". A font
763directory contains scalable fonts if it contains the file
764"fonts.scale".
b300fd77 765
9dc15871
EZ
766If this is so, re-order your X windows font path to put the scalable
767font directories last. See the documentation of `xset' for details.
ed85f61d 768
9dc15871
EZ
769With some X servers, it may be necessary to take the scalable font
770directories out of your path entirely, at least for Emacs 19.26.
771Changes in the future may make this unnecessary.
ed85f61d 772
9dc15871 773** Font Lock displays portions of the buffer in incorrect faces.
fa2301bf 774
9dc15871
EZ
775By far the most frequent cause of this is a parenthesis `(' or a brace
776`{' in column zero. Font Lock assumes that such a paren is outside of
777any comment or string. This is of course not true in general, but the
778vast majority of well-formatted program source files don't have such
779parens, and therefore this assumption is used to allow optimizations
780in Font Lock's syntactical analysis. These optimizations avoid some
781pathological cases where jit-lock, the Just-in-Time fontification
782introduced with Emacs 21.1, could significantly slow down scrolling
783through the buffer, especially scrolling backwards, and also jumping
784to the end of a very large buffer.
ed85f61d 785
bf247b6e 786Beginning with version 22.1, a parenthesis or a brace in column zero
9dc15871
EZ
787is highlighted in bold-red face if it is inside a string or a comment,
788to indicate that it could interfere with Font Lock (and also with
789indentation) and should be moved or escaped with a backslash.
d0cf6c7d 790
9dc15871
EZ
791If you don't use large buffers, or have a very fast machine which
792makes the delays insignificant, you can avoid the incorrect
793fontification by setting the variable
794`font-lock-beginning-of-syntax-function' to a nil value. (This must
795be done _after_ turning on Font Lock.)
d0cf6c7d 796
9dc15871
EZ
797Another alternative is to avoid a paren in column zero. For example,
798in a Lisp string you could precede the paren with a backslash.
d0cf6c7d 799
9dc15871
EZ
800** With certain fonts, when the cursor appears on a character, the
801character doesn't appear--you get a solid box instead.
d0cf6c7d 802
9dc15871
EZ
803One user on a Linux-based GNU system reported that this problem went
804away with installation of a new X server. The failing server was
805XFree86 3.1.1. XFree86 3.1.2 works.
c289e7f0 806
9dc15871 807** Characters are displayed as empty boxes or with wrong font under X.
339b95d5 808
9dc15871
EZ
809This can occur when two different versions of FontConfig are used.
810For example, XFree86 4.3.0 has one version and Gnome usually comes
811with a newer version. Emacs compiled with --with-gtk will then use
812the newer version. In most cases the problem can be temporarily
813fixed by stopping the application that has the error (it can be
814Emacs or any other application), removing ~/.fonts.cache-1,
815and then start the application again.
816If removing ~/.fonts.cache-1 and restarting doesn't help, the
817application with problem must be recompiled with the same version
818of FontConfig as the rest of the system uses. For KDE, it is
819sufficient to recompile Qt.
339b95d5 820
9dc15871 821** Emacs pauses for several seconds when changing the default font.
339b95d5 822
9dc15871
EZ
823This has been reported for fvwm 2.2.5 and the window manager of KDE
8242.1. The reason for the pause is Xt waiting for a ConfigureNotify
825event from the window manager, which the window manager doesn't send.
826Xt stops waiting after a default timeout of usually 5 seconds.
339b95d5 827
9dc15871 828A workaround for this is to add something like
b87207a0 829
9dc15871 830emacs.waitForWM: false
f936978f 831
9dc15871
EZ
832to your X resources. Alternatively, add `(wait-for-wm . nil)' to a
833frame's parameter list, like this:
6fb6f3ac 834
9dc15871 835 (modify-frame-parameters nil '((wait-for-wm . nil)))
b87207a0 836
9dc15871 837(this should go into your `.emacs' file).
b87207a0 838
9dc15871 839** Underlines appear at the wrong position.
b87207a0 840
9dc15871
EZ
841This is caused by fonts having a wrong UNDERLINE_POSITION property.
842Examples are the font 7x13 on XFree prior to version 4.1, or the jmk
843neep font from the Debian xfonts-jmk package. To circumvent this
844problem, set x-use-underline-position-properties to nil in your
845`.emacs'.
b87207a0 846
9dc15871
EZ
847To see what is the value of UNDERLINE_POSITION defined by the font,
848type `xlsfonts -lll FONT' and look at the font's UNDERLINE_POSITION
849property.
e085efdb 850
9dc15871 851** When using Exceed, fonts sometimes appear too tall.
fa99e2a4 852
9dc15871
EZ
853When the display is set to an Exceed X-server and fonts are specified
854(either explicitly with the -fn option or implicitly with X resources)
855then the fonts may appear "too tall". The actual character sizes are
856correct but there is too much vertical spacing between rows, which
857gives the appearance of "double spacing".
c8d9b4ee 858
9dc15871
EZ
859To prevent this, turn off the Exceed's "automatic font substitution"
860feature (in the font part of the configuration window).
fe445893 861
9dc15871 862* Internationalization problems
c8d9b4ee 863
de25ebb8
RS
864** M-{ does not work on a Spanish PC keyboard.
865
866Many Spanish keyboards seem to ignore that combination. Emacs can't
867do anything about it.
868
9dc15871 869** Characters from the mule-unicode charsets aren't displayed under X.
d9810886 870
9dc15871
EZ
871XFree86 4 contains many fonts in iso10646-1 encoding which have
872minimal character repertoires (whereas the encoding part of the font
873name is meant to be a reasonable indication of the repertoire
874according to the XLFD spec). Emacs may choose one of these to display
875characters from the mule-unicode charsets and then typically won't be
876able to find the glyphs to display many characters. (Check with C-u
877C-x = .) To avoid this, you may need to use a fontset which sets the
878font for the mule-unicode sets explicitly. E.g. to use GNU unifont,
879include in the fontset spec:
d9810886 880
9dc15871
EZ
881mule-unicode-2500-33ff:-gnu-unifont-*-iso10646-1,\
882mule-unicode-e000-ffff:-gnu-unifont-*-iso10646-1,\
883mule-unicode-0100-24ff:-gnu-unifont-*-iso10646-1
d04b2e49 884
9dc15871 885** The UTF-8/16/7 coding systems don't encode CJK (Far Eastern) characters.
d9810886 886
ce9b56fe
KH
887Emacs directly supports the Unicode BMP whose code points are in the
888ranges 0000-33ff and e000-ffff, and indirectly supports the parts of
889CJK characters belonging to these legacy charsets:
890
891 GB2312, Big5, JISX0208, JISX0212, JISX0213-1, JISX0213-2, KSC5601
892
893The latter support is done in Utf-Translate-Cjk mode (turned on by
894default). Which Unicode CJK characters are decoded into which Emacs
895charset is decided by the current language environment. For instance,
896in Chinese-GB, most of them are decoded into chinese-gb2312.
d9810886 897
9dc15871
EZ
898If you read UTF-8 data with code points outside these ranges, the
899characters appear in the buffer as raw bytes of the original UTF-8
900(composed into a single quasi-character) and they will be written back
901correctly as UTF-8, assuming you don't break the composed sequences.
902If you read such characters from UTF-16 or UTF-7 data, they are
903substituted with the Unicode `replacement character', and you lose
904information.
aa99760e 905
9dc15871 906** Mule-UCS loads very slowly.
aa99760e 907
9dc15871
EZ
908Changes to Emacs internals interact badly with Mule-UCS's `un-define'
909library, which is the usual interface to Mule-UCS. Apply the
910following patch to Mule-UCS 0.84 and rebuild it. That will help,
911though loading will still be slower than in Emacs 20. (Some
912distributions, such as Debian, may already have applied such a patch.)
086b25d3 913
9dc15871
EZ
914--- lisp/un-define.el 6 Mar 2001 22:41:38 -0000 1.30
915+++ lisp/un-define.el 19 Apr 2002 18:34:26 -0000
916@@ -610,13 +624,21 @@ by calling post-read-conversion and pre-
086b25d3 917
9dc15871
EZ
918 (mapcar
919 (lambda (x)
920- (mapcar
921- (lambda (y)
922- (mucs-define-coding-system
923- (nth 0 y) (nth 1 y) (nth 2 y)
924- (nth 3 y) (nth 4 y) (nth 5 y) (nth 6 y))
925- (coding-system-put (car y) 'alias-coding-systems (list (car x))))
926- (cdr x)))
927+ (if (fboundp 'register-char-codings)
928+ ;; Mule 5, where we don't need the eol-type specified and
929+ ;; register-char-codings may be very slow for these coding
930+ ;; system definitions.
931+ (let ((y (cadr x)))
932+ (mucs-define-coding-system
933+ (car x) (nth 1 y) (nth 2 y)
934+ (nth 3 y) (nth 4 y) (nth 5 y)))
935+ (mapcar
936+ (lambda (y)
937+ (mucs-define-coding-system
938+ (nth 0 y) (nth 1 y) (nth 2 y)
939+ (nth 3 y) (nth 4 y) (nth 5 y) (nth 6 y))
940+ (coding-system-put (car y) 'alias-coding-systems (list (car x)))))
941+ (cdr x)))
942 `((utf-8
943 (utf-8-unix
944 ?u "UTF-8 coding system"
086b25d3 945
9dc15871
EZ
946Note that Emacs has native support for Unicode, roughly equivalent to
947Mule-UCS's, so you may not need it.
086b25d3 948
d87ceee0
KH
949** Mule-UCS compilation problem.
950
951Emacs of old versions and XEmacs byte-compile the form `(progn progn
952...)' the same way as `(progn ...)', but Emacs of version 21.3 and the
953later process that form just as interpreter does, that is, as `progn'
954variable reference. Apply the following patch to Mule-UCS 0.84 to
955make it compiled by the latest Emacs.
956
957--- mucs-ccl.el 2 Sep 2005 00:42:23 -0000 1.1.1.1
958+++ mucs-ccl.el 2 Sep 2005 01:31:51 -0000 1.3
959@@ -639,10 +639,14 @@
960 (mucs-notify-embedment 'mucs-ccl-required name)
961 (setq ccl-pgm-list (cdr ccl-pgm-list)))
962 ; (message "MCCLREGFIN:%S" result)
963- `(progn
964- (setq mucs-ccl-facility-alist
965- (quote ,mucs-ccl-facility-alist))
966- ,@result)))
967+ ;; The only way the function is used in this package is included
968+ ;; in `mucs-package-definition-end-hook' value, where it must
969+ ;; return (possibly empty) *list* of forms. Do this. Do not rely
ade79051 970+ ;; on byte compiler to remove extra `progn's in `(progn ...)'
d87ceee0
KH
971+ ;; form.
972+ `((setq mucs-ccl-facility-alist
973+ (quote ,mucs-ccl-facility-alist))
974+ ,@result)))
ade79051 975
d87ceee0
KH
976 ;;; Add hook for embedding translation informations to a package.
977 (add-hook 'mucs-package-definition-end-hook
978
9dc15871 979** Accented ISO-8859-1 characters are displayed as | or _.
d6b7de9b
EZ
980
981Try other font set sizes (S-mouse-1). If the problem persists with
982other sizes as well, your text is corrupted, probably through software
983that is not 8-bit clean. If the problem goes away with another font
984size, it's probably because some fonts pretend to be ISO-8859-1 fonts
985when they are really ASCII fonts. In particular the schumacher-clean
986fonts have this bug in some versions of X.
987
988To see what glyphs are included in a font, use `xfd', like this:
989
990 xfd -fn -schumacher-clean-medium-r-normal--12-120-75-75-c-60-iso8859-1
991
992If this shows only ASCII glyphs, the font is indeed the source of the
993problem.
994
995The solution is to remove the corresponding lines from the appropriate
996`fonts.alias' file, then run `mkfontdir' in that directory, and then run
997`xset fp rehash'.
998
9dc15871 999** The `oc-unicode' package doesn't work with Emacs 21.
b87207a0 1000
9dc15871
EZ
1001This package tries to define more private charsets than there are free
1002slots now. The current built-in Unicode support is actually more
1003flexible. (Use option `utf-translate-cjk-mode' if you need CJK
1004support.) Files encoded as emacs-mule using oc-unicode aren't
1005generally read correctly by Emacs 21.
b87207a0 1006
9dc15871 1007** After a while, Emacs slips into unibyte mode.
4e0bd469 1008
9dc15871
EZ
1009The VM mail package, which is not part of Emacs, sometimes does
1010 (standard-display-european t)
1011That should be changed to
1012 (standard-display-european 1 t)
4e0bd469 1013
9dc15871 1014* X runtime problems
4e0bd469 1015
9dc15871 1016** X keyboard problems
4e0bd469 1017
9dc15871 1018*** You "lose characters" after typing Compose Character key.
4e0bd469 1019
9dc15871
EZ
1020This is because the Compose Character key is defined as the keysym
1021Multi_key, and Emacs (seeing that) does the proper X11
1022character-composition processing. If you don't want your Compose key
1023to do that, you can redefine it with xmodmap.
4e0bd469 1024
9dc15871 1025For example, here's one way to turn it into a Meta key:
61638355 1026
9dc15871 1027 xmodmap -e "keysym Multi_key = Meta_L"
61638355 1028
9dc15871
EZ
1029If all users at your site of a particular keyboard prefer Meta to
1030Compose, you can make the remapping happen automatically by adding the
1031xmodmap command to the xdm setup script for that display.
61638355 1032
9dc15871 1033*** Using X Windows, control-shift-leftbutton makes Emacs hang.
61638355 1034
9dc15871 1035Use the shell command `xset bc' to make the old X Menu package work.
61638355 1036
9f4f9273 1037*** C-SPC fails to work on Fedora GNU/Linux (or with fcitx input method).
09352e8f
RS
1038
1039Fedora Core 4 steals the C-SPC key by default for the `iiimx' program
1040which is the input method for some languages. It blocks Emacs users
1041from using the C-SPC key for `set-mark-command'.
1042
1043One solutions is to remove the `<Ctrl>space' from the `Iiimx' file
1044which can be found in the `/usr/lib/X11/app-defaults' directory.
1045However, that requires root access.
1046
1047Another is to specify `Emacs*useXIM: false' in your X resources.
1048
1049Another is to build Emacs with the `--without-xim' configure option.
1050
2fb18d13
KH
1051The same problem happens on any other system if you are using fcitx
1052(Chinese input method) which by default use C-SPC for toggling. If
1053you want to use fcitx with Emacs, you have two choices. Toggle fcitx
1054by another key (e.g. C-\) by modifying ~/.fcitx/config, or be
1055accustomed to use C-@ for `set-mark-command'.
1056
9dc15871 1057*** M-SPC seems to be ignored as input.
61638355 1058
9dc15871
EZ
1059See if your X server is set up to use this as a command
1060for character composition.
a953a8d3 1061
9dc15871 1062*** The S-C-t key combination doesn't get passed to Emacs on X.
2ebf6139 1063
9dc15871
EZ
1064This happens because some X configurations assign the Ctrl-Shift-t
1065combination the same meaning as the Multi_key. The offending
1066definition is in the file `...lib/X11/locale/iso8859-1/Compose'; there
1067might be other similar combinations which are grabbed by X for similar
1068purposes.
ec383c7d 1069
9dc15871
EZ
1070We think that this can be countermanded with the `xmodmap' utility, if
1071you want to be able to bind one of these key sequences within Emacs.
cc2f2825 1072
9dc15871 1073*** Under X, C-v and/or other keys don't work.
1d297d9b 1074
9dc15871
EZ
1075These may have been intercepted by your window manager. In
1076particular, AfterStep 1.6 is reported to steal C-v in its default
1077configuration. Various Meta keys are also likely to be taken by the
1078configuration of the `feel'. See the WM's documentation for how to
1079change this.
8bd90f0a 1080
9dc15871 1081*** Clicking C-mouse-2 in the scroll bar doesn't split the window.
8bd90f0a 1082
9dc15871
EZ
1083This currently doesn't work with scroll-bar widgets (and we don't know
1084a good way of implementing it with widgets). If Emacs is configured
1085--without-toolkit-scroll-bars, C-mouse-2 on the scroll bar does work.
8f4df059 1086
9dc15871
EZ
1087*** Inability to send an Alt-modified key, when Emacs is communicating
1088directly with an X server.
8f4df059 1089
9dc15871
EZ
1090If you have tried to bind an Alt-modified key as a command, and it
1091does not work to type the command, the first thing you should check is
1092whether the key is getting through to Emacs. To do this, type C-h c
1093followed by the Alt-modified key. C-h c should say what kind of event
1094it read. If it says it read an Alt-modified key, then make sure you
1095have made the key binding correctly.
b098c23c 1096
9dc15871
EZ
1097If C-h c reports an event that doesn't have the Alt modifier, it may
1098be because your X server has no key for the Alt modifier. The X
1099server that comes from MIT does not set up the Alt modifier by
1100default.
224a0b4d 1101
9dc15871 1102If your keyboard has keys named Alt, you can enable them as follows:
6343352f 1103
9dc15871
EZ
1104 xmodmap -e 'add mod2 = Alt_L'
1105 xmodmap -e 'add mod2 = Alt_R'
6343352f 1106
9dc15871
EZ
1107If the keyboard has just one key named Alt, then only one of those
1108commands is needed. The modifier `mod2' is a reasonable choice if you
1109are using an unmodified MIT version of X. Otherwise, choose any
1110modifier bit not otherwise used.
6343352f 1111
9dc15871
EZ
1112If your keyboard does not have keys named Alt, you can use some other
1113keys. Use the keysym command in xmodmap to turn a function key (or
1114some other 'spare' key) into Alt_L or into Alt_R, and then use the
1115commands show above to make them modifier keys.
6343352f 1116
9dc15871
EZ
1117Note that if you have Alt keys but no Meta keys, Emacs translates Alt
1118into Meta. This is because of the great importance of Meta in Emacs.
cc2f2825 1119
9dc15871 1120** Window-manager and toolkit-related problems
cc2f2825 1121
0e71e4a8
CY
1122*** Gnome: Emacs receives input directly from the keyboard, bypassing XIM.
1123
1124This seems to happen when gnome-settings-daemon version 2.12 or later
1125is running. If gnome-settings-daemon is not running, Emacs receives
1126input through XIM without any problem. Furthermore, this seems only
1127to happen in *.UTF-8 locales; zh_CN.GB2312 and zh_CN.GBK locales, for
1128example, work fine. A bug report has been filed in the Gnome
1129bugzilla: http://bugzilla.gnome.org/show_bug.cgi?id=357032
1130
9dc15871 1131*** Gnome: Emacs' xterm-mouse-mode doesn't work on the Gnome terminal.
cc2f2825 1132
9dc15871
EZ
1133A symptom of this bug is that double-clicks insert a control sequence
1134into the buffer. The reason this happens is an apparent
1135incompatibility of the Gnome terminal with Xterm, which also affects
1136other programs using the Xterm mouse interface. A problem report has
1137been filed.
1f42cc71 1138
9dc15871
EZ
1139*** KDE: When running on KDE, colors or fonts are not as specified for Emacs,
1140or messed up.
1f42cc71 1141
9dc15871
EZ
1142For example, you could see background you set for Emacs only in the
1143empty portions of the Emacs display, while characters have some other
1144background.
1f42cc71 1145
9dc15871
EZ
1146This happens because KDE's defaults apply its color and font
1147definitions even to applications that weren't compiled for KDE. The
1148solution is to uncheck the "Apply fonts and colors to non-KDE apps"
1149option in Preferences->Look&Feel->Style (KDE 2). In KDE 3, this option
1150is in the "Colors" section, rather than "Style".
1f42cc71 1151
9dc15871
EZ
1152Alternatively, if you do want the KDE defaults to apply to other
1153applications, but not to Emacs, you could modify the file `Emacs.ad'
1154(should be in the `/usr/share/apps/kdisplay/app-defaults/' directory)
1155so that it doesn't set the default background and foreground only for
1156Emacs. For example, make sure the following resources are either not
1157present or commented out:
f4f4ee4d 1158
9dc15871
EZ
1159 Emacs.default.attributeForeground
1160 Emacs.default.attributeBackground
1161 Emacs*Foreground
1162 Emacs*Background
0cb26e21 1163
9dc15871 1164*** KDE: Emacs hangs on KDE when a large portion of text is killed.
f4f4ee4d 1165
9dc15871
EZ
1166This is caused by a bug in the KDE applet `klipper' which periodically
1167requests the X clipboard contents from applications. Early versions
8576f724 1168of klipper don't implement the ICCCM protocol for large selections,
9dc15871 1169which leads to Emacs being flooded with selection requests. After a
b11e8823 1170while, Emacs may print a message:
f4f4ee4d 1171
9dc15871 1172 Timed out waiting for property-notify event
c31138a1 1173
b11e8823
JD
1174A workaround is to not use `klipper'. An upgrade to the `klipper' that
1175comes with KDE 3.3 or later also solves the problem.
c31138a1 1176
9dc15871 1177*** CDE: Frames may cover dialogs they created when using CDE.
c31138a1 1178
9dc15871
EZ
1179This can happen if you have "Allow Primary Windows On Top" enabled which
1180seems to be the default in the Common Desktop Environment.
1181To change, go in to "Desktop Controls" -> "Window Style Manager"
1182and uncheck "Allow Primary Windows On Top".
f4f4ee4d 1183
9dc15871
EZ
1184*** Xaw3d : When using Xaw3d scroll bars without arrows, the very first mouse
1185click in a scroll bar might be ignored by the scroll bar widget. This
1186is probably a bug in Xaw3d; when Xaw3d is compiled with arrows, the
1187problem disappears.
0c6456ad 1188
9dc15871
EZ
1189*** Xaw: There are known binary incompatibilities between Xaw, Xaw3d, neXtaw,
1190XawM and the few other derivatives of Xaw. So when you compile with
1191one of these, it may not work to dynamically link with another one.
1192For example, strange problems, such as Emacs exiting when you type
1193"C-x 1", were reported when Emacs compiled with Xaw3d and libXaw was
1194used with neXtaw at run time.
b1739b51 1195
9dc15871
EZ
1196The solution is to rebuild Emacs with the toolkit version you actually
1197want to use, or set LD_PRELOAD to preload the same toolkit version you
1198built Emacs with.
b1739b51 1199
9dc15871 1200*** Open Motif: Problems with file dialogs in Emacs built with Open Motif.
b1739b51 1201
9dc15871
EZ
1202When Emacs 21 is built with Open Motif 2.1, it can happen that the
1203graphical file dialog boxes do not work properly. The "OK", "Filter"
1204and "Cancel" buttons do not respond to mouse clicks. Dragging the
1205file dialog window usually causes the buttons to work again.
b1739b51 1206
9dc15871
EZ
1207The solution is to use LessTif instead. LessTif is a free replacement
1208for Motif. See the file INSTALL for information on how to do this.
b1739b51 1209
9dc15871
EZ
1210Another workaround is not to use the mouse to trigger file prompts,
1211but to use the keyboard. This way, you will be prompted for a file in
1212the minibuffer instead of a graphical file dialog.
b1739b51 1213
9dc15871 1214*** LessTif: Problems in Emacs built with LessTif.
e9a52cfe 1215
9dc15871
EZ
1216The problems seem to depend on the version of LessTif and the Motif
1217emulation for which it is set up.
e9a52cfe 1218
9dc15871 1219Only the Motif 1.2 emulation seems to be stable enough in LessTif.
880ea925 1220LessTif 0.92-17's Motif 1.2 emulation seems to work okay on FreeBSD.
9dc15871
EZ
1221On GNU/Linux systems, lesstif-0.92.6 configured with "./configure
1222--enable-build-12 --enable-default-12" is reported to be the most
1223successful. The binary GNU/Linux package
1224lesstif-devel-0.92.0-1.i386.rpm was reported to have problems with
1225menu placement.
e9a52cfe 1226
9dc15871
EZ
1227On some systems, even with Motif 1.2 emulation, Emacs occasionally
1228locks up, grabbing all mouse and keyboard events. We still don't know
1229what causes these problems; they are not reproducible by Emacs
1230developers.
e9a52cfe 1231
9dc15871 1232*** Motif: The Motif version of Emacs paints the screen a solid color.
e9a52cfe 1233
9dc15871 1234This has been observed to result from the following X resource:
e9a52cfe 1235
9dc15871 1236 Emacs*default.attributeFont: -*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*
e9a52cfe 1237
9dc15871
EZ
1238That the resource has this effect indicates a bug in something, but we
1239do not yet know what. If it is an Emacs bug, we hope someone can
1240explain what the bug is so we can fix it. In the mean time, removing
1241the resource prevents the problem.
f25eb4f7 1242
9dc15871 1243** General X problems
f25eb4f7 1244
9dc15871 1245*** Redisplay using X11 is much slower than previous Emacs versions.
f25eb4f7 1246
9dc15871
EZ
1247We've noticed that certain X servers draw the text much slower when
1248scroll bars are on the left. We don't know why this happens. If this
1249happens to you, you can work around it by putting the scroll bars
1250on the right (as they were in Emacs 19).
f25eb4f7 1251
9dc15871 1252Here's how to do this:
f25eb4f7 1253
9dc15871 1254 (set-scroll-bar-mode 'right)
f25eb4f7 1255
9dc15871
EZ
1256If you're not sure whether (or how much) this problem affects you,
1257try that and see how much difference it makes. To set things back
1258to normal, do
edd7d3be 1259
9dc15871 1260 (set-scroll-bar-mode 'left)
edd7d3be 1261
9dc15871 1262*** Error messages about undefined colors on X.
edd7d3be 1263
9dc15871 1264The messages might say something like this:
42303132 1265
9dc15871 1266 Unable to load color "grey95"
42303132 1267
9dc15871 1268(typically, in the `*Messages*' buffer), or something like this:
42303132 1269
9dc15871 1270 Error while displaying tooltip: (error Undefined color lightyellow)
42303132 1271
9dc15871
EZ
1272These problems could happen if some other X program has used up too
1273many colors of the X palette, leaving Emacs with insufficient system
1274resources to load all the colors it needs.
42303132 1275
9dc15871 1276A solution is to exit the offending X programs before starting Emacs.
42303132 1277
9257b627
EZ
1278"undefined color" messages can also occur if the RgbPath entry in the
1279X configuration file is incorrect, or the rgb.txt file is not where
1280X expects to find it.
1281
9dc15871 1282*** Improving performance with slow X connections.
f3d6f4ee 1283
9dc15871
EZ
1284There are several ways to improve this performance, any subset of which can
1285be carried out at the same time:
f3d6f4ee 1286
9dc15871
EZ
12871) If you don't need X Input Methods (XIM) for entering text in some
1288 language you use, you can improve performance on WAN links by using
1289 the X resource useXIM to turn off use of XIM. This does not affect
1290 the use of Emacs' own input methods, which are part of the Leim
1291 package.
f3d6f4ee 1292
9dc15871 12932) If the connection is very slow, you might also want to consider
634e516b
EZ
1294 switching off scroll bars, menu bar, and tool bar. Adding the
1295 following forms to your .emacs file will accomplish that, but only
1296 after the the initial frame is displayed:
1297
1298 (scroll-bar-mode -1)
1299 (menu-bar-mode -1)
1300 (tool-bar-mode -1)
1301
1302 For still quicker startup, put these X resources in your .Xdefaults
1303 file:
1304
1305 Emacs.verticalScrollBars: off
1306 Emacs.menuBar: off
1307 Emacs.toolBar: off
f3d6f4ee 1308
9dc15871
EZ
13093) Use ssh to forward the X connection, and enable compression on this
1310 forwarded X connection (ssh -XC remotehostname emacs ...).
9f83d8b3 1311
9dc15871
EZ
13124) Use lbxproxy on the remote end of the connection. This is an interface
1313 to the low bandwidth X extension in most modern X servers, which
1314 improves performance dramatically, at the slight expense of correctness
1315 of the X protocol. lbxproxy acheives the performance gain by grouping
1316 several X requests in one TCP packet and sending them off together,
880ea925 1317 instead of requiring a round-trip for each X request in a separate
9dc15871
EZ
1318 packet. The switches that seem to work best for emacs are:
1319 -noatomsfile -nowinattr -cheaterrors -cheatevents
1320 Note that the -nograbcmap option is known to cause problems.
1321 For more about lbxproxy, see:
1322 http://www.xfree86.org/4.3.0/lbxproxy.1.html
9f83d8b3 1323
34431988
KS
13245) If copying and killing is slow, try to disable the interaction with the
1325 native system's clipboard by adding these lines to your .emacs file:
1326 (setq interprogram-cut-function nil)
1327 (setq interprogram-paste-function nil)
1328
9dc15871 1329*** Emacs gives the error, Couldn't find per display information.
9f83d8b3 1330
9dc15871
EZ
1331This can result if the X server runs out of memory because Emacs uses
1332a large number of fonts. On systems where this happens, C-h h is
1333likely to cause it.
f29d1e75 1334
9dc15871 1335We do not know of a way to prevent the problem.
f29d1e75 1336
9dc15871 1337*** Emacs does not notice when you release the mouse.
c24be289 1338
9dc15871
EZ
1339There are reports that this happened with (some) Microsoft mice and
1340that replacing the mouse made it stop.
c24be289 1341
9dc15871 1342*** You can't select from submenus (in the X toolkit version).
b35319bf 1343
9dc15871
EZ
1344On certain systems, mouse-tracking and selection in top-level menus
1345works properly with the X toolkit, but neither of them works when you
1346bring up a submenu (such as Bookmarks or Compare or Apply Patch, in
1347the Files menu).
b35319bf 1348
9dc15871
EZ
1349This works on most systems. There is speculation that the failure is
1350due to bugs in old versions of X toolkit libraries, but no one really
1351knows. If someone debugs this and finds the precise cause, perhaps a
1352workaround can be found.
b35319bf 1353
9dc15871
EZ
1354*** An error message such as `X protocol error: BadMatch (invalid
1355parameter attributes) on protocol request 93'.
b35319bf 1356
9dc15871
EZ
1357This comes from having an invalid X resource, such as
1358 emacs*Cursor: black
1359(which is invalid because it specifies a color name for something
1360that isn't a color.)
787994b7 1361
9dc15871 1362The fix is to correct your X resources.
0a2eeca1 1363
9dc15871 1364*** Slow startup on X11R6 with X windows.
0a2eeca1 1365
9dc15871
EZ
1366If Emacs takes two minutes to start up on X11R6, see if your X
1367resources specify any Adobe fonts. That causes the type-1 font
1368renderer to start up, even if the font you asked for is not a type-1
1369font.
0a2eeca1 1370
9dc15871
EZ
1371One way to avoid this problem is to eliminate the type-1 fonts from
1372your font path, like this:
0a2eeca1 1373
9dc15871 1374 xset -fp /usr/X11R6/lib/X11/fonts/Type1/
0a2eeca1 1375
9dc15871 1376*** Pull-down menus appear in the wrong place, in the toolkit version of Emacs.
0a2eeca1 1377
9dc15871 1378An X resource of this form can cause the problem:
0a2eeca1 1379
9dc15871 1380 Emacs*geometry: 80x55+0+0
0a2eeca1 1381
9dc15871
EZ
1382This resource is supposed to apply, and does apply, to the menus
1383individually as well as to Emacs frames. If that is not what you
1384want, rewrite the resource.
119d3665 1385
9dc15871
EZ
1386To check thoroughly for such resource specifications, use `xrdb
1387-query' to see what resources the X server records, and also look at
1388the user's ~/.Xdefaults and ~/.Xdefaults-* files.
119d3665 1389
9dc15871
EZ
1390*** Emacs running under X Windows does not handle mouse clicks.
1391*** `emacs -geometry 80x20' finds a file named `80x20'.
0de9f9a8 1392
9dc15871
EZ
1393One cause of such problems is having (setq term-file-prefix nil) in
1394your .emacs file. Another cause is a bad value of EMACSLOADPATH in
1395the environment.
0de9f9a8 1396
9dc15871 1397*** Emacs fails to get default settings from X Windows server.
0de9f9a8 1398
9dc15871
EZ
1399The X library in X11R4 has a bug; it interchanges the 2nd and 3rd
1400arguments to XGetDefaults. Define the macro XBACKWARDS in config.h to
1401tell Emacs to compensate for this.
0de9f9a8 1402
9dc15871
EZ
1403I don't believe there is any way Emacs can determine for itself
1404whether this problem is present on a given system.
0de9f9a8 1405
9dc15871 1406*** X Windows doesn't work if DISPLAY uses a hostname.
0de9f9a8 1407
9dc15871
EZ
1408People have reported kernel bugs in certain systems that cause Emacs
1409not to work with X Windows if DISPLAY is set using a host name. But
1410the problem does not occur if DISPLAY is set to `unix:0.0'. I think
1411the bug has to do with SIGIO or FIONREAD.
a933dad1 1412
9dc15871
EZ
1413You may be able to compensate for the bug by doing (set-input-mode nil nil).
1414However, that has the disadvantage of turning off interrupts, so that
1415you are unable to quit out of a Lisp program by typing C-g.
a933dad1 1416
9dc15871 1417The easy way to do this is to put
a933dad1 1418
9dc15871 1419 (setq x-sigio-bug t)
a933dad1 1420
9dc15871 1421in your site-init.el file.
a933dad1 1422
880ea925 1423* Runtime problems on character terminals
a933dad1 1424
9dc15871 1425** Emacs spontaneously displays "I-search: " at the bottom of the screen.
a933dad1 1426
9dc15871
EZ
1427This means that Control-S/Control-Q (XON/XOFF) "flow control" is being
1428used. C-s/C-q flow control is bad for Emacs editors because it takes
1429away C-s and C-q as user commands. Since editors do not output long
1430streams of text without user commands, there is no need for a
1431user-issuable "stop output" command in an editor; therefore, a
1432properly designed flow control mechanism would transmit all possible
1433input characters without interference. Designing such a mechanism is
1434easy, for a person with at least half a brain.
177c0ea7 1435
9dc15871 1436There are three possible reasons why flow control could be taking place:
a933dad1 1437
9dc15871
EZ
1438 1) Terminal has not been told to disable flow control
1439 2) Insufficient padding for the terminal in use
1440 3) Some sort of terminal concentrator or line switch is responsible
a933dad1 1441
9dc15871
EZ
1442First of all, many terminals have a set-up mode which controls whether
1443they generate XON/XOFF flow control characters. This must be set to
1444"no XON/XOFF" in order for Emacs to work. Sometimes there is an
1445escape sequence that the computer can send to turn flow control off
1446and on. If so, perhaps the termcap `ti' string should turn flow
1447control off, and the `te' string should turn it on.
a933dad1 1448
9dc15871
EZ
1449Once the terminal has been told "no flow control", you may find it
1450needs more padding. The amount of padding Emacs sends is controlled
1451by the termcap entry for the terminal in use, and by the output baud
1452rate as known by the kernel. The shell command `stty' will print
1453your output baud rate; `stty' with suitable arguments will set it if
1454it is wrong. Setting to a higher speed causes increased padding. If
1455the results are wrong for the correct speed, there is probably a
1456problem in the termcap entry. You must speak to a local Unix wizard
1457to fix this. Perhaps you are just using the wrong terminal type.
de121241 1458
9dc15871
EZ
1459For terminals that lack a "no flow control" mode, sometimes just
1460giving lots of padding will prevent actual generation of flow control
1461codes. You might as well try it.
de121241 1462
9dc15871
EZ
1463If you are really unlucky, your terminal is connected to the computer
1464through a concentrator which sends XON/XOFF flow control to the
1465computer, or it insists on sending flow control itself no matter how
1466much padding you give it. Unless you can figure out how to turn flow
1467control off on this concentrator (again, refer to your local wizard),
1468you are screwed! You should have the terminal or concentrator
1469replaced with a properly designed one. In the mean time, some drastic
1470measures can make Emacs semi-work.
de121241 1471
9dc15871
EZ
1472You can make Emacs ignore C-s and C-q and let the operating system
1473handle them. To do this on a per-session basis, just type M-x
1474enable-flow-control RET. You will see a message that C-\ and C-^ are
1475now translated to C-s and C-q. (Use the same command M-x
1476enable-flow-control to turn *off* this special mode. It toggles flow
1477control handling.)
a933dad1 1478
9dc15871
EZ
1479If C-\ and C-^ are inconvenient for you (for example, if one of them
1480is the escape character of your terminal concentrator), you can choose
1481other characters by setting the variables flow-control-c-s-replacement
1482and flow-control-c-q-replacement. But choose carefully, since all
1483other control characters are already used by emacs.
a933dad1 1484
9dc15871
EZ
1485IMPORTANT: if you type C-s by accident while flow control is enabled,
1486Emacs output will freeze, and you will have to remember to type C-q in
1487order to continue.
177c0ea7 1488
9dc15871
EZ
1489If you work in an environment where a majority of terminals of a
1490certain type are flow control hobbled, you can use the function
1491`enable-flow-control-on' to turn on this flow control avoidance scheme
1492automatically. Here is an example:
a933dad1 1493
9dc15871 1494(enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
a933dad1 1495
9dc15871
EZ
1496If this isn't quite correct (e.g. you have a mixture of flow-control hobbled
1497and good vt200 terminals), you can still run enable-flow-control
1498manually.
a933dad1 1499
9dc15871
EZ
1500I have no intention of ever redesigning the Emacs command set for the
1501assumption that terminals use C-s/C-q flow control. XON/XOFF flow
1502control technique is a bad design, and terminals that need it are bad
1503merchandise and should not be purchased. Now that X is becoming
1504widespread, XON/XOFF seems to be on the way out. If you can get some
1505use out of GNU Emacs on inferior terminals, more power to you, but I
1506will not make Emacs worse for properly designed systems for the sake
1507of inferior systems.
a933dad1 1508
9dc15871 1509** Control-S and Control-Q commands are ignored completely.
a933dad1 1510
9dc15871
EZ
1511For some reason, your system is using brain-damaged C-s/C-q flow
1512control despite Emacs's attempts to turn it off. Perhaps your
1513terminal is connected to the computer through a concentrator
1514that wants to use flow control.
a933dad1 1515
9dc15871
EZ
1516You should first try to tell the concentrator not to use flow control.
1517If you succeed in this, try making the terminal work without
1518flow control, as described in the preceding section.
a933dad1 1519
9dc15871
EZ
1520If that line of approach is not successful, map some other characters
1521into C-s and C-q using keyboard-translate-table. The example above
1522shows how to do this with C-^ and C-\.
a933dad1 1523
9dc15871 1524** Screen is updated wrong, but only on one kind of terminal.
a933dad1 1525
9dc15871
EZ
1526This could mean that the termcap entry you are using for that
1527terminal is wrong, or it could mean that Emacs has a bug handing
1528the combination of features specified for that terminal.
a933dad1 1529
9dc15871
EZ
1530The first step in tracking this down is to record what characters
1531Emacs is sending to the terminal. Execute the Lisp expression
1532(open-termscript "./emacs-script") to make Emacs write all
1533terminal output into the file ~/emacs-script as well; then do
1534what makes the screen update wrong, and look at the file
1535and decode the characters using the manual for the terminal.
1536There are several possibilities:
a933dad1 1537
9dc15871 15381) The characters sent are correct, according to the terminal manual.
a933dad1 1539
9dc15871
EZ
1540In this case, there is no obvious bug in Emacs, and most likely you
1541need more padding, or possibly the terminal manual is wrong.
a933dad1 1542
9dc15871
EZ
15432) The characters sent are incorrect, due to an obscure aspect
1544 of the terminal behavior not described in an obvious way
1545 by termcap.
a933dad1 1546
9dc15871
EZ
1547This case is hard. It will be necessary to think of a way for
1548Emacs to distinguish between terminals with this kind of behavior
1549and other terminals that behave subtly differently but are
1550classified the same by termcap; or else find an algorithm for
1551Emacs to use that avoids the difference. Such changes must be
1552tested on many kinds of terminals.
a933dad1 1553
9dc15871 15543) The termcap entry is wrong.
a933dad1 1555
9dc15871
EZ
1556See the file etc/TERMS for information on changes
1557that are known to be needed in commonly used termcap entries
1558for certain terminals.
a933dad1 1559
9dc15871
EZ
15604) The characters sent are incorrect, and clearly cannot be
1561 right for any terminal with the termcap entry you were using.
a933dad1 1562
9dc15871
EZ
1563This is unambiguously an Emacs bug, and can probably be fixed
1564in termcap.c, tparam.c, term.c, scroll.c, cm.c or dispnew.c.
a933dad1 1565
9dc15871 1566** Control-S and Control-Q commands are ignored completely on a net connection.
a933dad1 1567
9dc15871
EZ
1568Some versions of rlogin (and possibly telnet) do not pass flow
1569control characters to the remote system to which they connect.
1570On such systems, emacs on the remote system cannot disable flow
1571control on the local system.
a933dad1 1572
9dc15871
EZ
1573One way to cure this is to disable flow control on the local host
1574(the one running rlogin, not the one running rlogind) using the
1575stty command, before starting the rlogin process. On many systems,
1576"stty start u stop u" will do this.
a933dad1 1577
9dc15871
EZ
1578Some versions of tcsh will prevent even this from working. One way
1579around this is to start another shell before starting rlogin, and
1580issue the stty command to disable flow control from that shell.
a933dad1 1581
9dc15871
EZ
1582If none of these methods work, the best solution is to type
1583M-x enable-flow-control at the beginning of your emacs session, or
1584if you expect the problem to continue, add a line such as the
1585following to your .emacs (on the host running rlogind):
a933dad1 1586
9dc15871 1587(enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
a933dad1 1588
9dc15871
EZ
1589See the entry about spontaneous display of I-search (above) for more
1590info.
a933dad1 1591
9dc15871 1592** Output from Control-V is slow.
a933dad1 1593
9dc15871
EZ
1594On many bit-map terminals, scrolling operations are fairly slow.
1595Often the termcap entry for the type of terminal in use fails
1596to inform Emacs of this. The two lines at the bottom of the screen
1597before a Control-V command are supposed to appear at the top after
1598the Control-V command. If Emacs thinks scrolling the lines is fast,
1599it will scroll them to the top of the screen.
a933dad1 1600
9dc15871
EZ
1601If scrolling is slow but Emacs thinks it is fast, the usual reason is
1602that the termcap entry for the terminal you are using does not
1603specify any padding time for the `al' and `dl' strings. Emacs
1604concludes that these operations take only as much time as it takes to
1605send the commands at whatever line speed you are using. You must
1606fix the termcap entry to specify, for the `al' and `dl', as much
1607time as the operations really take.
a933dad1 1608
9dc15871
EZ
1609Currently Emacs thinks in terms of serial lines which send characters
1610at a fixed rate, so that any operation which takes time for the
1611terminal to execute must also be padded. With bit-map terminals
1612operated across networks, often the network provides some sort of
1613flow control so that padding is never needed no matter how slow
1614an operation is. You must still specify a padding time if you want
1615Emacs to realize that the operation takes a long time. This will
1616cause padding characters to be sent unnecessarily, but they do
1617not really cost much. They will be transmitted while the scrolling
1618is happening and then discarded quickly by the terminal.
a933dad1 1619
9dc15871
EZ
1620Most bit-map terminals provide commands for inserting or deleting
1621multiple lines at once. Define the `AL' and `DL' strings in the
1622termcap entry to say how to do these things, and you will have
1623fast output without wasted padding characters. These strings should
1624each contain a single %-spec saying how to send the number of lines
1625to be scrolled. These %-specs are like those in the termcap
1626`cm' string.
a933dad1 1627
9dc15871
EZ
1628You should also define the `IC' and `DC' strings if your terminal
1629has a command to insert or delete multiple characters. These
1630take the number of positions to insert or delete as an argument.
a933dad1 1631
9dc15871
EZ
1632A `cs' string to set the scrolling region will reduce the amount
1633of motion you see on the screen when part of the screen is scrolled.
a933dad1 1634
9dc15871 1635** You type Control-H (Backspace) expecting to delete characters.
a933dad1 1636
9dc15871
EZ
1637Put `stty dec' in your .login file and your problems will disappear
1638after a day or two.
d238f982 1639
9dc15871
EZ
1640The choice of Backspace for erasure was based on confusion, caused by
1641the fact that backspacing causes erasure (later, when you type another
1642character) on most display terminals. But it is a mistake. Deletion
1643of text is not the same thing as backspacing followed by failure to
1644overprint. I do not wish to propagate this confusion by conforming
1645to it.
d238f982 1646
9dc15871
EZ
1647For this reason, I believe `stty dec' is the right mode to use,
1648and I have designed Emacs to go with that. If there were a thousand
1649other control characters, I would define Control-h to delete as well;
1650but there are not very many other control characters, and I think
1651that providing the most mnemonic possible Help character is more
1652important than adapting to people who don't use `stty dec'.
d7185f9d 1653
9dc15871
EZ
1654If you are obstinate about confusing buggy overprinting with deletion,
1655you can redefine Backspace in your .emacs file:
1656 (global-set-key "\b" 'delete-backward-char)
1657You can probably access help-command via f1.
d7185f9d 1658
9dc15871 1659** Colors are not available on a tty or in xterm.
a933dad1 1660
9dc15871
EZ
1661Emacs 21 supports colors on character terminals and terminal
1662emulators, but this support relies on the terminfo or termcap database
1663entry to specify that the display supports color. Emacs looks at the
1664"Co" capability for the terminal to find out how many colors are
1665supported; it should be non-zero to activate the color support within
1666Emacs. (Most color terminals support 8 or 16 colors.) If your system
1667uses terminfo, the name of the capability equivalent to "Co" is
1668"colors".
a933dad1 1669
9dc15871
EZ
1670In addition to the "Co" capability, Emacs needs the "op" (for
1671``original pair'') capability, which tells how to switch the terminal
1672back to the default foreground and background colors. Emacs will not
1673use colors if this capability is not defined. If your terminal entry
1674doesn't provide such a capability, try using the ANSI standard escape
1675sequence \E[00m (that is, define a new termcap/terminfo entry and make
1676it use your current terminal's entry plus \E[00m for the "op"
1677capability).
a933dad1 1678
9dc15871
EZ
1679Finally, the "NC" capability (terminfo name: "ncv") tells Emacs which
1680attributes cannot be used with colors. Setting this capability
1681incorrectly might have the effect of disabling colors; try setting
1682this capability to `0' (zero) and see if that helps.
a933dad1 1683
9dc15871
EZ
1684Emacs uses the database entry for the terminal whose name is the value
1685of the environment variable TERM. With `xterm', a common terminal
1686entry that supports color is `xterm-color', so setting TERM's value to
1687`xterm-color' might activate the color support on an xterm-compatible
1688emulator.
a933dad1 1689
bf247b6e 1690Beginning with version 22.1, Emacs supports the --color command-line
9dc15871
EZ
1691option which may be used to force Emacs to use one of a few popular
1692modes for getting colors on a tty. For example, --color=ansi8 sets up
1693for using the ANSI-standard escape sequences that support 8 colors.
a933dad1 1694
9dc15871
EZ
1695Some modes do not use colors unless you turn on the Font-lock mode.
1696Some people have long ago set their `~/.emacs' files to turn on
1697Font-lock on X only, so they won't see colors on a tty. The
1698recommended way of turning on Font-lock is by typing "M-x
1699global-font-lock-mode RET" or by customizing the variable
1700`global-font-lock-mode'.
a933dad1 1701
9dc15871 1702* Runtime problems specific to individual Unix variants
a933dad1 1703
9dc15871 1704** GNU/Linux
a933dad1 1705
f77e4514
KS
1706*** GNU/Linux: Process output is corrupted.
1707
1708There is a bug in Linux kernel 2.6.10 PTYs that can cause emacs to
1709read corrupted process output.
1710
1711*** GNU/Linux: Remote access to CVS with SSH causes file corruption.
1712
1713If you access a remote CVS repository via SSH, files may be corrupted
1714due to bad interaction between CVS, SSH, and libc.
1715
1716To fix the problem, save the following script into a file, make it
1717executable, and set CVS_RSH environment variable to the file name of
1718the script:
1719
1720#!/bin/bash
1721exec 2> >(exec cat >&2 2>/dev/null)
1722exec ssh "$@"
1723
9dc15871
EZ
1724*** GNU/Linux: On Linux-based GNU systems using libc versions 5.4.19 through
17255.4.22, Emacs crashes at startup with a segmentation fault.
a933dad1 1726
9dc15871
EZ
1727This problem happens if libc defines the symbol __malloc_initialized.
1728One known solution is to upgrade to a newer libc version. 5.4.33 is
1729known to work.
a933dad1 1730
9dc15871
EZ
1731*** GNU/Linux: After upgrading to a newer version of Emacs,
1732the Meta key stops working.
a933dad1 1733
9dc15871
EZ
1734This was reported to happen on a GNU/Linux system distributed by
1735Mandrake. The reason is that the previous version of Emacs was
1736modified by Mandrake to make the Alt key act as the Meta key, on a
1737keyboard where the Windows key is the one which produces the Meta
1738modifier. A user who started using a newer version of Emacs, which
1739was not hacked by Mandrake, expected the Alt key to continue to act as
1740Meta, and was astonished when that didn't happen.
a933dad1 1741
9dc15871
EZ
1742The solution is to find out what key on your keyboard produces the Meta
1743modifier, and use that key instead. Try all of the keys to the left
1744and to the right of the space bar, together with the `x' key, and see
1745which combination produces "M-x" in the echo area. You can also use
1746the `xmodmap' utility to show all the keys which produce a Meta
1747modifier:
a933dad1 1748
9dc15871 1749 xmodmap -pk | egrep -i "meta|alt"
17a37d87 1750
9dc15871
EZ
1751A more convenient way of finding out which keys produce a Meta modifier
1752is to use the `xkbprint' utility, if it's available on your system:
17a37d87 1753
9dc15871 1754 xkbprint 0:0 /tmp/k.ps
17a37d87 1755
9dc15871
EZ
1756This produces a PostScript file `/tmp/k.ps' with a picture of your
1757keyboard; printing that file on a PostScript printer will show what
1758keys can serve as Meta.
17a37d87 1759
9dc15871
EZ
1760The `xkeycaps' also shows a visual representation of the current
1761keyboard settings. It also allows to modify them.
a933dad1 1762
ff3e9dbc 1763*** GNU/Linux: slow startup on Linux-based GNU systems.
a933dad1 1764
9dc15871
EZ
1765People using systems based on the Linux kernel sometimes report that
1766startup takes 10 to 15 seconds longer than `usual'.
a933dad1 1767
9dc15871
EZ
1768This is because Emacs looks up the host name when it starts.
1769Normally, this takes negligible time; the extra delay is due to
1770improper system configuration. This problem can occur for both
1771networked and non-networked machines.
a933dad1 1772
9dc15871 1773Here is how to fix the configuration. It requires being root.
a933dad1 1774
9dc15871 1775**** Networked Case.
a933dad1 1776
9dc15871
EZ
1777First, make sure the files `/etc/hosts' and `/etc/host.conf' both
1778exist. The first line in the `/etc/hosts' file should look like this
1779(replace HOSTNAME with your host name):
a933dad1 1780
9dc15871 1781 127.0.0.1 HOSTNAME
a933dad1 1782
9dc15871
EZ
1783Also make sure that the `/etc/host.conf' files contains the following
1784lines:
a933dad1 1785
9dc15871
EZ
1786 order hosts, bind
1787 multi on
a933dad1 1788
9dc15871
EZ
1789Any changes, permanent and temporary, to the host name should be
1790indicated in the `/etc/hosts' file, since it acts a limited local
1791database of addresses and names (e.g., some SLIP connections
1792dynamically allocate ip addresses).
a933dad1 1793
9dc15871 1794**** Non-Networked Case.
a933dad1 1795
9dc15871
EZ
1796The solution described in the networked case applies here as well.
1797However, if you never intend to network your machine, you can use a
1798simpler solution: create an empty `/etc/host.conf' file. The command
1799`touch /etc/host.conf' suffices to create the file. The `/etc/hosts'
1800file is not necessary with this approach.
3d00585e 1801
9dc15871 1802*** GNU/Linux: Emacs on a tty switches the cursor to large blinking block.
3d00585e 1803
9dc15871
EZ
1804This was reported to happen on some GNU/Linux systems which use
1805ncurses version 5.0, but could be relevant for other versions as well.
1806These versions of ncurses come with a `linux' terminfo entry, where
1807the "cvvis" capability (termcap "vs") is defined as "\E[?25h\E[?8c"
1808(show cursor, change size). This escape sequence switches on a
1809blinking hardware text-mode cursor whose size is a full character
1810cell. This blinking cannot be stopped, since a hardware cursor
1811always blinks.
3d00585e 1812
9dc15871
EZ
1813A work-around is to redefine the "cvvis" capability so that it
1814enables a *software* cursor. The software cursor works by inverting
1815the colors of the character at point, so what you see is a block
1816cursor that doesn't blink. For this to work, you need to redefine
1817the "cnorm" capability as well, so that it operates on the software
1818cursor instead of the hardware cursor.
3d00585e 1819
9dc15871
EZ
1820To this end, run "infocmp linux > linux-term", edit the file
1821`linux-term' to make both the "cnorm" and "cvvis" capabilities send
1822the sequence "\E[?25h\E[?17;0;64c", and then run "tic linux-term" to
1823produce a modified terminfo entry.
3d00585e 1824
9dc15871
EZ
1825Alternatively, if you want a blinking underscore as your Emacs cursor,
1826change the "cvvis" capability to send the "\E[?25h\E[?0c" command.
a933dad1 1827
9dc15871 1828*** GNU/Linux: Error messages `internal facep []' happen on GNU/Linux systems.
7838ea1b 1829
9dc15871
EZ
1830There is a report that replacing libc.so.5.0.9 with libc.so.5.2.16
1831caused this to start happening. People are not sure why, but the
1832problem seems unlikely to be in Emacs itself. Some suspect that it
1833is actually Xlib which won't work with libc.so.5.2.16.
a933dad1 1834
9dc15871 1835Using the old library version is a workaround.
a933dad1 1836
9dc15871 1837** Mac OS X
a933dad1 1838
9dc15871 1839*** Mac OS X (Carbon): Environment Variables from dotfiles are ignored.
a933dad1 1840
9dc15871
EZ
1841When starting Emacs from the Dock or the Finder on Mac OS X, the
1842environment variables that are set up in dotfiles, such as .cshrc or
1843.profile, are ignored. This is because the Finder and Dock are not
1844started from a shell, but instead from the Window Manager itself.
a933dad1 1845
9dc15871
EZ
1846The workaround for this is to create a .MacOSX/environment.plist file to
1847setup these environment variables. These environment variables will
1848apply to all processes regardless of where they are started.
1849For me information, see http://developer.apple.com/qa/qa2001/qa1067.html.
b5cb4652 1850
9dc15871 1851*** Mac OS X (Carbon): Process output truncated when using ptys.
b5cb4652 1852
9dc15871
EZ
1853There appears to be a problem with the implementation of pty's on the
1854Mac OS X that causes process output to be truncated. To avoid this,
1855leave process-connection-type set to its default value of nil.
a933dad1 1856
e9452469
YM
1857*** Mac OS X 10.3.9 (Carbon): QuickTime 7.0.4 updater breaks build.
1858
1859On the above environment, build fails at the link stage with the
1860message like "Undefined symbols: _HICopyAccessibilityActionDescription
1861referenced from QuickTime expected to be defined in Carbon". A
1862workaround is to use QuickTime 7.0.1 reinstaller.
1863
9dc15871 1864** FreeBSD
a933dad1 1865
9dc15871
EZ
1866*** FreeBSD 2.1.5: useless symbolic links remain in /tmp or other
1867directories that have the +t bit.
a933dad1 1868
9dc15871
EZ
1869This is because of a kernel bug in FreeBSD 2.1.5 (fixed in 2.2).
1870Emacs uses symbolic links to implement file locks. In a directory
1871with +t bit, the directory owner becomes the owner of the symbolic
1872link, so that it cannot be removed by anyone else.
a933dad1 1873
9dc15871
EZ
1874If you don't like those useless links, you can let Emacs not to using
1875file lock by adding #undef CLASH_DETECTION to config.h.
a933dad1 1876
9dc15871 1877*** FreeBSD: Getting a Meta key on the console.
a933dad1 1878
9dc15871
EZ
1879By default, neither Alt nor any other key acts as a Meta key on
1880FreeBSD, but this can be changed using kbdcontrol(1). Dump the
1881current keymap to a file with the command
a933dad1 1882
9dc15871 1883 $ kbdcontrol -d >emacs.kbd
a933dad1 1884
9dc15871
EZ
1885Edit emacs.kbd, and give the key you want to be the Meta key the
1886definition `meta'. For instance, if your keyboard has a ``Windows''
1887key with scan code 105, change the line for scan code 105 in emacs.kbd
1888to look like this
3156909f 1889
9dc15871 1890 105 meta meta meta meta meta meta meta meta O
a933dad1 1891
9dc15871 1892to make the Windows key the Meta key. Load the new keymap with
a933dad1 1893
9dc15871 1894 $ kbdcontrol -l emacs.kbd
a933dad1 1895
9dc15871 1896** HP-UX
e96c5c69 1897
9dc15871 1898*** HP/UX : Shell mode gives the message, "`tty`: Ambiguous".
e96c5c69 1899
9dc15871 1900christos@theory.tn.cornell.edu says:
a933dad1 1901
9dc15871
EZ
1902The problem is that in your .cshrc you have something that tries to
1903execute `tty`. If you are not running the shell on a real tty then
1904tty will print "not a tty". Csh expects one word in some places,
1905but tty is giving it back 3.
a933dad1 1906
9dc15871
EZ
1907The solution is to add a pair of quotes around `tty` to make it a single
1908word:
a933dad1 1909
9dc15871 1910if (`tty` == "/dev/console")
a933dad1 1911
9dc15871 1912should be changed to:
a933dad1 1913
9dc15871 1914if ("`tty`" == "/dev/console")
a933dad1 1915
9dc15871
EZ
1916Even better, move things that set up terminal sections out of .cshrc
1917and into .login.
a933dad1 1918
9dc15871 1919*** HP/UX: `Pid xxx killed due to text modification or page I/O error'.
a933dad1 1920
9dc15871
EZ
1921On HP/UX, you can get that error when the Emacs executable is on an NFS
1922file system. HP/UX responds this way if it tries to swap in a page and
1923does not get a response from the server within a timeout whose default
1924value is just ten seconds.
a933dad1 1925
9dc15871 1926If this happens to you, extend the timeout period.
a933dad1 1927
9dc15871
EZ
1928*** HP/UX: The right Alt key works wrong on German HP keyboards (and perhaps
1929other non-English HP keyboards too).
a933dad1 1930
9dc15871
EZ
1931This is because HP-UX defines the modifiers wrong in X. Here is a
1932shell script to fix the problem; be sure that it is run after VUE
1933configures the X server.
a933dad1 1934
9dc15871
EZ
1935 xmodmap 2> /dev/null - << EOF
1936 keysym Alt_L = Meta_L
1937 keysym Alt_R = Meta_R
1938 EOF
a933dad1 1939
9dc15871
EZ
1940 xmodmap - << EOF
1941 clear mod1
1942 keysym Mode_switch = NoSymbol
1943 add mod1 = Meta_L
1944 keysym Meta_R = Mode_switch
1945 add mod2 = Mode_switch
1946 EOF
a933dad1 1947
9dc15871
EZ
1948*** HP/UX: "Cannot find callback list" messages from dialog boxes in
1949Emacs built with Motif.
a933dad1 1950
9dc15871
EZ
1951This problem resulted from a bug in GCC 2.4.5. Newer GCC versions
1952such as 2.7.0 fix the problem.
a933dad1 1953
9dc15871 1954*** HP/UX: Emacs does not recognize the AltGr key.
a933dad1 1955
9dc15871
EZ
1956To fix this, set up a file ~/.dt/sessions/sessionetc with executable
1957rights, containing this text:
4c635a29 1958
9dc15871
EZ
1959--------------------------------
1960xmodmap 2> /dev/null - << EOF
1961keysym Alt_L = Meta_L
1962keysym Alt_R = Meta_R
1963EOF
a933dad1 1964
9dc15871
EZ
1965xmodmap - << EOF
1966clear mod1
1967keysym Mode_switch = NoSymbol
1968add mod1 = Meta_L
1969keysym Meta_R = Mode_switch
1970add mod2 = Mode_switch
1971EOF
1972--------------------------------
a933dad1 1973
9dc15871 1974*** HP/UX 11.0: Emacs makes HP/UX 11.0 crash.
a933dad1 1975
9dc15871 1976This is a bug in HPUX; HPUX patch PHKL_16260 is said to fix it.
a933dad1 1977
9dc15871 1978** AIX
a933dad1 1979
9dc15871 1980*** AIX: Trouble using ptys.
a933dad1 1981
9dc15871
EZ
1982People often install the pty devices on AIX incorrectly.
1983Use `smit pty' to reinstall them properly.
a933dad1 1984
9dc15871 1985*** AIXterm: Your Delete key sends a Backspace to the terminal.
a933dad1 1986
9dc15871 1987The solution is to include in your .Xdefaults the lines:
a933dad1 1988
9dc15871
EZ
1989 *aixterm.Translations: #override <Key>BackSpace: string(0x7f)
1990 aixterm*ttyModes: erase ^?
a933dad1 1991
9dc15871 1992This makes your Backspace key send DEL (ASCII 127).
a933dad1 1993
9dc15871
EZ
1994*** AIX: If linking fails because libXbsd isn't found, check if you
1995are compiling with the system's `cc' and CFLAGS containing `-O5'. If
1996so, you have hit a compiler bug. Please make sure to re-configure
1997Emacs so that it isn't compiled with `-O5'.
a933dad1 1998
9dc15871 1999*** AIX 4.3.x or 4.4: Compiling fails.
a933dad1 2000
9dc15871
EZ
2001This could happen if you use /bin/c89 as your compiler, instead of
2002the default `cc'. /bin/c89 treats certain warnings, such as benign
2003redefinitions of macros, as errors, and fails the build. A solution
2004is to use the default compiler `cc'.
a933dad1 2005
9dc15871
EZ
2006*** AIX 4: Some programs fail when run in a Shell buffer
2007with an error message like No terminfo entry for "unknown".
a933dad1 2008
9dc15871
EZ
2009On AIX, many terminal type definitions are not installed by default.
2010`unknown' is one of them. Install the "Special Generic Terminal
2011Definitions" to make them defined.
a933dad1 2012
9dc15871 2013** Solaris
a933dad1 2014
9dc15871
EZ
2015We list bugs in current versions here. Solaris 2.x and 4.x are covered in the
2016section on legacy systems.
a933dad1 2017
9dc15871 2018*** On Solaris, C-x doesn't get through to Emacs when you use the console.
a933dad1 2019
9dc15871
EZ
2020This is a Solaris feature (at least on Intel x86 cpus). Type C-r
2021C-r C-t, to toggle whether C-x gets through to Emacs.
a933dad1 2022
9dc15871 2023*** Problem with remote X server on Suns.
a933dad1 2024
9dc15871
EZ
2025On a Sun, running Emacs on one machine with the X server on another
2026may not work if you have used the unshared system libraries. This
2027is because the unshared libraries fail to use YP for host name lookup.
2028As a result, the host name you specify may not be recognized.
a933dad1 2029
0a4dd4e4 2030*** Solaris 2,6: Emacs crashes with SIGBUS or SIGSEGV on Solaris after you delete a frame.
a933dad1 2031
0a4dd4e4
EZ
2032We suspect that this is a bug in the X libraries provided by
2033Sun. There is a report that one of these patches fixes the bug and
2034makes the problem stop:
a933dad1 2035
0a4dd4e4
EZ
2036105216-01 105393-01 105518-01 105621-01 105665-01 105615-02 105216-02
2037105667-01 105401-08 105615-03 105621-02 105686-02 105736-01 105755-03
2038106033-01 105379-01 105786-01 105181-04 105379-03 105786-04 105845-01
2039105284-05 105669-02 105837-01 105837-02 105558-01 106125-02 105407-01
a933dad1 2040
0a4dd4e4
EZ
2041Another person using a newer system (kernel patch level Generic_105181-06)
2042suspects that the bug was fixed by one of these more recent patches:
a933dad1 2043
0a4dd4e4
EZ
2044106040-07 SunOS 5.6: X Input & Output Method patch
2045106222-01 OpenWindows 3.6: filemgr (ff.core) fixes
2046105284-12 Motif 1.2.7: sparc Runtime library patch
a933dad1 2047
0a4dd4e4 2048*** Solaris 7 or 8: Emacs reports a BadAtom error (from X)
a933dad1 2049
0a4dd4e4
EZ
2050This happens when Emacs was built on some other version of Solaris.
2051Rebuild it on Solaris 8.
a933dad1 2052
9dc15871
EZ
2053*** When using M-x dbx with the SparcWorks debugger, the `up' and `down'
2054commands do not move the arrow in Emacs.
a933dad1 2055
9dc15871 2056You can fix this by adding the following line to `~/.dbxinit':
a933dad1 2057
9dc15871 2058 dbxenv output_short_file_name off
a933dad1 2059
0a4dd4e4
EZ
2060*** On Solaris, CTRL-t is ignored by Emacs when you use
2061the fr.ISO-8859-15 locale (and maybe other related locales).
a933dad1 2062
0a4dd4e4 2063You can fix this by editing the file:
a933dad1 2064
0a4dd4e4 2065 /usr/openwin/lib/locale/iso8859-15/Compose
a01325b8 2066
0a4dd4e4 2067Near the bottom there is a line that reads:
a933dad1 2068
0a4dd4e4 2069 Ctrl<t> <quotedbl> <Y> : "\276" threequarters
a933dad1 2070
0a4dd4e4 2071that should read:
a933dad1 2072
0a4dd4e4 2073 Ctrl<T> <quotedbl> <Y> : "\276" threequarters
a933dad1 2074
0a4dd4e4 2075Note the lower case <t>. Changing this line should make C-t work.
a933dad1 2076
0a4dd4e4 2077** Irix
a933dad1 2078
9dc15871 2079*** Irix 6.5: Emacs crashes on the SGI R10K, when compiled with GCC.
a933dad1 2080
9dc15871 2081This seems to be fixed in GCC 2.95.
a933dad1 2082
0a4dd4e4 2083*** Irix: Trouble using ptys, or running out of ptys.
a933dad1 2084
9dc15871
EZ
2085The program mkpts (which may be in `/usr/adm' or `/usr/sbin') needs to
2086be set-UID to root, or non-root programs like Emacs will not be able
2087to allocate ptys reliably.
a933dad1 2088
9dc15871 2089* Runtime problems specific to MS-Windows
a933dad1 2090
ade79051
KS
2091** Windows 95 and networking.
2092
2093To support server sockets, Emacs 22.1 loads ws2_32.dll. If this file
2094is missing, all Emacs networking features are disabled.
2095
2096Old versions of Windows 95 may not have the required DLL. To use
2097Emacs' networking features on Windows 95, you must install the
2098"Windows Socket 2" update available from MicroSoft's support Web.
2099
9dc15871 2100** Emacs exits with "X protocol error" when run with an X server for MS-Windows.
a933dad1 2101
9dc15871
EZ
2102A certain X server for Windows had a bug which caused this.
2103Supposedly the newer 32-bit version of this server doesn't have the
2104problem.
a933dad1 2105
de66e883
JR
2106** Known problems with the MS-Windows port of Emacs 22.1
2107
2108Using create-fontset-from-ascii-font or the --font startup parameter
2109with a Chinese, Japanese or Korean font leads to display problems.
2110Use a Latin-only font as your default font. If you want control over
2111which font is used to display Chinese, Japanese or Korean character,
2112use create-fontset-from-fontset-spec to define a fontset.
a933dad1 2113
9dc15871
EZ
2114Frames are not refreshed while the File or Font dialog or a pop-up menu
2115is displayed. This also means help text for pop-up menus is not
2116displayed at all. This is because message handling under Windows is
2117synchronous, so we cannot handle repaint (or any other) messages while
2118waiting for a system function to return the result of the dialog or
2119pop-up menu interaction.
a933dad1 2120
9dc15871
EZ
2121Windows 95 and Windows NT up to version 4.0 do not support help text
2122for menus. Help text is only available in later versions of Windows.
a933dad1 2123
af71f3ce
EZ
2124When "ClearType" method is selected as the "method to smooth edges of
2125screen fonts" (in Display Properties, Appearance tab, under
2126"Effects"), there are various problems related to display of
2127characters: 2-pixel trace is left behind when moving overlays, bold
2128fonts can be hard to read, small portions of some characters could
2129appear chopped, etc. This happens because, under ClearType,
2130characters are drawn outside their advertised bounding box. Emacs 21
2131disabled the use of ClearType, whereas Emacs 22 allows it and has some
2132code to enlarge the width of the bounding box. Apparently, this
2133display feature needs more changes to get it 100% right. A workaround
2134is to disable ClearType.
2135
9dc15871
EZ
2136There are problems with display if mouse-tracking is enabled and the
2137mouse is moved off a frame, over another frame then back over the first
2138frame. A workaround is to click the left mouse button inside the frame
2139after moving back into it.
a933dad1 2140
9dc15871
EZ
2141Some minor flickering still persists during mouse-tracking, although
2142not as severely as in 21.1.
a933dad1 2143
9dc15871
EZ
2144An inactive cursor remains in an active window after the Windows
2145Manager driven switch of the focus, until a key is pressed.
a933dad1 2146
4ed1bce5 2147Windows input methods are not recognized by Emacs. However, some
9dc15871
EZ
2148of these input methods cause the keyboard to send characters encoded
2149in the appropriate coding system (e.g., ISO 8859-1 for Latin-1
4ed1bce5
EZ
2150characters, ISO 8859-8 for Hebrew characters, etc.). To make these
2151input methods work with Emacs, set the keyboard coding system to the
2152appropriate value after you activate the Windows input method. For
2153example, if you activate the Hebrew input method, type this:
2154
2155 C-x RET k hebrew-iso-8bit RET
2156
2157(Emacs ought to recognize the Windows language-change event and set up
2158the appropriate keyboard encoding automatically, but it doesn't do
2159that yet.) In addition, to use these Windows input methods, you
2160should set your "Language for non-Unicode programs" (on Windows XP,
2161this is on the Advanced tab of Regional Settings) to the language of
2162the input method.
a933dad1 2163
868c31fe
EZ
2164To bind keys that produce non-ASCII characters with modifiers, you
2165must specify raw byte codes. For instance, if you want to bind
2166META-a-grave to a command, you need to specify this in your `~/.emacs':
2167
2168 (global-set-key [?\M-\340] ...)
2169
2170The above example is for the Latin-1 environment where the byte code
2171of the encoded a-grave is 340 octal. For other environments, use the
2172encoding appropriate to that environment.
2173
9dc15871
EZ
2174The %b specifier for format-time-string does not produce abbreviated
2175month names with consistent widths for some locales on some versions
2176of Windows. This is caused by a deficiency in the underlying system
2177library function.
a933dad1 2178
ae51f2bc
EZ
2179Files larger than 4GB cause overflow in the size (represented as a
218032-bit integer) reported by `file-attributes'. This affects Dired as
2181well, since the Windows port uses a Lisp emulation of `ls' that relies
2182on `file-attributes'.
2183
0a4dd4e4 2184** Typing Alt-Shift has strange effects on MS-Windows.
a933dad1 2185
0a4dd4e4
EZ
2186This combination of keys is a command to change keyboard layout. If
2187you proceed to type another non-modifier key before you let go of Alt
2188and Shift, the Alt and Shift act as modifiers in the usual way. A
2189more permanent work around is to change it to another key combination,
2190or disable it in the keyboard control panel.
a933dad1 2191
651f8172
EZ
2192** Cygwin build of Emacs hangs after rebasing Cygwin DLLs
2193
2194Usually, on Cygwin, one needs to rebase the DLLs if an application
2195aborts with a message like this:
2196
2197 C:\cygwin\bin\python.exe: *** unable to remap C:\cygwin\bin\cygssl.dll to
2198 same address as parent(0xDF0000) != 0xE00000
2199
2200However, since Cygwin DLL 1.5.17 was released, after such rebasing,
2201Emacs hangs.
2202
2203This was reported to happen for Emacs 21.2 and also for the pretest of
2204Emacs 22.1 on Cygwin.
2205
2206To work around this, build Emacs like this:
2207
2208 LDFLAGS='-Wl,--enable-auto-import -Wl,--enable-auto-image-base' ./configure
2209 make LD='$(CC)'
2210 make LD='$(CC)' install
2211
2212This produces an Emacs binary that is independent of rebasing.
2213
2214Note that you _must_ use LD='$(CC)' in the last two commands above, to
2215prevent GCC from passing the "--image-base 0x20000000" option to the
2216linker, which is what it does by default. That option produces an
2217Emacs binary with the base address 0x20000000, which will cause Emacs
2218to hang after Cygwin DLLs are rebased.
2219
0a4dd4e4 2220** Interrupting Cygwin port of Bash from Emacs doesn't work.
a933dad1 2221
0a4dd4e4
EZ
2222Cygwin 1.x builds of the ported Bash cannot be interrupted from the
2223MS-Windows version of Emacs. This is due to some change in the Bash
2224port or in the Cygwin library which apparently make Bash ignore the
2225keyboard interrupt event sent by Emacs to Bash. (Older Cygwin ports
2226of Bash, up to b20.1, did receive SIGINT from Emacs.)
a933dad1 2227
0a4dd4e4 2228** Accessing remote files with ange-ftp hangs the MS-Windows version of Emacs.
a933dad1 2229
0a4dd4e4
EZ
2230If the FTP client is the Cygwin port of GNU `ftp', this appears to be
2231due to some bug in the Cygwin DLL or some incompatibility between it
2232and the implementation of asynchronous subprocesses in the Windows
2233port of Emacs. Specifically, some parts of the FTP server responses
2234are not flushed out, apparently due to buffering issues, which
2235confuses ange-ftp.
a933dad1 2236
0a4dd4e4
EZ
2237The solution is to downgrade to an older version of the Cygwin DLL
2238(version 1.3.2 was reported to solve the problem), or use the stock
2239Windows FTP client, usually found in the `C:\WINDOWS' or 'C:\WINNT'
2240directory. To force ange-ftp use the stock Windows client, set the
2241variable `ange-ftp-ftp-program-name' to the absolute file name of the
2242client's executable. For example:
a933dad1 2243
9dc15871 2244 (setq ange-ftp-ftp-program-name "c:/windows/ftp.exe")
a933dad1 2245
9dc15871
EZ
2246If you want to stick with the Cygwin FTP client, you can work around
2247this problem by putting this in your `.emacs' file:
a933dad1 2248
9dc15871 2249 (setq ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v" "--prompt" "")
a933dad1 2250
9dc15871 2251** lpr commands don't work on MS-Windows with some cheap printers.
a933dad1 2252
9dc15871
EZ
2253This problem may also strike other platforms, but the solution is
2254likely to be a global one, and not Emacs specific.
a933dad1 2255
9dc15871
EZ
2256Many cheap inkjet, and even some cheap laser printers, do not
2257print plain text anymore, they will only print through graphical
2258printer drivers. A workaround on MS-Windows is to use Windows' basic
2259built in editor to print (this is possibly the only useful purpose it
2260has):
a933dad1 2261
9dc15871
EZ
2262(setq printer-name "") ;; notepad takes the default
2263(setq lpr-command "notepad") ;; notepad
2264(setq lpr-switches nil) ;; not needed
2265(setq lpr-printer-switch "/P") ;; run notepad as batch printer
a933dad1 2266
9dc15871 2267** Antivirus software interacts badly with the MS-Windows version of Emacs.
a933dad1 2268
9dc15871
EZ
2269The usual manifestation of these problems is that subprocesses don't
2270work or even wedge the entire system. In particular, "M-x shell RET"
2271was reported to fail to work. But other commands also sometimes don't
2272work when an antivirus package is installed.
a933dad1 2273
9dc15871
EZ
2274The solution is to switch the antivirus software to a less aggressive
2275mode (e.g., disable the ``auto-protect'' feature), or even uninstall
2276or disable it entirely.
a933dad1 2277
9dc15871 2278** Pressing the mouse button on MS-Windows does not give a mouse-2 event.
a933dad1 2279
9dc15871
EZ
2280This is usually a problem with the mouse driver. Because most Windows
2281programs do not do anything useful with the middle mouse button, many
2282mouse drivers allow you to define the wheel press to do something
2283different. Some drivers do not even have the option to generate a
2284middle button press. In such cases, setting the wheel press to
2285"scroll" sometimes works if you press the button twice. Trying a
2286generic mouse driver might help.
a933dad1 2287
9dc15871 2288** Scrolling the mouse wheel on MS-Windows always scrolls the top window.
a933dad1 2289
9dc15871
EZ
2290This is another common problem with mouse drivers. Instead of
2291generating scroll events, some mouse drivers try to fake scroll bar
2292movement. But they are not intelligent enough to handle multiple
2293scroll bars within a frame. Trying a generic mouse driver might help.
a933dad1 2294
9dc15871
EZ
2295** Mail sent through Microsoft Exchange in some encodings appears to be
2296mangled and is not seen correctly in Rmail or Gnus. We don't know
2297exactly what happens, but it isn't an Emacs problem in cases we've
2298seen.
a933dad1 2299
9dc15871
EZ
2300** On MS-Windows, you cannot use the right-hand ALT key and the left-hand
2301CTRL key together to type a Control-Meta character.
a933dad1 2302
9dc15871 2303This is a consequence of a misfeature beyond Emacs's control.
a933dad1 2304
9dc15871
EZ
2305Under Windows, the AltGr key on international keyboards generates key
2306events with the modifiers Right-Alt and Left-Ctrl. Since Emacs cannot
2307distinguish AltGr from an explicit Right-Alt and Left-Ctrl
2308combination, whenever it sees Right-Alt and Left-Ctrl it assumes that
2309AltGr has been pressed. The variable `w32-recognize-altgr' can be set
2310to nil to tell Emacs that AltGr is really Ctrl and Alt.
a933dad1 2311
9dc15871 2312** Under some X-servers running on MS-Windows, Emacs' display is incorrect.
a933dad1 2313
9dc15871
EZ
2314The symptoms are that Emacs does not completely erase blank areas of the
2315screen during scrolling or some other screen operations (e.g., selective
2316display or when killing a region). M-x recenter will cause the screen
2317to be completely redisplayed and the "extra" characters will disappear.
a933dad1 2318
9dc15871
EZ
2319This is known to occur under Exceed 6, and possibly earlier versions
2320as well; it is reportedly solved in version 6.2.0.16 and later. The
2321problem lies in the X-server settings.
a933dad1 2322
9dc15871
EZ
2323There are reports that you can solve the problem with Exceed by
2324running `Xconfig' from within NT, choosing "X selection", then
2325un-checking the boxes "auto-copy X selection" and "auto-paste to X
2326selection".
a933dad1 2327
9dc15871
EZ
2328Of this does not work, please inform bug-gnu-emacs@gnu.org. Then
2329please call support for your X-server and see if you can get a fix.
2330If you do, please send it to bug-gnu-emacs@gnu.org so we can list it
2331here.
a933dad1 2332
9dc15871 2333* Build-time problems
a933dad1 2334
9dc15871 2335** Configuration
a933dad1 2336
9dc15871 2337*** The `configure' script doesn't find the jpeg library.
a933dad1 2338
9dc15871
EZ
2339There are reports that this happens on some systems because the linker
2340by default only looks for shared libraries, but jpeg distribution by
2341default only installs a nonshared version of the library, `libjpeg.a'.
a933dad1 2342
9dc15871
EZ
2343If this is the problem, you can configure the jpeg library with the
2344`--enable-shared' option and then rebuild libjpeg. This produces a
2345shared version of libjpeg, which you need to install. Finally, rerun
2346the Emacs configure script, which should now find the jpeg library.
2347Alternatively, modify the generated src/Makefile to link the .a file
2348explicitly, and edit src/config.h to define HAVE_JPEG.
a933dad1 2349
f4b84ef4
GM
2350*** `configure' warns ``accepted by the compiler, rejected by the preprocessor''.
2351
2352This indicates a mismatch between the C compiler and preprocessor that
2353configure is using. For example, on Solaris 10 trying to use
2354CC=/opt/SUNWspro/bin/cc (the Sun Studio compiler) together with
2355CPP=/usr/ccs/lib/cpp can result in errors of this form (you may also
2356see the error ``"/usr/include/sys/isa_defs.h", line 500: undefined control'').
2357
2358The solution is to tell configure to use the correct C preprocessor
2359for your C compiler (CPP="/opt/SUNWspro/bin/cc -E" in the above
2360example).
2361
2362*** `configure' fails with ``"junk.c", line 660: invalid input token: 8.elc''
2363
2364The final stage of the Emacs configure process uses the C preprocessor
2365to generate the Makefiles. Errors of this form can occur if the C
2366preprocessor inserts extra whitespace into its output. The solution
2367is to find the switches that stop your preprocessor from inserting extra
2368whitespace, add them to CPPFLAGS, and re-run configure. For example,
2369this error can occur on Solaris 10 when using the Sun Studio compiler
2370``Sun C 5.8'' with its preprocessor CPP="/opt/SUNWspro/bin/cc -E".
2371The relevant switch in this case is "-Xs" (``compile assuming
2372(pre-ANSI) K & R C style code'').
2373
9dc15871 2374** Compilation
a933dad1 2375
9dc15871 2376*** Building Emacs over NFS fails with ``Text file busy''.
a933dad1 2377
9dc15871 2378This was reported to happen when building Emacs on a GNU/Linux system
880ea925 2379(Red Hat Linux 6.2) using a build directory automounted from Solaris
9dc15871
EZ
2380(SunOS 5.6) file server, but it might not be limited to that
2381configuration alone. Presumably, the NFS server doesn't commit the
2382files' data to disk quickly enough, and the Emacs executable file is
2383left ``busy'' for several seconds after Emacs has finished dumping
2384itself. This causes the subsequent commands which invoke the dumped
2385Emacs executable to fail with the above message.
a933dad1 2386
9dc15871
EZ
2387In some of these cases, a time skew between the NFS server and the
2388machine where Emacs is built is detected and reported by GNU Make
2389(it says that some of the files have modification time in the future).
2390This might be a symptom of NFS-related problems.
a933dad1 2391
9dc15871
EZ
2392If the NFS server runs on Solaris, apply the Solaris patch 105379-05
2393(Sunos 5.6: /kernel/misc/nfssrv patch). If that doesn't work, or if
2394you have a different version of the OS or the NFS server, you can
2395force the NFS server to use 1KB blocks, which was reported to fix the
2396problem albeit at a price of slowing down file I/O. You can force 1KB
2397blocks by specifying the "-o rsize=1024,wsize=1024" options to the
2398`mount' command, or by adding ",rsize=1024,wsize=1024" to the mount
2399options in the appropriate system configuration file, such as
2400`/etc/auto.home'.
a933dad1 2401
9dc15871
EZ
2402Alternatively, when Make fails due to this problem, you could wait for
2403a few seconds and then invoke Make again. In one particular case,
2404waiting for 10 or more seconds between the two Make invocations seemed
2405to work around the problem.
a933dad1 2406
9dc15871
EZ
2407Similar problems can happen if your machine NFS-mounts a directory
2408onto itself. Suppose the Emacs sources live in `/usr/local/src' and
2409you are working on the host called `marvin'. Then an entry in the
2410`/etc/fstab' file like the following is asking for trouble:
a933dad1 2411
9dc15871 2412 marvin:/usr/local/src /usr/local/src ...options.omitted...
a933dad1 2413
9dc15871 2414The solution is to remove this line from `etc/fstab'.
a933dad1 2415
9dc15871 2416*** Building Emacs with GCC 2.9x fails in the `src' directory.
a933dad1 2417
9dc15871
EZ
2418This may happen if you use a development version of GNU `cpp' from one
2419of the GCC snapshots between Oct 2000 and Feb 2001, or from a released
2420version of GCC newer than 2.95.2 which was prepared around those
2421dates; similar problems were reported with some snapshots of GCC 3.1
2422around Sep 30 2001. The preprocessor in those versions is
2423incompatible with a traditional Unix cpp (e.g., it expands ".." into
2424". .", which breaks relative file names that reference the parent
2425directory; or inserts TAB characters before lines that set Make
2426variables).
a933dad1 2427
9dc15871
EZ
2428The solution is to make sure the preprocessor is run with the
2429`-traditional' option. The `configure' script does that automatically
2430when it detects the known problems in your cpp, but you might hit some
2431unknown ones. To force the `configure' script to use `-traditional',
2432run the script like this:
a933dad1 2433
9dc15871 2434 CPP='gcc -E -traditional' ./configure ...
a933dad1 2435
9dc15871
EZ
2436(replace the ellipsis "..." with any additional arguments you pass to
2437the script).
a933dad1 2438
9dc15871
EZ
2439Note that this problem does not pertain to the MS-Windows port of
2440Emacs, since it doesn't use the preprocessor to generate Makefiles.
a933dad1 2441
9dc15871
EZ
2442*** src/Makefile and lib-src/Makefile are truncated--most of the file missing.
2443*** Compiling wakeup, in lib-src, says it can't make wakeup.c.
a933dad1 2444
9dc15871
EZ
2445This can happen if configure uses GNU sed version 2.03. That version
2446had a bug. GNU sed version 2.05 works properly.To solve the
2447problem, install the current version of GNU Sed, then rerun Emacs's
2448configure script.
a933dad1 2449
9dc15871 2450*** Compiling lib-src says there is no rule to make test-distrib.c.
a933dad1 2451
9dc15871
EZ
2452This results from a bug in a VERY old version of GNU Sed. To solve
2453the problem, install the current version of GNU Sed, then rerun
2454Emacs's configure script.
a933dad1 2455
745377e8
GM
2456*** Building a 32-bit executable on a 64-bit GNU/Linux architecture.
2457
2458First ensure that the necessary 32-bit system libraries and include
2459files are installed. Then use:
2460
2461 env CC="gcc -m32" ./configure --build=i386-linux-gnu \
2462 --x-libraries=/usr/X11R6/lib
2463
2464(using the location of the 32-bit X libraries on your system).
2465
1020d879 2466*** Building the Cygwin port for MS-Windows can fail with some GCC versions
9c9f0081
EZ
2467
2468Building Emacs 22 with Cygwin builds of GCC 3.4.4-1 and 3.4.4-2 is
2469reported to either fail or cause Emacs to segfault at run time. In
2470addition, the Cygwin GCC 3.4.4-2 has problems with generating debug
2471info. Cygwin users are advised not to use these versions of GCC for
485a6c18
EZ
2472compiling Emacs. GCC versions 4.0.3, 4.0.4, 4.1.1, and 4.1.2
2473reportedly build a working Cygwin binary of Emacs, so we recommend
2474these GCC versions. Note that these versions of GCC, 4.0.3, 4.0.4,
24754.1.1, and 4.1.2, are currently the _only_ versions known to succeed
2476in building Emacs (as of v22.1).
9c9f0081
EZ
2477
2478*** Building the native MS-Windows port with Cygwin GCC can fail.
a933dad1 2479
9dc15871
EZ
2480Emacs may not build using recent Cygwin builds of GCC, such as Cygwin
2481version 1.1.8, using the default configure settings. It appears to be
2482necessary to specify the -mwin32 flag when compiling, and define
2483__MSVCRT__, like so:
a933dad1 2484
9dc15871 2485 configure --with-gcc --cflags -mwin32 --cflags -D__MSVCRT__
a933dad1 2486
9dc15871 2487*** Building the MS-Windows port fails with a CreateProcess failure.
a933dad1 2488
9dc15871
EZ
2489Some versions of mingw32 make on some versions of Windows do not seem
2490to detect the shell correctly. Try "make SHELL=cmd.exe", or if that
2491fails, try running make from Cygwin bash instead.
a933dad1 2492
9dc15871 2493*** Building the MS-Windows port with Leim fails in the `leim' directory.
a933dad1 2494
9dc15871 2495The error message might be something like this:
a933dad1 2496
9dc15871
EZ
2497 Converting d:/emacs-21.3/leim/CXTERM-DIC/4Corner.tit to quail-package...
2498 Invalid ENCODE: value in TIT dictionary
2499 NMAKE : fatal error U1077: '"../src/obj-spd/i386/emacs.exe"' : return code
2500 '0xffffffff'
2501 Stop.
a933dad1 2502
9dc15871
EZ
2503This can happen if the Leim distribution is unpacked with a program
2504which converts the `*.tit' files to DOS-style CR-LF text format. The
2505`*.tit' files in the leim/CXTERM-DIC directory require Unix-style line
2506endings to compile properly, because Emacs reads them without any code
2507or EOL conversions.
a933dad1 2508
9dc15871
EZ
2509The solution is to make sure the program used to unpack Leim does not
2510change the files' line endings behind your back. The GNU FTP site has
2511in the `/gnu/emacs/windows' directory a program called `djtarnt.exe'
2512which can be used to unpack `.tar.gz' and `.zip' archives without
2513mangling them.
a933dad1 2514
9dc15871 2515*** Building `ctags' for MS-Windows with the MinGW port of GCC fails.
a933dad1 2516
9dc15871
EZ
2517This might happen due to a bug in the MinGW header assert.h, which
2518defines the `assert' macro with a trailing semi-colon. The following
2519patch to assert.h should solve this:
a933dad1 2520
0cc69e7d
EZ
2521 *** include/assert.h.orig Sun Nov 7 02:41:36 1999
2522 --- include/assert.h Mon Jan 29 11:49:10 2001
2523 ***************
2524 *** 41,47 ****
2525 /*
2526 * If not debugging, assert does nothing.
2527 */
2528 ! #define assert(x) ((void)0);
2529
2530 #else /* debugging enabled */
2531
2532 --- 41,47 ----
2533 /*
2534 * If not debugging, assert does nothing.
2535 */
2536 ! #define assert(x) ((void)0)
2537
2538 #else /* debugging enabled */
2539
2540
3e7c244e
JR
2541*** Building the MS-Windows port with Visual Studio 2005 fails.
2542
2543Microsoft no longer ships the single threaded version of the C library
2544with their compiler, and the multithreaded static library is missing
0cc69e7d 2545some functions that Microsoft have deemed non-threadsafe. The
3e7c244e
JR
2546dynamically linked C library has all the functions, but there is a
2547conflict between the versions of malloc in the DLL and in Emacs, which
2548is not resolvable due to the way Windows does dynamic linking.
2549
2550We recommend the use of the MingW port of GCC for compiling Emacs, as
2551not only does it not suffer these problems, but it is also Free
2552software like Emacs.
2553
9dc15871 2554** Linking
a933dad1 2555
9dc15871
EZ
2556*** Building Emacs with a system compiler fails to link because of an
2557undefined symbol such as __eprintf which does not appear in Emacs.
a933dad1 2558
9dc15871
EZ
2559This can happen if some of the libraries linked into Emacs were built
2560with GCC, but Emacs itself is being linked with a compiler other than
2561GCC. Object files compiled with GCC might need some helper functions
2562from libgcc.a, the library which comes with GCC, but the system
2563compiler does not instruct the linker to search libgcc.a during the
2564link stage.
a933dad1 2565
9dc15871 2566A solution is to link with GCC, like this:
a933dad1 2567
9dc15871 2568 make CC=gcc
a933dad1 2569
9dc15871
EZ
2570Since the .o object files already exist, this will not recompile Emacs
2571with GCC, but just restart by trying again to link temacs.
a933dad1 2572
9dc15871 2573*** AIX 1.3 ptf 0013: Link failure.
a933dad1 2574
9dc15871
EZ
2575There is a real duplicate definition of the function `_slibc_free' in
2576the library /lib/libc_s.a (just do nm on it to verify). The
2577workaround/fix is:
a933dad1 2578
9dc15871
EZ
2579 cd /lib
2580 ar xv libc_s.a NLtmtime.o
2581 ar dv libc_s.a NLtmtime.o
a933dad1 2582
9dc15871
EZ
2583*** AIX 4.1.2: Linker error messages such as
2584 ld: 0711-212 SEVERE ERROR: Symbol .__quous, found in the global symbol table
2585 of archive /usr/lib/libIM.a, was not defined in archive member shr.o.
a933dad1 2586
9dc15871
EZ
2587This is a problem in libIM.a. You can work around it by executing
2588these shell commands in the src subdirectory of the directory where
2589you build Emacs:
a933dad1 2590
9dc15871
EZ
2591 cp /usr/lib/libIM.a .
2592 chmod 664 libIM.a
2593 ranlib libIM.a
a933dad1 2594
9dc15871
EZ
2595Then change -lIM to ./libIM.a in the command to link temacs (in
2596Makefile).
a933dad1 2597
9dc15871 2598*** Sun with acc: Link failure when using acc on a Sun.
a933dad1 2599
9dc15871 2600To use acc, you need additional options just before the libraries, such as
a933dad1 2601
9dc15871 2602 /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1
a933dad1 2603
9dc15871 2604and you need to add -lansi just before -lc.
a933dad1 2605
9dc15871
EZ
2606The precise file names depend on the compiler version, so we
2607cannot easily arrange to supply them.
a933dad1 2608
9dc15871 2609*** Linking says that the functions insque and remque are undefined.
a933dad1 2610
9dc15871 2611Change oldXMenu/Makefile by adding insque.o to the variable OBJS.
a933dad1 2612
9dc15871 2613*** `tparam' reported as a multiply-defined symbol when linking with ncurses.
a933dad1 2614
9dc15871
EZ
2615This problem results from an incompatible change in ncurses, in
2616version 1.9.9e approximately. This version is unable to provide a
2617definition of tparm without also defining tparam. This is also
2618incompatible with Terminfo; as a result, the Emacs Terminfo support
2619does not work with this version of ncurses.
a933dad1 2620
9dc15871 2621The fix is to install a newer version of ncurses, such as version 4.2.
a933dad1 2622
9dc15871 2623** Dumping
a933dad1 2624
9dc15871 2625*** Linux: Segfault during `make bootstrap' under certain recent versions of the Linux kernel.
a933dad1 2626
880ea925 2627With certain recent Linux kernels (like the one of Red Hat Fedora Core
cf14a51c 26281 and newer), the new "Exec-shield" functionality is enabled by default, which
ed214edf
JD
2629creates a different memory layout that breaks the emacs dumper. Emacs tries
2630to handle this at build time, but if the workaround used fails, these
2631instructions can be useful.
cf14a51c
JD
2632The work-around explained here is not enough on Fedora Core 4 (and possible
2633newer). Read the next item.
a933dad1 2634
1f02a4ba
JD
2635Configure can overcome the problem of exec-shield if the architecture is
2636x86 and the program setarch is present. On other architectures no
2637workaround is known.
2638
9dc15871 2639You can check the Exec-shield state like this:
a933dad1 2640
9dc15871 2641 cat /proc/sys/kernel/exec-shield
a933dad1 2642
1f02a4ba 2643It returns non-zero when Exec-shield is enabled, 0 otherwise. Please
9dc15871 2644read your system documentation for more details on Exec-shield and
1f02a4ba
JD
2645associated commands. Exec-shield can be turned off with this command:
2646
2647 echo "0" > /proc/sys/kernel/exec-shield
a933dad1 2648
9dc15871
EZ
2649When Exec-shield is enabled, building Emacs will segfault during the
2650execution of this command:
a933dad1 2651
1f02a4ba 2652 ./temacs --batch --load loadup [dump|bootstrap]
177c0ea7 2653
9dc15871 2654To work around this problem, it is necessary to temporarily disable
1f02a4ba
JD
2655Exec-shield while building Emacs, or, on x86, by using the `setarch'
2656command when running temacs like this:
2657
2658 setarch i386 ./temacs --batch --load loadup [dump|bootstrap]
a933dad1 2659
ade79051 2660
cf14a51c
JD
2661*** Fedora Core 4 GNU/Linux: Segfault during dumping.
2662
2663In addition to exec-shield explained above "Linux: Segfault during
2664`make bootstrap' under certain recent versions of the Linux kernel"
2665item, Linux kernel shipped with Fedora Core 4 randomizes the virtual
2666address space of a process. As the result dumping may fail even if
2667you turn off exec-shield. In this case, use the -R option to the setarch
2668command:
2669
25fd144d 2670 setarch i386 -R ./temacs --batch --load loadup [dump|bootstrap]
cf14a51c
JD
2671
2672or
2673
ade79051 2674 setarch i386 -R make bootstrap
cf14a51c 2675
9dc15871 2676*** Fatal signal in the command temacs -l loadup inc dump.
a933dad1 2677
9dc15871
EZ
2678This command is the final stage of building Emacs. It is run by the
2679Makefile in the src subdirectory, or by build.com on VMS.
a933dad1 2680
9dc15871
EZ
2681It has been known to get fatal errors due to insufficient swapping
2682space available on the machine.
a933dad1 2683
9dc15871
EZ
2684On 68000s, it has also happened because of bugs in the
2685subroutine `alloca'. Verify that `alloca' works right, even
2686for large blocks (many pages).
a933dad1 2687
9dc15871
EZ
2688*** test-distrib says that the distribution has been clobbered.
2689*** or, temacs prints "Command key out of range 0-127".
2690*** or, temacs runs and dumps emacs, but emacs totally fails to work.
2691*** or, temacs gets errors dumping emacs.
a933dad1 2692
9dc15871
EZ
2693This can be because the .elc files have been garbled. Do not be
2694fooled by the fact that most of a .elc file is text: these are
2695binary files and can contain all 256 byte values.
a933dad1 2696
9dc15871
EZ
2697In particular `shar' cannot be used for transmitting GNU Emacs.
2698It typically truncates "lines". What appear to be "lines" in
2699a binary file can of course be of any length. Even once `shar'
2700itself is made to work correctly, `sh' discards null characters
2701when unpacking the shell archive.
a933dad1 2702
9dc15871
EZ
2703I have also seen character \177 changed into \377. I do not know
2704what transfer means caused this problem. Various network
2705file transfer programs are suspected of clobbering the high bit.
a933dad1 2706
9dc15871
EZ
2707If you have a copy of Emacs that has been damaged in its
2708nonprinting characters, you can fix them:
a933dad1 2709
9dc15871
EZ
2710 1) Record the names of all the .elc files.
2711 2) Delete all the .elc files.
2712 3) Recompile alloc.c with a value of PURESIZE twice as large.
2713 (See puresize.h.) You might as well save the old alloc.o.
2714 4) Remake emacs. It should work now.
2715 5) Running emacs, do Meta-x byte-compile-file repeatedly
2716 to recreate all the .elc files that used to exist.
2717 You may need to increase the value of the variable
2718 max-lisp-eval-depth to succeed in running the compiler interpreted
2719 on certain .el files. 400 was sufficient as of last report.
2720 6) Reinstall the old alloc.o (undoing changes to alloc.c if any)
2721 and remake temacs.
2722 7) Remake emacs. It should work now, with valid .elc files.
a933dad1 2723
9dc15871 2724*** temacs prints "Pure Lisp storage exhausted".
a933dad1 2725
9dc15871
EZ
2726This means that the Lisp code loaded from the .elc and .el
2727files during temacs -l loadup inc dump took up more
2728space than was allocated.
a933dad1 2729
9dc15871
EZ
2730This could be caused by
2731 1) adding code to the preloaded Lisp files
2732 2) adding more preloaded files in loadup.el
2733 3) having a site-init.el or site-load.el which loads files.
2734 Note that ANY site-init.el or site-load.el is nonstandard;
2735 if you have received Emacs from some other site
2736 and it contains a site-init.el or site-load.el file, consider
2737 deleting that file.
2738 4) getting the wrong .el or .elc files
2739 (not from the directory you expected).
2740 5) deleting some .elc files that are supposed to exist.
2741 This would cause the source files (.el files) to be
2742 loaded instead. They take up more room, so you lose.
2743 6) a bug in the Emacs distribution which underestimates
2744 the space required.
a933dad1 2745
9dc15871
EZ
2746If the need for more space is legitimate, change the definition
2747of PURESIZE in puresize.h.
a933dad1 2748
9dc15871
EZ
2749But in some of the cases listed above, this problem is a consequence
2750of something else that is wrong. Be sure to check and fix the real
2751problem.
a933dad1 2752
9dc15871 2753*** Linux: Emacs crashes when dumping itself on Mac PPC running Yellow Dog GNU/Linux.
a933dad1 2754
9dc15871
EZ
2755The crashes happen inside the function Fmake_symbol; here's a typical
2756C backtrace printed by GDB:
a933dad1 2757
9dc15871
EZ
2758 0x190c0c0 in Fmake_symbol ()
2759 (gdb) where
2760 #0 0x190c0c0 in Fmake_symbol ()
2761 #1 0x1942ca4 in init_obarray ()
2762 #2 0x18b3500 in main ()
2763 #3 0x114371c in __libc_start_main (argc=5, argv=0x7ffff5b4, envp=0x7ffff5cc,
a933dad1 2764
9dc15871
EZ
2765This could happen because GCC version 2.95 and later changed the base
2766of the load address to 0x10000000. Emacs needs to be told about this,
2767but we currently cannot do that automatically, because that breaks
2768other versions of GNU/Linux on the MacPPC. Until we find a way to
2769distinguish between the Yellow Dog and the other varieties of
2770GNU/Linux systems on the PPC, you will have to manually uncomment the
2771following section near the end of the file src/m/macppc.h in the Emacs
2772distribution:
a933dad1 2773
9dc15871
EZ
2774 #if 0 /* This breaks things on PPC GNU/Linux except for Yellowdog,
2775 even with identical GCC, as, ld. Let's take it out until we
2776 know what's really going on here. */
2777 /* GCC 2.95 and newer on GNU/Linux PPC changed the load address to
2778 0x10000000. */
2779 #if defined __linux__
2780 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
2781 #define DATA_SEG_BITS 0x10000000
2782 #endif
2783 #endif
2784 #endif /* 0 */
a933dad1 2785
9dc15871
EZ
2786Remove the "#if 0" and "#endif" directives which surround this, save
2787the file, and then reconfigure and rebuild Emacs. The dumping process
2788should now succeed.
a933dad1 2789
0bce976c
GM
2790*** OpenBSD 4.0 macppc: Segfault during dumping.
2791
2792The build aborts with signal 11 when the command `./temacs --batch
14395431 2793--load loadup bootstrap' tries to load files.el. A workaround seems
464df798 2794to be to reduce the level of compiler optimization used during the
14395431
GM
2795build (from -O2 to -O1). It is possible this is an OpenBSD
2796GCC problem specific to the macppc architecture, possibly only
2797occurring with older versions of GCC (e.g. 3.3.5).
0bce976c 2798
9dc15871 2799** Installation
a933dad1 2800
9dc15871 2801*** Installing Emacs gets an error running `install-info'.
a933dad1 2802
9dc15871
EZ
2803You need to install a recent version of Texinfo; that package
2804supplies the `install-info' command.
a933dad1 2805
6afdff63
GM
2806*** Installing to a directory with spaces in the name fails.
2807
2808For example, if you call configure with a directory-related option
2809with spaces in the value, eg --enable-locallisppath='/path/with\ spaces'.
2810Using directory paths with spaces is not supported at this time: you
2811must re-configure without using spaces.
2812
89eaca5d
GM
2813*** On Solaris, use GNU Make when installing an out-of-tree build
2814
2815The Emacs configuration process allows you to configure the
2816build environment so that you can build emacs in a directory
2817outside of the distribution tree. When installing Emacs from an
2818out-of-tree build directory on Solaris, you may need to use GNU
2819make. The make programs bundled with Solaris support the VPATH
2820macro but use it differently from the way the VPATH macro is
2821used by GNU make. The differences will cause the "make install"
2822step to fail, leaving you with an incomplete emacs
2823installation. GNU make is available in /usr/sfw/bin on Solaris
282410 and can be installed as /opt/sfw/bin/gmake from the Solaris 9
2825Software Companion CDROM.
2826
2827The problems due to the VPATH processing differences affect only
2828out of tree builds so, if you are on a Solaris installation
2829without GNU make, you can install Emacs completely by installing
2830from a build environment using the original emacs distribution tree.
2831
9dc15871 2832** First execution
a933dad1 2833
9dc15871 2834*** Emacs binary is not in executable format, and cannot be run.
a933dad1 2835
9dc15871
EZ
2836This was reported to happen when Emacs is built in a directory mounted
2837via NFS, for some combinations of NFS client and NFS server.
2838Usually, the file `emacs' produced in these cases is full of
2839binary null characters, and the `file' utility says:
a933dad1 2840
9dc15871 2841 emacs: ASCII text, with no line terminators
a933dad1 2842
9dc15871
EZ
2843We don't know what exactly causes this failure. A work-around is to
2844build Emacs in a directory on a local disk.
a933dad1 2845
9dc15871 2846*** The dumped Emacs crashes when run, trying to write pure data.
a933dad1 2847
9dc15871 2848Two causes have been seen for such problems.
a933dad1 2849
9dc15871
EZ
28501) On a system where getpagesize is not a system call, it is defined
2851as a macro. If the definition (in both unexec.c and malloc.c) is wrong,
2852it can cause problems like this. You might be able to find the correct
2853value in the man page for a.out (5).
a933dad1 2854
9dc15871
EZ
28552) Some systems allocate variables declared static among the
2856initialized variables. Emacs makes all initialized variables in most
2857of its files pure after dumping, but the variables declared static and
2858not initialized are not supposed to be pure. On these systems you
2859may need to add "#define static" to the m- or the s- file.
a933dad1 2860
9dc15871 2861* Emacs 19 problems
a933dad1 2862
9dc15871 2863** Error messages `Wrong number of arguments: #<subr where-is-internal>, 5'.
a933dad1 2864
9dc15871
EZ
2865This typically results from having the powerkey library loaded.
2866Powerkey was designed for Emacs 19.22. It is obsolete now because
2867Emacs 19 now has this feature built in; and powerkey also calls
2868where-is-internal in an obsolete way.
a933dad1 2869
9dc15871 2870So the fix is to arrange not to load powerkey.
a933dad1 2871
9dc15871 2872* Runtime problems on legacy systems
a933dad1 2873
9dc15871
EZ
2874This section covers bugs reported on very old hardware or software.
2875If you are using hardware and an operating system shipped after 2000,
2876it is unlikely you will see any of these.
a933dad1 2877
9dc15871 2878** Ancient operating systems
a933dad1 2879
0a4dd4e4
EZ
2880AIX 4.2 was end-of-lifed on Dec 31st, 1999.
2881
2882*** AIX: You get this compiler error message:
2883
2884 Processing include file ./XMenuInt.h
2885 1501-106: (S) Include file X11/Xlib.h not found.
2886
2887This means your system was installed with only the X11 runtime i.d
2888libraries. You have to find your sipo (bootable tape) and install
2889X11Dev... with smit.
2890
2891(This report must be ancient. Bootable tapes are long dead.)
2892
2893*** AIX 3.2.4: Releasing Ctrl/Act key has no effect, if Shift is down.
2894
2895Due to a feature of AIX, pressing or releasing the Ctrl/Act key is
2896ignored when the Shift, Alt or AltGr keys are held down. This can
2897lead to the keyboard being "control-locked"--ordinary letters are
2898treated as control characters.
2899
2900You can get out of this "control-locked" state by pressing and
2901releasing Ctrl/Act while not pressing or holding any other keys.
2902
2903*** AIX 3.2.5: You get this message when running Emacs:
2904
2905 Could not load program emacs
2906 Symbol smtcheckinit in csh is undefined
2907 Error was: Exec format error
2908
2909or this one:
2910
2911 Could not load program .emacs
2912 Symbol _system_con in csh is undefined
2913 Symbol _fp_trapsta in csh is undefined
2914 Error was: Exec format error
2915
2916These can happen when you try to run on AIX 3.2.5 a program that was
2917compiled with 3.2.4. The fix is to recompile.
2918
2919*** AIX 4.2: Emacs gets a segmentation fault at startup.
2920
2921If you are using IBM's xlc compiler, compile emacs.c
2922without optimization; that should avoid the problem.
2923
9dc15871 2924*** ISC Unix
a933dad1 2925
9dc15871 2926**** ISC: display-time causes kernel problems on ISC systems.
a933dad1 2927
9dc15871
EZ
2928Under Interactive Unix versions 3.0.1 and 4.0 (and probably other
2929versions), display-time causes the loss of large numbers of STREVENT
2930cells. Eventually the kernel's supply of these cells is exhausted.
2931This makes emacs and the whole system run slow, and can make other
2932processes die, in particular pcnfsd.
a933dad1 2933
9dc15871
EZ
2934Other emacs functions that communicate with remote processes may have
2935the same problem. Display-time seems to be far the worst.
a933dad1 2936
9dc15871 2937The only known fix: Don't run display-time.
a933dad1 2938
9dc15871 2939*** SunOS
a933dad1 2940
0a4dd4e4
EZ
2941SunOS 4.1.4 stopped shipping on Sep 30 1998.
2942
2943**** SunOS: You get linker errors
2944 ld: Undefined symbol
2945 _get_wmShellWidgetClass
2946 _get_applicationShellWidgetClass
2947
9dc15871 2948**** Sun 4.0.x: M-x shell persistently reports "Process shell exited abnormally with code 1".
a933dad1 2949
9dc15871
EZ
2950This happened on Suns as a result of what is said to be a bug in Sunos
2951version 4.0.x. The only fix was to reboot the machine.
a933dad1 2952
9dc15871 2953**** SunOS4.1.1 and SunOS4.1.3: Mail is lost when sent to local aliases.
a933dad1
DL
2954
2955Many emacs mail user agents (VM and rmail, for instance) use the
2956sendmail.el library. This library can arrange for mail to be
2957delivered by passing messages to the /usr/lib/sendmail (usually)
2958program . In doing so, it passes the '-t' flag to sendmail, which
2959means that the name of the recipient of the message is not on the
2960command line and, therefore, that sendmail must parse the message to
2961obtain the destination address.
2962
2963There is a bug in the SunOS4.1.1 and SunOS4.1.3 versions of sendmail.
2964In short, when given the -t flag, the SunOS sendmail won't recognize
2965non-local (i.e. NIS) aliases. It has been reported that the Solaris
29662.x versions of sendmail do not have this bug. For those using SunOS
29674.1, the best fix is to install sendmail V8 or IDA sendmail (which
2968have other advantages over the regular sendmail as well). At the time
2969of this writing, these official versions are available:
2970
2971 Sendmail V8 on ftp.cs.berkeley.edu in /ucb/sendmail:
2972 sendmail.8.6.9.base.tar.Z (the base system source & documentation)
2973 sendmail.8.6.9.cf.tar.Z (configuration files)
2974 sendmail.8.6.9.misc.tar.Z (miscellaneous support programs)
2975 sendmail.8.6.9.xdoc.tar.Z (extended documentation, with postscript)
2976
2977 IDA sendmail on vixen.cso.uiuc.edu in /pub:
2978 sendmail-5.67b+IDA-1.5.tar.gz
2979
9dc15871 2980**** Sunos 4: You get the error ld: Undefined symbol __lib_version.
a933dad1 2981
9dc15871
EZ
2982This is the result of using cc or gcc with the shared library meant
2983for acc (the Sunpro compiler). Check your LD_LIBRARY_PATH and delete
2984/usr/lang/SC2.0.1 or some similar directory.
a933dad1 2985
9dc15871 2986**** SunOS 4.1.3: Emacs unpredictably crashes in _yp_dobind_soft.
a933dad1 2987
9dc15871
EZ
2988This happens if you configure Emacs specifying just `sparc-sun-sunos4'
2989on a system that is version 4.1.3. You must specify the precise
2990version number (or let configure figure out the configuration, which
2991it can do perfectly well for SunOS).
a933dad1 2992
9dc15871 2993**** Sunos 4.1.3: Emacs gets hung shortly after startup.
a933dad1 2994
9dc15871
EZ
2995We think this is due to a bug in Sunos. The word is that
2996one of these Sunos patches fixes the bug:
a933dad1 2997
9dc15871
EZ
2998100075-11 100224-06 100347-03 100482-05 100557-02 100623-03 100804-03 101080-01
2999100103-12 100249-09 100496-02 100564-07 100630-02 100891-10 101134-01
3000100170-09 100296-04 100377-09 100507-04 100567-04 100650-02 101070-01 101145-01
3001100173-10 100305-15 100383-06 100513-04 100570-05 100689-01 101071-03 101200-02
3002100178-09 100338-05 100421-03 100536-02 100584-05 100784-01 101072-01 101207-01
a933dad1 3003
9dc15871
EZ
3004We don't know which of these patches really matter. If you find out
3005which ones, please inform bug-gnu-emacs@gnu.org.
a933dad1 3006
9dc15871
EZ
3007**** SunOS 4: Emacs processes keep going after you kill the X server
3008(or log out, if you logged in using X).
a933dad1 3009
9dc15871 3010Someone reported that recompiling with GCC 2.7.0 fixed this problem.
a933dad1 3011
9dc15871
EZ
3012The fix to this is to install patch 100573 for OpenWindows 3.0
3013or link libXmu statically.
a933dad1 3014
0a4dd4e4
EZ
3015**** Sunos 5.3: Subprocesses remain, hanging but not zombies.
3016
3017A bug in Sunos 5.3 causes Emacs subprocesses to remain after Emacs
3018exits. Sun patch # 101415-02 is part of the fix for this, but it only
3019applies to ptys, and doesn't fix the problem with subprocesses
3020communicating through pipes.
3021
9dc15871 3022*** Apollo Domain
a933dad1 3023
9dc15871 3024**** Shell mode ignores interrupts on Apollo Domain.
a933dad1 3025
9dc15871 3026You may find that M-x shell prints the following message:
a933dad1 3027
9dc15871 3028 Warning: no access to tty; thus no job control in this shell...
a933dad1 3029
9dc15871
EZ
3030This can happen if there are not enough ptys on your system.
3031Here is how to make more of them.
a933dad1 3032
9dc15871
EZ
3033 % cd /dev
3034 % ls pty*
3035 # shows how many pty's you have. I had 8, named pty0 to pty7)
3036 % /etc/crpty 8
3037 # creates eight new pty's
a933dad1 3038
9dc15871 3039*** Irix
a933dad1 3040
9dc15871 3041*** Irix 6.2: No visible display on mips-sgi-irix6.2 when compiling with GCC 2.8.1.
a933dad1 3042
9dc15871
EZ
3043This problem went away after installing the latest IRIX patches
3044as of 8 Dec 1998.
a933dad1 3045
9dc15871 3046The same problem has been reported on Irix 6.3.
a933dad1 3047
9dc15871
EZ
3048*** Irix 6.3: substituting environment variables in file names
3049in the minibuffer gives peculiar error messages such as
a933dad1 3050
9dc15871 3051 Substituting nonexistent environment variable ""
a933dad1 3052
9dc15871
EZ
3053This is not an Emacs bug; it is caused by something in SGI patch
3054003082 August 11, 1998.
a933dad1 3055
9dc15871 3056*** OPENSTEP
a933dad1 3057
9dc15871 3058**** OPENSTEP 4.2: Compiling syntax.c with gcc 2.7.2.1 fails.
a933dad1 3059
9dc15871
EZ
3060The compiler was reported to crash while compiling syntax.c with the
3061following message:
a933dad1 3062
9dc15871 3063 cc: Internal compiler error: program cc1obj got fatal signal 11
a933dad1 3064
9dc15871
EZ
3065To work around this, replace the macros UPDATE_SYNTAX_TABLE_FORWARD,
3066INC_BOTH, and INC_FROM with functions. To this end, first define 3
3067functions, one each for every macro. Here's an example:
a933dad1 3068
9dc15871
EZ
3069 static int update_syntax_table_forward(int from)
3070 {
3071 return(UPDATE_SYNTAX_TABLE_FORWARD(from));
3072 }/*update_syntax_table_forward*/
a933dad1 3073
9dc15871
EZ
3074Then replace all references to UPDATE_SYNTAX_TABLE_FORWARD in syntax.c
3075with a call to the function update_syntax_table_forward.
a933dad1 3076
9dc15871 3077*** Solaris 2.x
a933dad1 3078
9dc15871 3079**** Strange results from format %d in a few cases, on a Sun.
a933dad1 3080
9dc15871
EZ
3081Sun compiler version SC3.0 has been found to miscompile part of
3082editfns.c. The workaround is to compile with some other compiler such
3083as GCC.
a933dad1 3084
9dc15871 3085**** On Solaris, Emacs dumps core if lisp-complete-symbol is called.
a933dad1 3086
9dc15871
EZ
3087If you compile Emacs with the -fast or -xO4 option with version 3.0.2
3088of the Sun C compiler, Emacs dumps core when lisp-complete-symbol is
3089called. The problem does not happen if you compile with GCC.
a933dad1 3090
9dc15871 3091**** On Solaris, Emacs crashes if you use (display-time).
a933dad1 3092
9dc15871
EZ
3093This can happen if you configure Emacs without specifying the precise
3094version of Solaris that you are using.
a933dad1 3095
9dc15871 3096**** Solaris 2.3 and 2.4: Unpredictable segmentation faults.
a933dad1 3097
9dc15871
EZ
3098A user reported that this happened in 19.29 when it was compiled with
3099the Sun compiler, but not when he recompiled with GCC 2.7.0.
a933dad1 3100
9dc15871 3101We do not know whether something in Emacs is partly to blame for this.
a933dad1 3102
9dc15871 3103**** Solaris 2.4: Emacs dumps core on startup.
a933dad1 3104
9dc15871
EZ
3105Bill Sebok says that the cause of this is Solaris 2.4 vendor patch
3106102303-05, which extends the Solaris linker to deal with the Solaris
3107Common Desktop Environment's linking needs. You can fix the problem
3108by removing this patch and installing patch 102049-02 instead.
3109However, that linker version won't work with CDE.
a933dad1 3110
9dc15871
EZ
3111Solaris 2.5 comes with a linker that has this bug. It is reported that if
3112you install all the latest patches (as of June 1996), the bug is fixed.
3113We suspect the crucial patch is one of these, but we don't know
3114for certain.
a933dad1 3115
9dc15871
EZ
3116 103093-03: [README] SunOS 5.5: kernel patch (2140557 bytes)
3117 102832-01: [README] OpenWindows 3.5: Xview Jumbo Patch (4181613 bytes)
3118 103242-04: [README] SunOS 5.5: linker patch (595363 bytes)
a933dad1 3119
9dc15871
EZ
3120(One user reports that the bug was fixed by those patches together
3121with patches 102980-04, 103279-01, 103300-02, and 103468-01.)
a933dad1 3122
9dc15871
EZ
3123If you can determine which patch does fix the bug, please tell
3124bug-gnu-emacs@gnu.org.
a933dad1 3125
9dc15871
EZ
3126Meanwhile, the GNU linker links Emacs properly on both Solaris 2.4 and
3127Solaris 2.5.
a933dad1 3128
9dc15871
EZ
3129**** Solaris 2.4: Dired hangs and C-g does not work. Or Emacs hangs
3130forever waiting for termination of a subprocess that is a zombie.
a933dad1 3131
9dc15871
EZ
3132casper@fwi.uva.nl says the problem is in X11R6. Rebuild libX11.so
3133after changing the file xc/config/cf/sunLib.tmpl. Change the lines
a933dad1 3134
9dc15871
EZ
3135 #if ThreadedX
3136 #define SharedX11Reqs -lthread
3137 #endif
a933dad1 3138
9dc15871 3139to:
a933dad1 3140
9dc15871
EZ
3141 #if OSMinorVersion < 4
3142 #if ThreadedX
3143 #define SharedX11Reqs -lthread
3144 #endif
3145 #endif
3146
3147Be sure also to edit x/config/cf/sun.cf so that OSMinorVersion is 4
3148(as it should be for Solaris 2.4). The file has three definitions for
3149OSMinorVersion: the first is for x86, the second for SPARC under
3150Solaris, and the third for SunOS 4. Make sure to update the
3151definition for your type of machine and system.
a933dad1 3152
9dc15871
EZ
3153Then do `make Everything' in the top directory of X11R6, to rebuild
3154the makefiles and rebuild X. The X built this way work only on
3155Solaris 2.4, not on 2.3.
a933dad1 3156
9dc15871
EZ
3157For multithreaded X to work it is necessary to install patch
3158101925-02 to fix problems in header files [2.4]. You need
3159to reinstall gcc or re-run just-fixinc after installing that
3160patch.
a933dad1 3161
9dc15871
EZ
3162However, Frank Rust <frust@iti.cs.tu-bs.de> used a simpler solution:
3163he changed
3164 #define ThreadedX YES
3165to
3166 #define ThreadedX NO
3167in sun.cf and did `make World' to rebuild X11R6. Removing all
3168`-DXTHREAD*' flags and `-lthread' entries from lib/X11/Makefile and
3169typing 'make install' in that directory also seemed to work.
a933dad1 3170
9dc15871 3171**** Solaris 2.x: GCC complains "64 bit integer types not supported".
a933dad1 3172
9dc15871
EZ
3173This suggests that GCC is not installed correctly. Most likely you
3174are using GCC 2.7.2.3 (or earlier) on Solaris 2.6 (or later); this
3175does not work without patching. To run GCC 2.7.2.3 on Solaris 2.6 or
3176later, you must patch fixinc.svr4 and reinstall GCC from scratch as
3177described in the Solaris FAQ
3178<http://www.wins.uva.nl/pub/solaris/solaris2.html>. A better fix is
3179to upgrade to GCC 2.8.1 or later.
a933dad1 3180
9dc15871
EZ
3181**** Solaris 2.7: Building Emacs with WorkShop Compilers 5.0 98/12/15
3182C 5.0 failed, apparently with non-default CFLAGS, most probably due to
3183compiler bugs. Using Sun Solaris 2.7 Sun WorkShop 6 update 1 C
3184release was reported to work without problems. It worked OK on
3185another system with Solaris 8 using apparently the same 5.0 compiler
3186and the default CFLAGS.
a933dad1 3187
9dc15871 3188**** Solaris 2.x: Emacs dumps core when built with Motif.
a933dad1 3189
9dc15871
EZ
3190The Solaris Motif libraries are buggy, at least up through Solaris 2.5.1.
3191Install the current Motif runtime library patch appropriate for your host.
3192(Make sure the patch is current; some older patch versions still have the bug.)
3193You should install the other patches recommended by Sun for your host, too.
3194You can obtain Sun patches from ftp://sunsolve.sun.com/pub/patches/;
3195look for files with names ending in `.PatchReport' to see which patches
3196are currently recommended for your host.
a933dad1 3197
9dc15871
EZ
3198On Solaris 2.6, Emacs is said to work with Motif when Solaris patch
3199105284-12 is installed, but fail when 105284-15 is installed.
3200105284-18 might fix it again.
a933dad1 3201
0a4dd4e4 3202**** Solaris 2.6 and 7: the Compose key does not work.
a933dad1 3203
9dc15871
EZ
3204This is a bug in Motif in Solaris. Supposedly it has been fixed for
3205the next major release of Solaris. However, if someone with Sun
3206support complains to Sun about the bug, they may release a patch.
3207If you do this, mention Sun bug #4188711.
a933dad1 3208
9dc15871
EZ
3209One workaround is to use a locale that allows non-ASCII characters.
3210For example, before invoking emacs, set the LC_ALL environment
3211variable to "en_US" (American English). The directory /usr/lib/locale
3212lists the supported locales; any locale other than "C" or "POSIX"
3213should do.
a933dad1 3214
9dc15871
EZ
3215pen@lysator.liu.se says (Feb 1998) that the Compose key does work
3216if you link with the MIT X11 libraries instead of the Solaris X11
3217libraries.
a933dad1 3218
0a4dd4e4
EZ
3219*** HP/UX versions before 11.0
3220
bf247b6e 3221HP/UX 9 was end-of-lifed in December 1998.
0a4dd4e4
EZ
3222HP/UX 10 was end-of-lifed in May 1999.
3223
3224**** HP/UX 9: Emacs crashes with SIGBUS or SIGSEGV after you delete a frame.
3225
3226We think this is due to a bug in the X libraries provided by HP. With
3227the alternative X libraries in /usr/contrib/mitX11R5/lib, the problem
3228does not happen.
3229
3230*** HP/UX 10: Large file support is disabled.
3231
3232See the comments in src/s/hpux10.h.
3233
3234*** HP/UX: Emacs is slow using X11R5.
3235
3236This happens if you use the MIT versions of the X libraries--it
3237doesn't run as fast as HP's version. People sometimes use the version
3238because they see the HP version doesn't have the libraries libXaw.a,
3239libXmu.a, libXext.a and others. HP/UX normally doesn't come with
3240those libraries installed. To get good performance, you need to
3241install them and rebuild Emacs.
3242
9dc15871 3243*** Ultrix and Digital Unix
a933dad1 3244
9dc15871 3245**** Ultrix 4.2: `make install' fails on install-doc with `Error 141'.
a933dad1 3246
9dc15871
EZ
3247This happens on Ultrix 4.2 due to failure of a pipeline of tar
3248commands. We don't know why they fail, but the bug seems not to be in
3249Emacs. The workaround is to run the shell command in install-doc by
3250hand.
a933dad1 3251
9dc15871 3252**** Digital Unix 4.0: Garbled display on non-X terminals when Emacs runs.
a933dad1 3253
9dc15871
EZ
3254So far it appears that running `tset' triggers this problem (when TERM
3255is vt100, at least). If you do not run `tset', then Emacs displays
3256properly. If someone can tell us precisely which effect of running
3257`tset' actually causes the problem, we may be able to implement a fix
3258in Emacs.
a933dad1 3259
9dc15871 3260**** Ultrix: `expand-file-name' fails to work on any but the machine you dumped Emacs on.
a933dad1 3261
9dc15871
EZ
3262On Ultrix, if you use any of the functions which look up information
3263in the passwd database before dumping Emacs (say, by using
3264expand-file-name in site-init.el), then those functions will not work
3265in the dumped Emacs on any host but the one Emacs was dumped on.
a933dad1 3266
9dc15871
EZ
3267The solution? Don't use expand-file-name in site-init.el, or in
3268anything it loads. Yuck - some solution.
a933dad1 3269
9dc15871
EZ
3270I'm not sure why this happens; if you can find out exactly what is
3271going on, and perhaps find a fix or a workaround, please let us know.
3272Perhaps the YP functions cache some information, the cache is included
3273in the dumped Emacs, and is then inaccurate on any other host.
a933dad1 3274
9dc15871 3275*** SVr4
a933dad1 3276
9dc15871 3277**** SVr4: On some variants of SVR4, Emacs does not work at all with X.
a933dad1 3278
9dc15871
EZ
3279Try defining BROKEN_FIONREAD in your config.h file. If this solves
3280the problem, please send a bug report to tell us this is needed; be
3281sure to say exactly what type of machine and system you are using.
a933dad1 3282
9dc15871 3283**** SVr4: After running emacs once, subsequent invocations crash.
a933dad1 3284
9dc15871
EZ
3285Some versions of SVR4 have a serious bug in the implementation of the
3286mmap () system call in the kernel; this causes emacs to run correctly
3287the first time, and then crash when run a second time.
a933dad1 3288
9dc15871
EZ
3289Contact your vendor and ask for the mmap bug fix; in the mean time,
3290you may be able to work around the problem by adding a line to your
3291operating system description file (whose name is reported by the
3292configure script) that reads:
3293#define SYSTEM_MALLOC
3294This makes Emacs use memory less efficiently, but seems to work around
3295the kernel bug.
a933dad1 3296
0a4dd4e4
EZ
3297*** Irix 5 and earlier
3298
bf247b6e 3299Exactly when Irix-5 end-of-lifed is obscure. But since Irix 6.0
0a4dd4e4
EZ
3300shipped in 1994, it has been some years.
3301
3302**** Irix 5.2: unexelfsgi.c can't find cmplrs/stsupport.h.
3303
3304The file cmplrs/stsupport.h was included in the wrong file set in the
3305Irix 5.2 distribution. You can find it in the optional fileset
3306compiler_dev, or copy it from some other Irix 5.2 system. A kludgy
3307workaround is to change unexelfsgi.c to include sym.h instead of
3308syms.h.
3309
3310**** Irix 5.3: "out of virtual swap space".
3311
3312This message occurs when the system runs out of swap space due to too
3313many large programs running. The solution is either to provide more
3314swap space or to reduce the number of large programs being run. You
3315can check the current status of the swap space by executing the
3316command `swap -l'.
3317
3318You can increase swap space by changing the file /etc/fstab. Adding a
3319line like this:
3320
3321/usr/swap/swap.more swap swap pri=3 0 0
3322
3323where /usr/swap/swap.more is a file previously created (for instance
3324by using /etc/mkfile), will increase the swap space by the size of
3325that file. Execute `swap -m' or reboot the machine to activate the
3326new swap area. See the manpages for `swap' and `fstab' for further
3327information.
3328
3329The objectserver daemon can use up lots of memory because it can be
3330swamped with NIS information. It collects information about all users
3331on the network that can log on to the host.
3332
3333If you want to disable the objectserver completely, you can execute
3334the command `chkconfig objectserver off' and reboot. That may disable
3335some of the window system functionality, such as responding CDROM
3336icons.
3337
3338You can also remove NIS support from the objectserver. The SGI `admin'
3339FAQ has a detailed description on how to do that; see question 35
3340("Why isn't the objectserver working?"). The admin FAQ can be found at
3341ftp://viz.tamu.edu/pub/sgi/faq/.
3342
3343**** Irix 5.3: Emacs crashes in utmpname.
3344
3345This problem is fixed in Patch 3175 for Irix 5.3.
3346It is also fixed in Irix versions 6.2 and up.
3347
3348**** Irix 6.0: Make tries (and fails) to build a program named unexelfsgi.
3349
3350A compiler bug inserts spaces into the string "unexelfsgi . o"
3351in src/Makefile. Edit src/Makefile, after configure is run,
3352find that string, and take out the spaces.
3353
3354Compiler fixes in Irix 6.0.1 should eliminate this problem.
3355
3356*** SCO Unix and UnixWare
3357
3358**** SCO 3.2v4: Unusable default font.
3359
3360The Open Desktop environment comes with default X resource settings
3361that tell Emacs to use a variable-width font. Emacs cannot use such
3362fonts, so it does not work.
3363
3364This is caused by the file /usr/lib/X11/app-defaults/ScoTerm, which is
3365the application-specific resource file for the `scoterm' terminal
3366emulator program. It contains several extremely general X resources
3367that affect other programs besides `scoterm'. In particular, these
3368resources affect Emacs also:
3369
3370 *Font: -*-helvetica-medium-r-*--12-*-p-*
3371 *Background: scoBackground
3372 *Foreground: scoForeground
3373
3374The best solution is to create an application-specific resource file for
3375Emacs, /usr/lib/X11/sco/startup/Emacs, with the following contents:
3376
3377 Emacs*Font: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
3378 Emacs*Background: white
3379 Emacs*Foreground: black
3380
3381(These settings mimic the Emacs defaults, but you can change them to
3382suit your needs.) This resource file is only read when the X server
3383starts up, so you should restart it by logging out of the Open Desktop
3384environment or by running `scologin stop; scologin start` from the shell
3385as root. Alternatively, you can put these settings in the
3386/usr/lib/X11/app-defaults/Emacs resource file and simply restart Emacs,
3387but then they will not affect remote invocations of Emacs that use the
3388Open Desktop display.
3389
3390These resource files are not normally shared across a network of SCO
3391machines; you must create the file on each machine individually.
3392
3393**** SCO 4.2.0: Regular expressions matching bugs on SCO systems.
3394
3395On SCO, there are problems in regexp matching when Emacs is compiled
3396with the system compiler. The compiler version is "Microsoft C
3397version 6", SCO 4.2.0h Dev Sys Maintenance Supplement 01/06/93; Quick
3398C Compiler Version 1.00.46 (Beta). The solution is to compile with
3399GCC.
3400
3401**** UnixWare 2.1: Error 12 (virtual memory exceeded) when dumping Emacs.
3402
3403Paul Abrahams (abrahams@acm.org) reports that with the installed
3404virtual memory settings for UnixWare 2.1.2, an Error 12 occurs during
3405the "make" that builds Emacs, when running temacs to dump emacs. That
3406error indicates that the per-process virtual memory limit has been
3407exceeded. The default limit is probably 32MB. Raising the virtual
3408memory limit to 40MB should make it possible to finish building Emacs.
3409
3410You can do this with the command `ulimit' (sh) or `limit' (csh).
3411But you have to be root to do it.
3412
3413According to Martin Sohnius, you can also retune this in the kernel:
3414
3415 # /etc/conf/bin/idtune SDATLIM 33554432 ## soft data size limit
3416 # /etc/conf/bin/idtune HDATLIM 33554432 ## hard "
3417 # /etc/conf/bin/idtune SVMMSIZE unlimited ## soft process size limit
3418 # /etc/conf/bin/idtune HVMMSIZE unlimited ## hard "
3419 # /etc/conf/bin/idbuild -B
3420
3421(He recommends you not change the stack limit, though.)
3422These changes take effect when you reboot.
3423
9dc15871 3424*** Linux 1.x
a933dad1 3425
9dc15871 3426**** Linux 1.0-1.04: Typing C-c C-c in Shell mode kills your X server.
a933dad1 3427
9dc15871
EZ
3428This happens with Linux kernel 1.0 thru 1.04, approximately. The workaround is
3429to define SIGNALS_VIA_CHARACTERS in config.h and recompile Emacs.
3430Newer Linux kernel versions don't have this problem.
a933dad1 3431
9dc15871
EZ
3432**** Linux 1.3: Output from subprocess (such as man or diff) is randomly
3433truncated on GNU/Linux systems.
a933dad1 3434
9dc15871
EZ
3435This is due to a kernel bug which seems to be fixed in Linux version
34361.3.75.
a933dad1 3437
0a4dd4e4
EZ
3438** Windows 3.1, 95, 98, and ME
3439
3440*** MS-Windows NT/95: Problems running Perl under Emacs
3441
3442`perl -de 0' just hangs when executed in an Emacs subshell.
3443The fault lies with Perl (indirectly with Windows NT/95).
3444
3445The problem is that the Perl debugger explicitly opens a connection to
3446"CON", which is the DOS/NT equivalent of "/dev/tty", for interacting
3447with the user.
3448
3449On Unix, this is okay, because Emacs (or the shell?) creates a
3450pseudo-tty so that /dev/tty is really the pipe Emacs is using to
3451communicate with the subprocess.
3452
3453On NT, this fails because CON always refers to the handle for the
3454relevant console (approximately equivalent to a tty), and cannot be
3455redirected to refer to the pipe Emacs assigned to the subprocess as
3456stdin.
3457
3458A workaround is to modify perldb.pl to use STDIN/STDOUT instead of CON.
3459
3460For Perl 4:
3461
3462 *** PERL/LIB/PERLDB.PL.orig Wed May 26 08:24:18 1993
3463 --- PERL/LIB/PERLDB.PL Mon Jul 01 15:28:16 1996
3464 ***************
3465 *** 68,74 ****
3466 $rcfile=".perldb";
3467 }
3468 else {
3469 ! $console = "con";
3470 $rcfile="perldb.ini";
3471 }
3472
3473 --- 68,74 ----
3474 $rcfile=".perldb";
3475 }
3476 else {
3477 ! $console = "";
3478 $rcfile="perldb.ini";
3479 }
3480
3481
3482 For Perl 5:
3483 *** perl/5.001/lib/perl5db.pl.orig Sun Jun 04 21:13:40 1995
3484 --- perl/5.001/lib/perl5db.pl Mon Jul 01 17:00:08 1996
3485 ***************
3486 *** 22,28 ****
3487 $rcfile=".perldb";
3488 }
3489 elsif (-e "con") {
3490 ! $console = "con";
3491 $rcfile="perldb.ini";
3492 }
3493 else {
3494 --- 22,28 ----
3495 $rcfile=".perldb";
3496 }
3497 elsif (-e "con") {
3498 ! $console = "";
3499 $rcfile="perldb.ini";
3500 }
3501 else {
3502
3503*** MS-Windows 95: Alt-f6 does not get through to Emacs.
3504
3505This character seems to be trapped by the kernel in Windows 95.
3506You can enter M-f6 by typing ESC f6.
3507
3508*** MS-Windows 95/98/ME: subprocesses do not terminate properly.
3509
3510This is a limitation of the Operating System, and can cause problems
3511when shutting down Windows. Ensure that all subprocesses are exited
3512cleanly before exiting Emacs. For more details, see the FAQ at
3513http://www.gnu.org/software/emacs/windows/.
3514
3515*** MS-Windows 95/98/ME: crashes when Emacs invokes non-existent programs.
3516
3517When a program you are trying to run is not found on the PATH,
3518Windows might respond by crashing or locking up your system. In
3519particular, this has been reported when trying to compile a Java
3520program in JDEE when javac.exe is installed, but not on the system
3521PATH.
3522
9dc15871 3523** MS-DOS
a933dad1 3524
9dc15871 3525*** When compiling with DJGPP on MS-Windows NT, "config msdos" fails.
a933dad1 3526
9dc15871
EZ
3527If the error message is "VDM has been already loaded", this is because
3528Windows has a program called `redir.exe' that is incompatible with a
3529program by the same name supplied with DJGPP, which is used by
3530config.bat. To resolve this, move the DJGPP's `bin' subdirectory to
3531the front of your PATH environment variable.
a933dad1 3532
9dc15871
EZ
3533*** When compiling with DJGPP on MS-Windows 95, Make fails for some targets
3534like make-docfile.
a933dad1 3535
9dc15871
EZ
3536This can happen if long file name support (the setting of environment
3537variable LFN) when Emacs distribution was unpacked and during
3538compilation are not the same. See the MSDOG section of INSTALL for
3539the explanation of how to avoid this problem.
a933dad1 3540
9dc15871 3541*** Emacs compiled with DJGPP complains at startup:
a933dad1 3542
9dc15871 3543 "Wrong type of argument: internal-facep, msdos-menu-active-face"
a933dad1 3544
9dc15871
EZ
3545This can happen if you define an environment variable `TERM'. Emacs
3546on MSDOS uses an internal terminal emulator which is disabled if the
3547value of `TERM' is anything but the string "internal". Emacs then
3548works as if its terminal were a dumb glass teletype that doesn't
3549support faces. To work around this, arrange for `TERM' to be
3550undefined when Emacs runs. The best way to do that is to add an
3551[emacs] section to the DJGPP.ENV file which defines an empty value for
3552`TERM'; this way, only Emacs gets the empty value, while the rest of
3553your system works as before.
a933dad1 3554
9dc15871 3555*** MS-DOS: Emacs crashes at startup.
a933dad1 3556
9dc15871
EZ
3557Some users report that Emacs 19.29 requires dpmi memory management,
3558and crashes on startup if the system does not have it. We don't yet
3559know why this happens--perhaps these machines don't have enough real
3560memory, or perhaps something is wrong in Emacs or the compiler.
3561However, arranging to use dpmi support is a workaround.
a933dad1 3562
9dc15871
EZ
3563You can find out if you have a dpmi host by running go32 without
3564arguments; it will tell you if it uses dpmi memory. For more
3565information about dpmi memory, consult the djgpp FAQ. (djgpp
3566is the GNU C compiler as packaged for MSDOS.)
a933dad1 3567
9dc15871
EZ
3568Compiling Emacs under MSDOS is extremely sensitive for proper memory
3569configuration. If you experience problems during compilation, consider
3570removing some or all memory resident programs (notably disk caches)
3571and make sure that your memory managers are properly configured. See
3572the djgpp faq for configuration hints.
a933dad1 3573
9dc15871
EZ
3574*** Emacs compiled with DJGPP for MS-DOS/MS-Windows cannot access files
3575in the directory with the special name `dev' under the root of any
3576drive, e.g. `c:/dev'.
a933dad1 3577
9dc15871
EZ
3578This is an unfortunate side-effect of the support for Unix-style
3579device names such as /dev/null in the DJGPP runtime library. A
3580work-around is to rename the problem directory to another name.
a933dad1 3581
9dc15871 3582*** MS-DOS+DJGPP: Problems on MS-DOG if DJGPP v2.0 is used to compile Emacs.
a933dad1 3583
9dc15871 3584There are two DJGPP library bugs which cause problems:
a933dad1 3585
9dc15871
EZ
3586 * Running `shell-command' (or `compile', or `grep') you get
3587 `Searching for program: permission denied (EACCES), c:/command.com';
3588 * After you shell to DOS, Ctrl-Break kills Emacs.
a933dad1 3589
9dc15871
EZ
3590To work around these bugs, you can use two files in the msdos
3591subdirectory: `is_exec.c' and `sigaction.c'. Compile them and link
3592them into the Emacs executable `temacs'; then they will replace the
3593incorrect library functions.
a933dad1 3594
9dc15871
EZ
3595*** MS-DOS: Emacs compiled for MSDOS cannot find some Lisp files, or other
3596run-time support files, when long filename support is enabled.
a933dad1 3597
9dc15871
EZ
3598Usually, this problem will manifest itself when Emacs exits
3599immediately after flashing the startup screen, because it cannot find
3600the Lisp files it needs to load at startup. Redirect Emacs stdout
3601and stderr to a file to see the error message printed by Emacs.
a933dad1 3602
9dc15871
EZ
3603Another manifestation of this problem is that Emacs is unable to load
3604the support for editing program sources in languages such as C and
3605Lisp.
a933dad1 3606
9dc15871
EZ
3607This can happen if the Emacs distribution was unzipped without LFN
3608support, thus causing long filenames to be truncated to the first 6
3609characters and a numeric tail that Windows 95 normally attaches to it.
3610You should unzip the files again with a utility that supports long
3611filenames (such as djtar from DJGPP or InfoZip's UnZip program
3612compiled with DJGPP v2). The MSDOG section of the file INSTALL
3613explains this issue in more detail.
a933dad1 3614
9dc15871
EZ
3615Another possible reason for such failures is that Emacs compiled for
3616MSDOS is used on Windows NT, where long file names are not supported
3617by this version of Emacs, but the distribution was unpacked by an
3618unzip program that preserved the long file names instead of truncating
3619them to DOS 8+3 limits. To be useful on NT, the MSDOS port of Emacs
3620must be unzipped by a DOS utility, so that long file names are
3621properly truncated.
a933dad1 3622
9dc15871 3623** Archaic window managers and toolkits
a933dad1 3624
9dc15871 3625*** OpenLook: Under OpenLook, the Emacs window disappears when you type M-q.
a933dad1 3626
9dc15871
EZ
3627Some versions of the Open Look window manager interpret M-q as a quit
3628command for whatever window you are typing at. If you want to use
3629Emacs with that window manager, you should try to configure the window
3630manager to use some other command. You can disable the
3631shortcut keys entirely by adding this line to ~/.OWdefaults:
a933dad1 3632
9dc15871 3633 OpenWindows.WindowMenuAccelerators: False
a933dad1 3634
9dc15871 3635**** twm: A position you specified in .Xdefaults is ignored, using twm.
a933dad1 3636
9dc15871
EZ
3637twm normally ignores "program-specified" positions.
3638You can tell it to obey them with this command in your `.twmrc' file:
a933dad1 3639
9dc15871 3640 UsePPosition "on" #allow clients to request a position
a933dad1 3641
9dc15871 3642** Bugs related to old DEC hardware
a933dad1 3643
9dc15871 3644*** The Compose key on a DEC keyboard does not work as Meta key.
a933dad1 3645
9dc15871 3646This shell command should fix it:
a933dad1 3647
9dc15871 3648 xmodmap -e 'keycode 0xb1 = Meta_L'
a933dad1 3649
9dc15871
EZ
3650*** Keyboard input gets confused after a beep when using a DECserver
3651as a concentrator.
a933dad1 3652
9dc15871
EZ
3653This problem seems to be a matter of configuring the DECserver to use
36547 bit characters rather than 8 bit characters.
a933dad1 3655
9dc15871 3656* Build problems on legacy systems
a933dad1 3657
9dc15871 3658** BSD/386 1.0: --with-x-toolkit option configures wrong.
a933dad1 3659
9dc15871
EZ
3660This problem is due to bugs in the shell in version 1.0 of BSD/386.
3661The workaround is to edit the configure file to use some other shell,
3662such as bash.
a933dad1 3663
9dc15871
EZ
3664** Digital Unix 4.0: Emacs fails to build, giving error message
3665 Invalid dimension for the charset-ID 160
a933dad1 3666
9dc15871
EZ
3667This is due to a bug or an installation problem in GCC 2.8.0.
3668Installing a more recent version of GCC fixes the problem.
a933dad1 3669
9dc15871 3670** Digital Unix 4.0: Failure in unexec while dumping emacs.
a933dad1 3671
9dc15871 3672This problem manifests itself as an error message
a933dad1 3673
9dc15871 3674 unexec: Bad address, writing data section to ...
a933dad1 3675
9dc15871
EZ
3676The user suspects that this happened because his X libraries
3677were built for an older system version,
a933dad1 3678
9dc15871 3679 ./configure --x-includes=/usr/include --x-libraries=/usr/shlib
a933dad1 3680
9dc15871 3681made the problem go away.
a933dad1 3682
9dc15871 3683** Sunos 4.1.1: there are errors compiling sysdep.c.
a933dad1 3684
9dc15871 3685If you get errors such as
a933dad1 3686
9dc15871
EZ
3687 "sysdep.c", line 2017: undefined structure or union
3688 "sysdep.c", line 2017: undefined structure or union
3689 "sysdep.c", line 2019: nodename undefined
a933dad1 3690
9dc15871
EZ
3691This can result from defining LD_LIBRARY_PATH. It is very tricky
3692to use that environment variable with Emacs. The Emacs configure
3693script links many test programs with the system libraries; you must
3694make sure that the libraries available to configure are the same
3695ones available when you build Emacs.
a933dad1 3696
9dc15871 3697** SunOS 4.1.1: You get this error message from GNU ld:
a933dad1 3698
9dc15871 3699 /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment
a933dad1 3700
9dc15871 3701The problem is in the Sun shared C library, not in GNU ld.
a933dad1 3702
9dc15871 3703The solution is to install Patch-ID# 100267-03 from Sun.
a933dad1 3704
9dc15871 3705** Sunos 4.1: Undefined symbols when linking using --with-x-toolkit.
a933dad1 3706
9dc15871
EZ
3707If you get the undefined symbols _atowc _wcslen, _iswprint, _iswspace,
3708_iswcntrl, _wcscpy, and _wcsncpy, then you need to add -lXwchar after
3709-lXaw in the command that links temacs.
a933dad1 3710
9dc15871
EZ
3711This problem seems to arise only when the international language
3712extensions to X11R5 are installed.
a933dad1 3713
9dc15871 3714** SunOS: Emacs gets error message from linker on Sun.
a933dad1 3715
9dc15871
EZ
3716If the error message says that a symbol such as `f68881_used' or
3717`ffpa_used' or `start_float' is undefined, this probably indicates
3718that you have compiled some libraries, such as the X libraries,
3719with a floating point option other than the default.
a933dad1 3720
9dc15871
EZ
3721It's not terribly hard to make this work with small changes in
3722crt0.c together with linking with Fcrt1.o, Wcrt1.o or Mcrt1.o.
3723However, the easiest approach is to build Xlib with the default
3724floating point option: -fsoft.
a933dad1 3725
9dc15871 3726** SunOS: Undefined symbols _dlopen, _dlsym and/or _dlclose.
a933dad1 3727
9dc15871
EZ
3728If you see undefined symbols _dlopen, _dlsym, or _dlclose when linking
3729with -lX11, compile and link against the file mit/util/misc/dlsym.c in
3730the MIT X11R5 distribution. Alternatively, link temacs using shared
3731libraries with s/sunos4shr.h. (This doesn't work if you use the X
3732toolkit.)
a933dad1 3733
9dc15871
EZ
3734If you get the additional error that the linker could not find
3735lib_version.o, try extracting it from X11/usr/lib/X11/libvim.a in
3736X11R4, then use it in the link.
a933dad1 3737
0a4dd4e4
EZ
3738** SunOS4, DGUX 5.4.2: --with-x-toolkit version crashes when used with shared libraries.
3739
3740On some systems, including Sunos 4 and DGUX 5.4.2 and perhaps others,
3741unexec doesn't work properly with the shared library for the X
3742toolkit. You might be able to work around this by using a nonshared
3743libXt.a library. The real fix is to upgrade the various versions of
3744unexec and/or ralloc. We think this has been fixed on Sunos 4
3745and Solaris in version 19.29.
3746
3747** HPUX 10.20: Emacs crashes during dumping on the HPPA machine.
3748
3749This seems to be due to a GCC bug; it is fixed in GCC 2.8.1.
3750
9dc15871 3751** VMS: Compilation errors on VMS.
a933dad1 3752
9dc15871
EZ
3753You will get warnings when compiling on VMS because there are
3754variable names longer than 32 (or whatever it is) characters.
3755This is not an error. Ignore it.
a933dad1 3756
9dc15871
EZ
3757VAX C does not support #if defined(foo). Uses of this construct
3758were removed, but some may have crept back in. They must be rewritten.
a933dad1 3759
9dc15871
EZ
3760There is a bug in the C compiler which fails to sign extend characters
3761in conditional expressions. The bug is:
3762 char c = -1, d = 1;
3763 int i;
a933dad1 3764
9dc15871
EZ
3765 i = d ? c : d;
3766The result is i == 255; the fix is to typecast the char in the
3767conditional expression as an (int). Known occurrences of such
3768constructs in Emacs have been fixed.
a933dad1 3769
9dc15871 3770** Vax C compiler bugs affecting Emacs.
a933dad1
DL
3771
3772You may get one of these problems compiling Emacs:
3773
3774 foo.c line nnn: compiler error: no table entry for op STASG
3775 foo.c: fatal error in /lib/ccom
3776
3777These are due to bugs in the C compiler; the code is valid C.
3778Unfortunately, the bugs are unpredictable: the same construct
3779may compile properly or trigger one of these bugs, depending
3780on what else is in the source file being compiled. Even changes
3781in header files that should not affect the file being compiled
3782can affect whether the bug happens. In addition, sometimes files
3783that compile correctly on one machine get this bug on another machine.
3784
3785As a result, it is hard for me to make sure this bug will not affect
3786you. I have attempted to find and alter these constructs, but more
3787can always appear. However, I can tell you how to deal with it if it
3788should happen. The bug comes from having an indexed reference to an
3789array of Lisp_Objects, as an argument in a function call:
3790 Lisp_Object *args;
3791 ...
3792 ... foo (5, args[i], ...)...
3793putting the argument into a temporary variable first, as in
3794 Lisp_Object *args;
3795 Lisp_Object tem;
3796 ...
3797 tem = args[i];
3798 ... foo (r, tem, ...)...
3799causes the problem to go away.
3800The `contents' field of a Lisp vector is an array of Lisp_Objects,
3801so you may see the problem happening with indexed references to that.
3802
9dc15871 3803** 68000 C compiler problems
a933dad1
DL
3804
3805Various 68000 compilers have different problems.
3806These are some that have been observed.
3807
9dc15871 3808*** Using value of assignment expression on union type loses.
a933dad1
DL
3809This means that x = y = z; or foo (x = z); does not work
3810if x is of type Lisp_Object.
3811
9dc15871 3812*** "cannot reclaim" error.
a933dad1
DL
3813
3814This means that an expression is too complicated. You get the correct
3815line number in the error message. The code must be rewritten with
3816simpler expressions.
3817
9dc15871 3818*** XCONS, XSTRING, etc macros produce incorrect code.
a933dad1
DL
3819
3820If temacs fails to run at all, this may be the cause.
3821Compile this test program and look at the assembler code:
3822
3823struct foo { char x; unsigned int y : 24; };
3824
3825lose (arg)
3826 struct foo arg;
3827{
3828 test ((int *) arg.y);
3829}
3830
3831If the code is incorrect, your compiler has this problem.
3832In the XCONS, etc., macros in lisp.h you must replace (a).u.val with
3833((a).u.val + coercedummy) where coercedummy is declared as int.
3834
3835This problem will not happen if the m-...h file for your type
3836of machine defines NO_UNION_TYPE. That is the recommended setting now.
3837
9dc15871 3838*** C compilers lose on returning unions.
a933dad1
DL
3839
3840I hear that some C compilers cannot handle returning a union type.
3841Most of the functions in GNU Emacs return type Lisp_Object, which is
3842defined as a union on some rare architectures.
3843
3844This problem will not happen if the m-...h file for your type
3845of machine defines NO_UNION_TYPE.
3846
53854552 3847\f
5b87ad55 3848This file is part of GNU Emacs.
fe6b4873 3849
5b87ad55
GM
3850GNU Emacs is free software; you can redistribute it and/or modify
3851it under the terms of the GNU General Public License as published by
3852the Free Software Foundation; either version 2, or (at your option)
3853any later version.
fe6b4873 3854
5b87ad55
GM
3855GNU Emacs is distributed in the hope that it will be useful,
3856but WITHOUT ANY WARRANTY; without even the implied warranty of
3857MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3858GNU General Public License for more details.
3859
3860You should have received a copy of the GNU General Public License
3861along with GNU Emacs; see the file COPYING. If not, write to the
3862Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
3863Boston, MA 02110-1301, USA.
3864
3865\f
53854552
EZ
3866Local variables:
3867mode: outline
3868paragraph-separate: "[ \f]*$"
3869end:
ab5796a9
MB
3870
3871arch-tag: 49fc0d95-88cb-4715-b21c-f27fb5a4764a