all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Error 255 while preparing to dump
@ 2020-09-02 16:31 Camden Narzt
  2020-09-03 13:54 ` Robert Pluim
  0 siblings, 1 reply; 3+ messages in thread
From: Camden Narzt @ 2020-09-02 16:31 UTC (permalink / raw)
  To: emacs-devel

Hi all, I’m trying (https://github.com/Homebrew/homebrew-core/pull/59448) to update the homebrew (on macOS) package manager’s emacs formula to 27.1, and am encountering some difficulty.

Homebrew has rules that binary files produced as part of the build may not refer to the build environment (snippet from their CI):

=> FAILED
Error: 1 problem in 1 formula detected
emacs:
  * Files were found with references to the Homebrew shims directory.
    The offending files are:
      libexec/emacs/27.1/x86_64-apple-darwin19.5.0/emacs.pdmp


When I examine this file it seems that the pdmp file captures the PATH at the time it is dumped (snippet from my mac):

strings /usr/local/opt/emacs/libexec/emacs/27.1/x86_64-apple-darwin19.6.0/emacs.pdmp | rg -B 13 shims
/sbin
/usr/sbin
/bin
/usr/bin
/usr/local/opt/gnutls/bin
/usr/local/opt/libevent/bin
/usr/local/opt/openssl@1.1/bin
/usr/local/opt/p11-kit/bin
/usr/local/opt/nettle/bin
/usr/local/opt/libtasn1/bin
/usr/local/opt/libidn2/bin
/usr/local/opt/gettext/bin
/usr/local/opt/pkg-config/bin
/usr/local/Homebrew/Library/Homebrew/shims/mac/super

I’m not sure if this is the exec-path variable or PATH or what exactly, but I need to find a way to remove the shims dir at dump time. I read this (https://www.gnu.org/software/emacs/manual/html_node/elisp/Building-Emacs.html) and it seems like I need to add a site-load.el file to lisp before building that will remove the one directory from the PATH or exec-path or whatever that data refers to. However when I try adding a site-load.el file with the following contents, I get the error that follows.

The elisp:

(require 'seq)
(setq exec-path (seq-filter (lambda (haystack) (not (string-match-p (regexp-quote "Homebrew/shims") haystack))) exec-path))
(setenv "PATH" (string-join (seq-filter (lambda (haystack) (not (string-match-p (regexp-quote "Homebrew/shims") haystack))) (split-string (getenv "PATH") ":")) ":"))

The error:

Loading site-load.el (source)...
(require seq) while preparing to dump
make[1]: *** [emacs.pdmp] Error 255
make: *** [src] Error 2

Can anyone who is more knowledgeable about the new portable dumper system please steer me in the right direction?


Cheers,


Camden Narzt


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-03 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02 16:31 Error 255 while preparing to dump Camden Narzt
2020-09-03 13:54 ` Robert Pluim
2020-09-03 17:34   ` Camden Narzt

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.