From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Nelson H. F. Beebe" Newsgroups: gmane.emacs.bugs Subject: bug#28882: emacs-26.0.90 build feedback Date: Wed, 18 Oct 2017 11:58:11 -0600 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1508349559 7594 195.159.176.226 (18 Oct 2017 17:59:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Oct 2017 17:59:19 +0000 (UTC) Cc: beebe@math.utah.edu To: 28882@debbugs.gnu.org, Noam Postavsky , Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 18 19:59:12 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4scZ-0000uy-QP for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Oct 2017 19:59:12 +0200 Original-Received: from localhost ([::1]:45863 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4scf-0003Gx-Iy for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 Oct 2017 13:59:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4scV-0003GT-Dj for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 13:59:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4scQ-00080e-LO for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 13:59:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39898) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4scQ-00080Z-Gi for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 13:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e4scQ-0001fK-9u for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2017 13:59:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: "Nelson H. F. Beebe" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Oct 2017 17:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28882 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28882-submit@debbugs.gnu.org id=B28882.15083495126351 (code B ref 28882); Wed, 18 Oct 2017 17:59:02 +0000 Original-Received: (at 28882) by debbugs.gnu.org; 18 Oct 2017 17:58:32 +0000 Original-Received: from localhost ([127.0.0.1]:48578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4sbw-0001eN-6M for submit@debbugs.gnu.org; Wed, 18 Oct 2017 13:58:32 -0400 Original-Received: from mail.math.utah.edu ([155.101.98.135]:63721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4sbt-0001du-A2 for 28882@debbugs.gnu.org; Wed, 18 Oct 2017 13:58:29 -0400 Original-Received: from gamma.math.utah.edu (gamma.math.utah.edu [155.101.96.20]) by mail.math.utah.edu (8.14.8/8.14.8) with ESMTP id v9IHwCr1027999; Wed, 18 Oct 2017 11:58:17 -0600 (MDT) Original-Received: from gamma.math.utah.edu (localhost [127.0.0.1]) by gamma.math.utah.edu (8.15.1/8.15.1) with ESMTP id v9IHwB9M036521; Wed, 18 Oct 2017 11:58:11 -0600 Original-Received: (from beebe@localhost) by gamma.math.utah.edu (8.15.1/8.15.1/Submit) id v9IHwBIg036517; Wed, 18 Oct 2017 11:58:11 -0600 X-US-Mail: "Department of Mathematics, 110 LCB, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT 84112-0090, USA" X-Telephone: +1 801 581 5254 X-FAX: +1 801 581 4148 X-URL: http://www.math.utah.edu/~beebe X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.8 (mail.math.utah.edu [155.101.98.135]); Wed, 18 Oct 2017 11:58:20 -0600 (MDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org 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 Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138682 Archived-At: Andreas Schwab asks about my build attempts for emacs-26.0.90 on HardenedBSD: >> Does it help to add -no-pie to LDFLAGS? For HardenedBSD 11.1-STABLE-HBSD (FreeBSD 11.1-STABLE-HBSD #0), that worked: rm src/emacs src/temacs gmake LDFLAGS=-no-pie I installed that version. I then tried the same on HardenedBSD 12.0-CURRENT (FreeBSD 12.0-CURRENT #0). It complained that the -no-pie option was unrecognized, so I retried with --no-pie: that was accepted, but there was still a segmentation fault at dump time. Next, based on the advice for NetBSD in etc/PROBLEMS about kernel parameters that control address-space layout randomization (ASLR), I looked to see what HardenedBSD had: # sysctl -a | grep -i aslr kern.features.hbsd_aslr: 1 options PAX_ASLR hardening.pax.aslr.status: 2 With those defaults, I get failure like this in the emacs build: Dumping under the name emacs 11323200 of 33554432 static heap bytes used gmake[1]: *** [Makefile:738: bootstrap-emacs] Segmentation fault In another window, as root, I then ran # sysctl kern.features.hbsd_aslr:0 sysctl: oid 'kern.features.hbsd_aslr' is read only # sysctl hardening.pax.aslr.status:0 hardening.pax.aslr.status: 2 -> 0 Then, back in the emacs build window, I ran % \rm src/emacs src/temacs % gmake ... ./temacs --batch --load loadup bootstrap Loading loadup.el (source)... Using load-path (/local/build/cc/emacs-26.0.90/lisp /local/build/cc/emacs-26.0.90/lisp/emacs-lisp /local/build/cc/emacs-26.0.90/lisp/language /local/build/cc/emacs-26.0.90/lisp/international /local/build/cc/emacs-26.0.90/lisp/textmodes /local/build/cc/emacs-26.0.90/lisp/vc) Loading emacs-lisp/byte-run... Loading emacs-lisp/backquote... ... Finding pointers to doc strings... Finding pointers to doc strings...done Dumping under the name emacs 11323200 of 33554432 static heap bytes used 96055 pure bytes used mv -f emacs bootstrap-emacs gmake -C ../lisp compile-first EMACS="../src/bootstrap-emacs" gmake[2]: Entering directory '/local/build/cc/emacs-26.0.90/lisp' gmake[2]: Nothing to be done for 'compile-first'. gmake[2]: Leaving directory '/local/build/cc/emacs-26.0.90/lisp' gmake -C ../admin/unidata all EMACS="../../src/bootstrap-emacs" gmake[2]: Entering directory '/local/build/cc/emacs-26.0.90/admin/unidata' ELC uvs.elc elf_load_section: truncated ELF file gmake[2]: *** [Makefile:72: uvs.elc] Abort trap If I try to run the dumped emacs, I get % src/bootstrap-emacs --version elf_load_section: truncated ELF file Abort Thus, disabling the ASLR feature in HardenedBSD 12.0 DOES let temacs run to completion, but the result dumped emacs does not run correctly. As I final experiment, I ported over the 11.1 emacs installation directories to 12.0, and after installing some missing packages, and creating some symlinks to missing older library versions, I was able to get a usable emacs-26.0.90 on 12.0. However, that has to be viewed as a temporary stopgap. The number of dependent shared libraries is frighteningly large % ldd $B/nemacs |wc -l 96 so the import from 11.1 to 12.0 is fragile, and likely to break with future system updates on the 12.0 system. ------------------------------------------------------------------------------- - 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/ - -------------------------------------------------------------------------------