all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Nelson H. F. Beebe" <beebe@math.utah.edu>
To: 28882@debbugs.gnu.org, Noam Postavsky <npostavs@users.sourceforge.net>
Cc: beebe@math.utah.edu
Subject: bug#28882: emacs-26.0.90 build feedback
Date: Wed, 18 Oct 2017 08:17:14 -0600	[thread overview]
Message-ID: <CMM.0.95.0.1508336234.beebe@gamma.math.utah.edu> (raw)
In-Reply-To: <CMM.0.95.0.1508283077.beebe@gamma.math.utah.edu>

The emacs-26.0.90 etc/PROBLEMS file suggests another approach to work
around kernel memory layout randomizations for Red Hat systems.
Curiously, I had no difficulty building emacs-26.0.90 on CentOS 6 and
7 on x86-64 systems, and CentOS 5 IA-64 (Itanium), but on CentOS 5 x86
and x86-64, I get

	Dumping under the name emacs
	**************************************************
	Warning: Your system has a gap between BSS and the
	heap (8467071 bytes).  This usually means that exec-shield
	or something similar is in effect.  The dump may
	fail because of this.  See the section about
	exec-shield in etc/PROBLEMS for more information.
	**************************************************
	make[1]: *** [bootstrap-emacs] Segmentation fault

Today, as root, I ran 

	# cat /proc/sys/kernel/exec-shield
	1

	# echo 0 > /proc/sys/kernel/exec-shield

	# cat /proc/sys/kernel/exec-shield
	0

and then as an unprivileged user, restarted the make.  Unlike on
Alpine Linux, the kernel symbol-value change had no effect: the build
still gets a segmentation fault.

I then tried

	% ./src/temacs
	Loading loadup.el (source)...
	Using load-path (/local/build/cc/emacs-26.0.90/lisp)
	Loading emacs-lisp/byte-run...
	...
	Finding pointers to doc strings...done
	Pure-hashed: 15477 strings, 4055 vectors, 40214 conses, 3919 bytecodes, 175 others

At that point, a normal emacs X11 window appears on my screen, so most
of emacs is working.

However, the dumped executable is unusable:

	% ls -l src/*emacs
	-rwxrwxr-x 1 beebe sysstaff 84149492 Oct 18 07:40 src/emacs
	-rwxrwxr-x 1 beebe sysstaff 48352600 Oct 18 07:40 src/temacs

	% file src/emacs
	src/emacs: data

	% ./src/emacs
	src/emacs: Exec format error. Binary file not executable.

	% ldd ./src/emacs
        not a dynamic executable

In CentOS 5 and 6, the exec-shield variable is 1 by default; it does
not exist on CentOS 7.  The latter instead has
/proc/sys/kernel/randomize_va_space set to 2, but a successful dump to
create src/emacs does not require changing that variable.

Next, I tried another suggestion from etc/PROBLEMS:

	% rm src/emacs src/temacs
	$ bash
	$ export PATH=/bin:/usr/bin:/sbin:/usr/sbin
	$ setarch $(uname -m ) -R make

That one succeeded in making a usable src/emacs executable on both x86
and x86-64 CentOS 5 systems, with /usr/local hidden; I then restored
/usr/local and successfully installed emacs-26.0.90 on those servers.

Thus, the build problems for emacs-26.0.90 on CentOS 5 are resolved,
and my count of successes has increased to 138.



-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------





  parent reply	other threads:[~2017-10-18 14:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 23:31 bug#28882: emacs-26.0.90 build feedback Nelson H. F. Beebe
2017-10-18  3:41 ` Noam Postavsky
2017-10-18 13:31 ` Nelson H. F. Beebe
2017-10-18 14:24   ` Andreas Schwab
2020-08-22 16:19   ` Lars Ingebrigtsen
2017-10-18 14:17 ` Nelson H. F. Beebe [this message]
2017-10-18 17:58 ` Nelson H. F. Beebe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CMM.0.95.0.1508336234.beebe@gamma.math.utah.edu \
    --to=beebe@math.utah.edu \
    --cc=28882@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.