From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#55741: Getting an error when running the Emacs 28.1 binary that I built from source Date: Sat, 11 Jun 2022 13:54:01 +0300 Message-ID: <83edzvxygm.fsf@gnu.org> References: <835yllis1t.fsf@gnu.org> <8335gpiqrn.fsf@gnu.org> <94gtya64sCqC5hvsMyWmvdXzDf-1vLD94qgNaDyqxZvVKdu6Gfp3XW-seCKlrE5kQXOQPCR6uOOc7g4JOfHSgFqTgIO_rw04bCzvfxE3V4E=@proton.me> <83h753fsz1.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30312"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55741@debbugs.gnu.org To: cinnaroll45@proton.me Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 11 13:33:02 2022 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 1nzzMS-0007c3-Dx for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 13:33:00 +0200 Original-Received: from localhost ([::1]:53018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzzMR-0008Om-2B for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 07:32:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzyli-0000ZD-Q2 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 06:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58072) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzyli-0000mo-H1 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 06:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzyli-0008CY-GZ for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 06:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Jun 2022 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55741 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55741-submit@debbugs.gnu.org id=B55741.165494485731465 (code B ref 55741); Sat, 11 Jun 2022 10:55:02 +0000 Original-Received: (at 55741) by debbugs.gnu.org; 11 Jun 2022 10:54:17 +0000 Original-Received: from localhost ([127.0.0.1]:51969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzykz-0008BQ-AM for submit@debbugs.gnu.org; Sat, 11 Jun 2022 06:54:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzykx-0008BB-7b for 55741@debbugs.gnu.org; Sat, 11 Jun 2022 06:54:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53038) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzykr-0000gY-Fx; Sat, 11 Jun 2022 06:54:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2JkiuzOtsVBBOzbiL1hFf2b+Z0BdEBhbb3iUD+T1wKY=; b=jroGa1VaG8cj e1bMbrVZpI+/8hoPiNC95jGuy/IbCu/EhKbwgxAAQMWbO6oUi4FpBq/Q25Sn+6r3HIcx+2Y5pDNTh Q9aSu561HJJlOEEtjd10n9T1zlq8FDiV+dlfievKBm/RTCSFhE3u+a+GF/efgU10N+tsV61E1cZU4 qJBBNHvU1AmToB7ZvVP4RdpuX4FNSSCs62w8MeKUVxX/0/mGTWTVvWLB/aNjjGYdjq2plucFeDS3F L/BVJuM5EL46HptJ/ptTm/FbdT9ktkOSZbdrVt/6gKBNxMw1alRl+qkx2Rx69jbITx45cLV1yDrZS qXGX4tlMQzCGts9FMAbyLg==; Original-Received: from [87.69.77.57] (port=3434 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzykq-0005MA-U7; Sat, 11 Jun 2022 06:54:09 -0400 In-Reply-To: <83h753fsz1.fsf@gnu.org> (message from Eli Zaretskii on Thu, 02 Jun 2022 10:02:42 +0300) 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:234264 Archived-At: Ping! Could you please try the fix I posted? I'd like to install it for Emacs 28.2. > Cc: 55741@debbugs.gnu.org > Date: Thu, 02 Jun 2022 10:02:42 +0300 > From: Eli Zaretskii > > > Date: Tue, 31 May 2022 19:50:42 +0000 > > From: cinnaroll45 > > Cc: 55741@debbugs.gnu.org > > > > > The --bindir switch could be the problem: as you see from the error > > > message, Emacs 28.1 thinks its binary is in /home/user/emacs/bin, not > > > in /home/user/bin. So my suggestion is to reconfigure without the > > > --bindir switch, as I don't think this is currently supported for the > > > build with native-compilation. > > > > Removing the --bindir switch solved the issue for me. Everything gets installed to the > > expected location and the Emacs binary runs. > > > > > And in addition, please show the full absolute file name of the > > > emacs.pdmp file, so we could know in which directory it is installed on your system. > > > > The location of the pdmp file was: > > /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/emacs.pdmp > > > > > Can you show the full absolute file name of the file window-0d1b8b93-7ef4271a.eln with > > > this installation? In which directory is it installed by "make install"? > > > > I couldn't expand the absolute location of `window-0d1b8b93-7ef4271a.eln`. The error message seemed to > > indicate that it was looking for it under the directory where `emacs.pdmp` is, however there were no > > directories present in that path. Just the pdmp file and three other binaries. > > > > Thank you for helping out! > > Thanks, but could you please test a possible fix for the original > problem? I'd like us to keep supporting the --bindir configure-time > option, as we didn't intend dropping its support in Emacs 28. > > So could you please re-configure Emacs 28.1 with your original > options, including the separate --bindir, and then rebuild it with the > patch below, install it by "make install", and see if Emacs now starts > up correctly? If it doesn't start (or doesn't build), please show any > error messages you see. TIA. > > diff --git a/src/emacs.c b/src/emacs.c > index ccc0dd2..0a90b09 100644 > --- a/src/emacs.c > +++ b/src/emacs.c > @@ -940,20 +940,24 @@ load_pdump (int argc, char **argv) > sprintf (dump_file, "%s%c%s%s", > path_exec, DIRECTORY_SEP, argv0_base, suffix); > #if !defined (NS_SELF_CONTAINED) > - /* Assume the Emacs binary lives in a sibling directory as set up by > - the default installation configuration. */ > - const char *go_up = "../../../../bin/"; > - needed += (strip_suffix ? strlen (strip_suffix) : 0) > - - strlen (suffix) + strlen (go_up); > - if (exec_bufsize < needed) > - { > - xfree (emacs_executable); > - emacs_executable = xpalloc (NULL, &exec_bufsize, needed - exec_bufsize, > - -1, 1); > - } > - sprintf (emacs_executable, "%s%c%s%s%s", > - path_exec, DIRECTORY_SEP, go_up, argv0_base, > - strip_suffix ? strip_suffix : ""); > + if (!(emacs_executable && *emacs_executable)) > + { > + /* If we didn't find the Emacs binary, assume that it lives in a > + sibling directory as set up by the default installation > + configuration. */ > + const char *go_up = "../../../../bin/"; > + needed += (strip_suffix ? strlen (strip_suffix) : 0) > + - strlen (suffix) + strlen (go_up); > + if (exec_bufsize < needed) > + { > + xfree (emacs_executable); > + emacs_executable = xpalloc (NULL, &exec_bufsize, > + needed - exec_bufsize, -1, 1); > + } > + sprintf (emacs_executable, "%s%c%s%s%s", > + path_exec, DIRECTORY_SEP, go_up, argv0_base, > + strip_suffix ? strip_suffix : ""); > + } > #endif > result = pdumper_load (dump_file, emacs_executable); > > > > >