* etc/PROBLEMS: Update Cygwin GCC information. (Bug#6458)
[bpt/emacs.git] / etc / PROBLEMS
index 58ed9fe..7a2cc56 100644 (file)
@@ -1,7 +1,7 @@
 Known Problems with GNU Emacs
 
 Copyright (C) 1987, 1988, 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-  2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+  2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
   Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
@@ -167,6 +167,17 @@ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=239344
 
 * Crash bugs
 
+** Emacs crashes when running in a terminal, if compiled with GCC 4.5.0
+This version of GCC is buggy: see
+
+  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6031
+  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43904
+
+You can work around this error in gcc-4.5 by omitting sibling call
+optimization.  To do this, configure Emacs with
+
+ CFLAGS="-g -O2 -fno-optimize-sibling-calls" ./configure
+
 ** Emacs crashes in x-popup-dialog.
 
 This can happen if the dialog widget cannot find the font it wants to
@@ -244,28 +255,6 @@ frame on another X display, then a Gtk+ error happens in the emacs
 server that results in an endless loop.  This is not fixed in any known
 Gtk+ version (2.14.4 being current).
 
-** Emacs compiled with Gtk+ crashes on startup on Cygwin.
-
-A typical error message is
-  ***MEMORY-ERROR***: emacs[5172]: GSlice: failed to allocate 504 bytes
-  (alignment: 512): Function not implemented
-
-Emacs supplies its own malloc, but glib (part of Gtk+) calls memalign and on
-Cygwin, that becomes the Cygwin supplied memalign.  As malloc is not the
-Cygwin malloc, the Cygwin memalign always returns ENOSYS.
-
-One workaround is to set G_SLICE=always-malloc before starting emacs.
-For example, in bash,
-
-  G_SLICE=always-malloc emacs
-
-or put
-
-  export G_SLICE=always-malloc
-
-in one of the bash startup files.  This also has to be done before
-building emacs on Cygwin with Gtk+.
-
 * General runtime problems
 
 ** Lisp problems
@@ -1110,6 +1099,15 @@ into Meta.  This is because of the great importance of Meta in Emacs.
 
 ** Window-manager and toolkit-related problems
 
+*** Metacity: Resizing Emacs or ALT-Tab causes X to be unresponsive.
+
+This happens sometimes when using Metacity.  Resizing Emacs or ALT-Tab:bing
+makes the system unresponsive to the mouse or the keyboard.  Killing Emacs
+or shifting out from X11 and back again usually cures it (i.e. Ctrl-Alt-F1 
+and then Alt-F7).  A bug for it is here:
+https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/231034.
+Note that a permanent fix seems to be to disable "assistive technologies".
+
 *** Gnome: Emacs receives input directly from the keyboard, bypassing XIM.
 
 This seems to happen when gnome-settings-daemon version 2.12 or later
@@ -1431,6 +1429,21 @@ single copies.  You do not need any other drivers or options.
 
 * Runtime problems on character terminals
 
+** The meta key does not work on xterm.
+Typing M-x rings the terminal bell, and inserts a string like ";120~".
+For recent xterm versions (>= 216), Emacs uses xterm's modifyOtherKeys
+feature to generate strings for key combinations that are not
+otherwise usable.  One circumstance in which this can cause problems
+is if you have specified the X resource
+
+  xterm*VT100.Translations
+
+to contain translations that use the meta key.  Then xterm will not
+use meta in modified function-keys, which confuses Emacs.  To fix
+this, you can remove the X resource or put this in your init file:
+
+  (xterm-remove-modify-other-keys)
+
 ** Emacs spontaneously displays "I-search: " at the bottom of the screen.
 
 This means that Control-S/Control-Q (XON/XOFF) "flow control" is being
@@ -2464,17 +2477,30 @@ files are installed. Then use:
 
 (using the location of the 32-bit X libraries on your system).
 
-*** Building the Cygwin port for MS-Windows can fail with some GCC versions
-
-Building Emacs 22 with Cygwin builds of GCC 3.4.4-1 and 3.4.4-2 is
-reported to either fail or cause Emacs to segfault at run time.  In
-addition, the Cygwin GCC 3.4.4-2 has problems with generating debug
-info.  Cygwin users are advised not to use these versions of GCC for
-compiling Emacs.  GCC versions 4.0.3, 4.0.4, 4.1.1, and 4.1.2
-reportedly build a working Cygwin binary of Emacs, so we recommend
-these GCC versions.  Note that these versions of GCC, 4.0.3, 4.0.4,
-4.1.1, and 4.1.2, are currently the _only_ versions known to succeed
-in building Emacs (as of v22.1).
+*** Building Emacs for Cygwin can fail with GCC 3
+
+As of Emacs 22.1, there have been stability problems with Cygwin
+builds of Emacs using GCC 3.  Cygwin users are advised to use GCC 4.
+
+*** Building the native MS-Windows port fails due to unresolved externals
+
+The linker error messages look like this:
+
+ oo-spd/i386/ctags.o:ctags.c:(.text+0x156e): undefined reference to `_imp__re_set_syntax'
+ collect2: ld returned 1 exit status
+
+This happens because GCC finds an incompatible header regex.h
+somewhere on the include path, before the version of regex.h supplied
+with Emacs.  One such incompatible version of regex.h is part of the
+GnuWin32 Regex package.
+
+The solution is to remove the incompatible regex.h from the include
+path, when compiling Emacs.  Alternatively, re-run the configure.bat
+script with the "-isystem C:/GnuWin32/include" switch (adapt for your
+system's place where you keep the GnuWin32 include files) -- this will
+cause the compiler to search headers in the directories specified by
+the Emacs Makefile _before_ it looks in the GnuWin32 include
+directories.
 
 *** Building the native MS-Windows port with Cygwin GCC can fail.