[Top][All Lists]

[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):

Error: 1 problem in 1 formula detected
  * Files were found with references to the Homebrew shims directory.
    The offending files are:

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

/usr/local/opt/emacs/libexec/emacs/27.1/x86_64-apple-darwin19.6.0/emacs.pdmp | 
rg -B 13 shims

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 
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?


Camden Narzt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]