From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#47558: 28.0.50; dlopen 'image not found' gccemacs native-lisp macos Date: Sat, 3 Apr 2021 15:01:20 +0100 Message-ID: References: <83ft09fdc4.fsf@gnu.org> <8335w8fs4b.fsf@gnu.org> <83y2dzev4b.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24390"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bryan.m.obrien@gmail.com, 47558@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 03 16:02:11 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 1lSgqo-0006DH-Ul for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Apr 2021 16:02:11 +0200 Original-Received: from localhost ([::1]:51568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSgqn-0005gG-VE for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Apr 2021 10:02:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSgqg-0005fz-4Q for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 10:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSgqf-0003Kz-Sq for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 10:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lSgqf-0007Zw-Qo for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 10:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Apr 2021 14:02: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.161745849329095 (code B ref 47558); Sat, 03 Apr 2021 14:02:01 +0000 Original-Received: (at 47558) by debbugs.gnu.org; 3 Apr 2021 14:01:33 +0000 Original-Received: from localhost ([127.0.0.1]:34285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSgqC-0007ZD-Lx for submit@debbugs.gnu.org; Sat, 03 Apr 2021 10:01:32 -0400 Original-Received: from outbound.soverin.net ([116.202.65.218]:45575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSgq9-0007Yx-Tm for 47558@debbugs.gnu.org; Sat, 03 Apr 2021 10:01:32 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 27B3C600D0; Sat, 3 Apr 2021 14:01:24 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1617458483; bh=YDoiCgSfVPE+NAgHHNckivtsq5GmCsggJDp82u6ciOY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LiJBLDJkMABZwFC44T4rCwzvi8r7MLB964Uh1EQ/zp6bhexTKYAkr5CfkJfCCJnO7 TLi+DDnxLxT16zKJzOq+eJzOYH1hDfY4+rFSP54ZSXBT5t409YCR2KDrUgu+mB316y e7sq/BP2oAmL8BJJLLMNdQLMc9Q2rFqNRIhdbgOmqVPF8YA+DbHA1gHVNfAtt0sH9K ts5pXqtAmgJ3MavLU3Z6j8twQsEI+wl4dam1xFGA01/AzKOzXSdI3SR0Yy7F1w+9Z0 /PLW2tK9Y8zhlXXxgWnUaEPlfizCXn3E2oI6Wcsa/WMK/ZsVQQqQovnfm6lqXwNR99 saNFqJadbwEJw== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id A1759202B7CEB2; Sat, 3 Apr 2021 15:01:20 +0100 (BST) Mail-Followup-To: Alan Third , Eli Zaretskii , bryan.m.obrien@gmail.com, 47558@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <83y2dzev4b.fsf@gnu.org> 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:203491 Archived-At: On Sat, Apr 03, 2021 at 09:32:20AM +0300, Eli Zaretskii wrote: > > Date: Fri, 2 Apr 2021 22:51:56 +0100 > > From: Alan Third > > Cc: bryan.m.obrien@gmail.com, 47558@debbugs.gnu.org > > > > I think I've figured that out, but there's actually another wrinkle. > > 'make install' is installing the eln files in > > > > nextstep/Emacs.app/Contents/MacOS/lib/emacs/28.0.50/native-lisp/28.0.50-24e3df15 > > > > but the emacs executable is looking for them in > > > > nextstep/Emacs.app/Contents/MacOS/../native-lisp/28.0.50-24e3df15/ > > The above happens on all platforms, so it isn't macOS specific, right? > Or are you saying there's something macOS specific in ${libdir}? in > the latter case, what's the story there? I think that is what happens on other platforms, but the issue here is that the emacs executable is placed in an unusual position relative to the other files because of the NS app bundle format. I'll try to explain it below, but my knowledge is not deep. > > And just to add the confusion I feel they should *actually* be > > installed in > > > > nextstep/Emacs.app/Contents/Resources/native-lisp > > > > or similar. > > Why is that? NS uses a special directory structure that appears to the system as an application. It looks something like this: Emacs.app + Contents + MacOS | + Emacs <-- The executable + Resources | + icons | + etc | + include | + info | + lisp | + ... + Info.plist + ... The layout is ever so slightly different under GNUstep. As far as I can tell the only thing that should be in the Contents/MacOS directory are executables, practically everything else lives under Resources. nsterm.m has three functions for finding the correct path for etc, exec and the lisp load path. I imagine what we want to do is install the eln files under Resources, then add a new function that returns the location of them and use it to set the correct path at the point where Emacs loads the files. 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? -- Alan Third