[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
segfault on Solaris 9 if -z nocombreloc not used
From: |
Dennis McRitchie |
Subject: |
segfault on Solaris 9 if -z nocombreloc not used |
Date: |
Fri, 27 Feb 2004 10:46:34 -0500 |
Problem: Building emacs on Solaris 9 with GNU ld v2.14 gives segfault in
XtInitializeWidgetClass() when starting up in X mode.
Solution: Build emacs with "-z nocombreloc" added to LDFLAGS.
Description:
This problem is related to the threads called "emacs-19.34 segfauls when
built with Xfree 4.3.0 (glibc 2.3.x,gcc3.2)" and "SOLVED: Emacs (all
versions) dumps core when built againstXFree86 4.3".
I built emacs 21.3 on Solaris 9 using all recent GNU tools (gcc, binutils,
etc.). I was therefore using the GNU ld v2.14 which apparently defaults to
"-z combreloc".
When subsequently starting up emacs in X mode, I would immediately get a
segfault in XtInitializeWidgetClass(). After reading the above threads, I
rebuilt with "-z nocombreloc" and emacs now runs fine in X mode.
I see that you have patched this for GNU/Linux and FreeBSD, but not for
Solaris. Hence my segfault.
Given that this is a very difficult problem to track down, I'd like to
suggest that a test be made for whether the GNU ld or the Solaris native ld
is being used, and to enforce "-z nocombreloc" if GNU ld is being used.
Native Solaris ld v5.9-1.377 apparently defaults to combreloc turned off;
and while it accepts a "-z combreloc" argument (to turn it on), it will give
a fatal error if "-z nocombreloc" is specified. So a test for which ld is
being used is necessary.
Thanks,
Dennis
Dennis McRitchie
Research & Academic Applications Support (RAAS)
Academic Services Department
Office of Information Technology
Princeton University
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- segfault on Solaris 9 if -z nocombreloc not used,
Dennis McRitchie <=