From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#47558: 28.0.50; dlopen 'image not found' gccemacs native-lisp macos Date: Tue, 06 Apr 2021 19:26:16 +0000 Message-ID: References: <83y2dzev4b.fsf@gnu.org> <83mtufe9ke.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7404"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: bryan.m.obrien@gmail.com, Eli Zaretskii , 47558@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 06 21:27:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTrM1-0001oI-AI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Apr 2021 21:27:13 +0200 Original-Received: from localhost ([::1]:48380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTrM0-0004SO-BC for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Apr 2021 15:27:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTrLr-0004SF-3X for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2021 15:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTrLq-00072J-4R for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2021 15:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTrLq-0002Dd-0h for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2021 15:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 06 Apr 2021 19:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47558 X-GNU-PR-Package: emacs Original-Received: via spool by 47558-submit@debbugs.gnu.org id=B47558.16177371828478 (code B ref 47558); Tue, 06 Apr 2021 19:27:01 +0000 Original-Received: (at 47558) by debbugs.gnu.org; 6 Apr 2021 19:26:22 +0000 Original-Received: from localhost ([127.0.0.1]:41802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTrLB-0002Ce-NX for submit@debbugs.gnu.org; Tue, 06 Apr 2021 15:26:22 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:61350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTrL8-0002CS-1l for 47558@debbugs.gnu.org; Tue, 06 Apr 2021 15:26:20 -0400 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 136JQG4v011997 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 6 Apr 2021 19:26:16 GMT In-Reply-To: (Alan Third's message of "Tue, 6 Apr 2021 18:36:15 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203649 Archived-At: --=-=-= Content-Type: text/plain Alan Third writes: > On Tue, Apr 06, 2021 at 02:51:46PM +0000, Andrea Corallo wrote: >> Alan Third writes: >> >> > On Tue, Apr 06, 2021 at 07:56:46AM +0000, Andrea Corallo wrote: >> >> Alan Third writes: >> >> > emacs: >> >> > dlopen(/Users/alan/src/emacs/native/nextstep/Emacs.app/Contents/MacOS/../native-lisp/28.0.50-24e3df15/window-0d1b8b93-513ac8ca.eln, >> >> > 1): image not found >> >> >> >> Hi Alan, >> >> >> >> Okay the value of ELN_DESTDIR is used during dump to inform Emacs where >> >> the eln will be located (src/Makefile.in:570) so redumping is necessary. >> >> Have you tried redumping or rebuilding from scratch? >> > >> > Yes, I've tried 'make bootstrap' to no avail. >> >> could you share the output of like "make bootstrap V=1"? (go parallel if >> you like) > > Attached. Okay the log looks good AFAICT. We are suggesting the eln to go in: /Users/alan/src/emacs/native/nextstep/Emacs.app/Contents/MacOS/bin/ and the eln in: /Users/alan/src/emacs/native/nextstep/Emacs.app/Contents/Resources/ For each compilation unit being dumped we modify the filename in a pair in the form of (rel-filename-from-install-bin . rel-filename-from-local-bin) in loadup.el:467 so we'll be able to locate those compilation units when resurecting. So either we compute wrongly the 'rel-filename-from-install-bin' there or something goes wrong in pdumper.c:5277 (where we use it to to identify if Emacs was installed or not). On this subject I just realized that there we used concat in place of `expand-file-name' and fixed that with 6568198213. If this does not help I suggest we apply the attached and re-bootstrap to see if the 'rel-filename-from-install-bin' we are constructing is correct. Thanks! Andrea --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=loadup.patch diff --git a/lisp/loadup.el b/lisp/loadup.el index 650288f9f8..3331445ff8 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -475,15 +475,17 @@ eln-dest-dir))) (native-comp-unit-set-file cu - (cons - ;; Relative filename from the installed binary. - (file-relative-name (expand-file-name - (file-name-nondirectory - file) - eln-dest-dir-eff) - bin-dest-dir) - ;; Relative filename from the built uninstalled binary. - (file-relative-name file invocation-directory))))) + (let ((tmp (cons + ;; Relative filename from the installed binary. + (file-relative-name (expand-file-name + (file-name-nondirectory + file) + eln-dest-dir-eff) + bin-dest-dir) + ;; Relative filename from the built uninstalled binary. + (file-relative-name file invocation-directory)))) + (print tmp) + tmp)))) h)))) (when (hash-table-p purify-flag) --=-=-=--