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 07:56:46 +0000 Message-ID: References: <83ft09fdc4.fsf@gnu.org> <8335w8fs4b.fsf@gnu.org> <83y2dzev4b.fsf@gnu.org> <83mtufe9ke.fsf@gnu.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32676"; 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 09:57:15 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 1lTgaJ-0008IU-47 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Apr 2021 09:57:15 +0200 Original-Received: from localhost ([::1]:39384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTgaH-0006a6-OB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 06 Apr 2021 03:57:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTga9-0006Zz-K2 for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2021 03:57:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTga5-0001Dw-Uh for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2021 03:57:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lTga5-0006uG-UZ for bug-gnu-emacs@gnu.org; Tue, 06 Apr 2021 03:57:01 -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 07:57: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.161769581626535 (code B ref 47558); Tue, 06 Apr 2021 07:57:01 +0000 Original-Received: (at 47558) by debbugs.gnu.org; 6 Apr 2021 07:56:56 +0000 Original-Received: from localhost ([127.0.0.1]:39120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTgZy-0006tt-03 for submit@debbugs.gnu.org; Tue, 06 Apr 2021 03:56:56 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:60747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lTgZu-0006th-3i for 47558@debbugs.gnu.org; Tue, 06 Apr 2021 03:56:52 -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 1367ukrA004365 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 6 Apr 2021 07:56:47 GMT In-Reply-To: (Alan Third's message of "Mon, 5 Apr 2021 22:14:02 +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:203618 Archived-At: Alan Third writes: > On Mon, Apr 05, 2021 at 08:21:25PM +0000, Andrea Corallo wrote: >> Alan Third writes: >> >> > On Sun, Apr 04, 2021 at 07:10:50AM +0000, Andrea Corallo wrote: >> >> Eli Zaretskii writes: >> >> >> >> >> Date: Sat, 3 Apr 2021 15:01:20 +0100 >> >> >> From: Alan Third >> >> >> Cc: bryan.m.obrien@gmail.com, 47558@debbugs.gnu.org >> >> >> >> >> >> It's not entirely clear to me where the load path is set, is it >> >> >> >> >> >> fixup_eln_load_path (Lisp_Object directory) >> >> >> >> >> >> in comp.c? >> >> > >> >> > I hope Andrea (CC'ed) will be able to answer that. >> >> >> >> Okay, as window is loaded and dumped during the build >> >> `comp-eln-load-path' here doesn't come into play. >> >> >> >> While resurrecting from dump we locate preloaded eln files by filename >> >> (relative to the emacs executable position). Indeed the complication is >> >> that we have to support both uninstalled but also installed builds. >> >> >> >> To do that before dumping we inform Emacs of where will have to search >> >> the eln files if installed. We do that using ELN_DESTDIR defined >> >> Makefile.in:326. >> >> >> >> If the directory structure on MacOS is different I guess we have to add >> >> the correct information there. >> > >> > No matter what I set ELN_DESTDIR to, emacs still looks in >> > >> > /Users/alan/src/emacs/native/nextstep/Emacs.app/Contents/MacOS/../native-lisp/28.0.50-24e3df15 >> > >> > so something isn't being updated, I guess? >> >> That's possible, could you specify the full procedure you've used to >> reach this point? > > ./autogen.sh > ./configure --with-ns --with-native-compilation > make > make install > > Note: make install fails, I've had to apply this patch > > > @@ -749,7 +753,8 @@ install-etc: > ### Install native compiled Lisp files. > install-eln: > ifeq ($(HAVE_NATIVE_COMP),yes) > - find native-lisp -type f -exec ${INSTALL_DATA} -D "{}" "$(ELN_DESTDIR){}" \; > + find native-lisp -type d -exec $(MKDIR_P) "$(ELN_DESTDIR){}" \; ; \ > + find native-lisp -type f -exec ${INSTALL_DATA} "{}" "$(ELN_DESTDIR){}" \; > endif > > > but if you were to try this with GNUstep I suspect that wouldn't be > needed. > > And I've tried modifying ELN_DESTDIR with this > > > @@ -323,7 +323,11 @@ CONFIG_STATUS_FILES_IN = > COPYDIR = ${srcdir}/etc ${srcdir}/lisp > COPYDESTS = "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}" > > -ELN_DESTDIR = $(DESTDIR)${libdir}/emacs/${version}/ > +ifeq (${ns_self_contained},no) > + ELN_DESTDIR = $(DESTDIR)${libdir}/emacs/${version}/ > +else > + ELN_DESTDIR = ${ns_appresdir}/ > +endif > > all: ${SUBDIR} info > > > which results in the .eln files being installed where I want, but > running the installed Emacs (nextstep/Emacs.app/MacOS/Emacs) still > gives the error > > 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? Thanks! Andrea