Subject: bug#43532: [feature/native-comp] *.eln file name hashing algorithm doesn't seem to play nice with NATIVE_FULL_AOT and self-contained Emacs.app builds for macOS

From: Andrea Corallo <[email-masked]>
Date: Mon, 21 Sep 2020 10:26:33 +0000

Jim Myhrberg <[email-masked]> writes:

> Here they are:
>
> #define PATH_LOADSEARCH
> "/Users/jimeh/Projects/build-emacs-for-macos/sources/emacs-mirror-emacs-5b41545/nextstep/Emacs.app/Contents/Resources/lisp"
> #define PATH_DUMPLOADSEARCH
> "/Users/jimeh/Projects/build-emacs-for-macos/sources/emacs-mirror-emacs-5b41545/lisp"
>
> "/Users/jimeh/Projects/build-emacs-for-macos/sources/emacs-mirror-emacs-5b41545"
> is obviously my local source/build directory that my build script
> extracts the source tarball to and builds from.

Could you have a run with the attached blind patch?

Thanks

  Andrea
  
diff --git a/src/comp.c b/src/comp.c
index 15d85d30fc..c51d13ade1 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4060,6 +4060,10 @@ DEFUN ("comp-el-to-eln-filename", Fcomp_el_to_eln_filename,
       FOR_EACH_TAIL (loadsearch_list)
 	loadsearch_re_list =
 	  Fcons (Fregexp_quote (XCAR (loadsearch_list)), loadsearch_re_list);
+      loadsearch_re_list =
+	Fcons (
+	  build_string ("^[[:ascii:]]+/Emacs\\.app/Contents/Resources/lisp"),
+	  loadsearch_re_list);
     }
   Lisp_Object loadsearch_res = loadsearch_re_list;
   FOR_EACH_TAIL (loadsearch_res)