Subject: bug#42906: closed (Re: bug#42906: [feature/native-comp] out-of-tree build process broken)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 18 Aug 2020 07:25:03 +0000

Your bug report

#42906: [feature/native-comp] out-of-tree build process broken

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42906: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42906
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#42906: [feature/native-comp] out-of-tree build process broken
From: Andrea Corallo <[email-masked]>
To: [email-masked]
Cc: Ovidiu Toader <[email-masked]>
Date: Tue, 18 Aug 2020 07:24:12 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Ovidiu Toader <[email-masked]> writes:

> On 2020-08-17 11:49 a.m., Andrea Corallo wrote:
>> It would be great if you cold try it out and give a feedback if it works
>> for you.
>
> I confirm that the new version works well with an out-of-tree build.

Great, closing it.

Thanks!

  Andrea

-- 
[email-masked]

Subject: [feature/native-comp] out-of-tree build process broken
From: Ovidiu Toader <[email-masked]>
To: [email-masked]
Date: Mon, 17 Aug 2020 08:16:26 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

When feature/native-comp branch is built out-of-tree, emacs cannot find the .eln files during start.

The patch below fixes this issue. The problem is caused by the fact that during an out-of-tree build, default-directory points inside the build tree while the .eln files are found in the source tree and because of that the subsequent replace-regexp-in-string fails to adjust the file path of the compilation unit.

modified   lisp/loadup.el
@@ -454,7 +454,7 @@
   ;; when installed or if the source directory got moved.  This is set to be
   ;; a pair in the form: (rel-path-from-install-bin . rel-path-from-local-bin).
   (let ((h (make-hash-table :test #'eq))
-        (lisp-src-dir (expand-file-name (concat default-directory "../lisp")))
+        (lisp-src-dir (expand-file-name "lisp" source-directory))
         (bin-dest-dir (cadr (member "--bin-dest" command-line-args)))
         (lisp-dest-dir (cadr (member "--lisp-dest" command-line-args))))
     (mapatoms (lambda (s)