[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error 255 while preparing to dump
From: |
Camden Narzt |
Subject: |
Error 255 while preparing to dump |
Date: |
Wed, 2 Sep 2020 10:31:36 -0600 |
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
- Error 255 while preparing to dump,
Camden Narzt <=