From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Brian Parent Newsgroups: gmane.emacs.bugs Subject: Emacs crashes unless using -nw option Date: Thu, 7 Oct 2004 15:31:13 -0700 (PDT) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20041007223113.A439160CE8@localhost.ucsd.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1097188295 9131 80.91.229.6 (7 Oct 2004 22:31:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Oct 2004 22:31:35 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 08 00:31:27 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CFgnH-0007kj-00 for ; Fri, 08 Oct 2004 00:31:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFgu2-0004hm-DU for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Oct 2004 18:38:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CFgu0-0004hJ-RO for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2004 18:38:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CFgtz-0004gm-QA for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2004 18:38:24 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFgtz-0004gW-Mn for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2004 18:38:23 -0400 Original-Received: from [132.239.50.45] (helo=localhost.ucsd.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CFgn7-00041u-DH for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2004 18:31:17 -0400 Original-Received: by localhost.ucsd.edu (Postfix, from userid 103) id A439160CE8; Thu, 7 Oct 2004 15:31:13 -0700 (PDT) Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9229 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9229 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (sparc-sun-solaris2.8, X toolkit) of 2004-10-04 on ratbert.ucsd.edu configured using `configure -prefix=/software/common/gnu' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Emacs crashes with a segmentation fault when run in X windows mode. Emacs runs fine with "-nw" flag. [ratbert] [14:56]: emacs Fatal error (11).Segmentation fault (core dumped) Using gcc 3.3.3 and gnu ld with LDFLAGS="-z nocombreloc" fixes the problem. Using Sun's compilers and link editors fixes the problem. I found a reference to the problem in the newsgroup gnu.emacs.bug: > From: Eric S. Raymond (esr@thyrsus.com) > Subject: Finding things in the PROBLEMS file is too hard (fix included). > Newsgroups: gnu.emacs.bug > Date: 2004-08-16 08:10:03 PST ... > ** Emacs crashes with SIGSEGV in XtInitializeWidgetClass > > It crashes on X, but runs fine when called with option "-nw". > > This has been observed when Emacs is linked with GNU ld but without passing > the -z nocombreloc flag. Emacs normally knows to pass the -z nocombreloc > flag when needed, so if you come across a situation where the flag is > necessary but missing, please report it via M-x report-emacs-bug. > > On platforms such as Solaris, you can also work around this problem by > configuring your compiler to use the native linker instead of GNU ld. where it asked that such problems be reported, hence this note. To configure, I used: (using tcsh) mkdir /software/nonrdist/build/emacs-21.3 cd /software/nonrdist/build/emacs-21.3 setenv LDFLAGS "-R /software/common/lib" /src/gnu/emacs-21.3/configure -prefix=/software/common/gnu The "-R /software/common/lib" setting is needed so temacs knows where to find libpng. By using setenv LDFLAGS "-R /software/common/lib -z nocombreloc" instead of the previous LDFLAGS setting, the problem goes away, Emacs runs with X. The version of X is whatever Sun distributes with Solaris 8. Recent input: M-x b u g ? DEL DEL DEL r e p o ? r SPC TAB RET Recent messages: (emacs) For information about the GNU Project and its goals, type C-h C-p. Making completion list... [2 times] Loading view...done Loading emacsbug...done