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: Thu, 02 Jun 2022 10:02:42 +0300 Message-ID: <83h753fsz1.fsf@gnu.org> References: <835yllis1t.fsf@gnu.org> <8335gpiqrn.fsf@gnu.org> <94gtya64sCqC5hvsMyWmvdXzDf-1vLD94qgNaDyqxZvVKdu6Gfp3XW-seCKlrE5kQXOQPCR6uOOc7g4JOfHSgFqTgIO_rw04bCzvfxE3V4E=@proton.me> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13819"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55741@debbugs.gnu.org To: cinnaroll45 Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 02 09:08:09 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 1nwewC-0003Si-Ve for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jun 2022 09:08:09 +0200 Original-Received: from localhost ([::1]:48406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwew9-0007mo-PX for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jun 2022 03:08:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwesE-0006CK-Np for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 03:04:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwesE-0001NZ-FB for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 03:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwesE-0004NE-91 for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 03:04: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: Thu, 02 Jun 2022 07:04: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.165415338516738 (code B ref 55741); Thu, 02 Jun 2022 07:04:02 +0000 Original-Received: (at 55741) by debbugs.gnu.org; 2 Jun 2022 07:03:05 +0000 Original-Received: from localhost ([127.0.0.1]:52617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwerJ-0004Lu-6k for submit@debbugs.gnu.org; Thu, 02 Jun 2022 03:03:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:40544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwerH-0004LO-Bb for 55741@debbugs.gnu.org; Thu, 02 Jun 2022 03:03:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52316) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwer8-0001H8-RU; Thu, 02 Jun 2022 03:02:56 -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=fwLpI0eC0aKa4foJxhTTiKHWDip5nRwr8D2RZMDpTZg=; b=P4F/adgpWKCl 5wdmFx8nINMg4saZ8n84gPSb/JztShI7QO2oiQmoBM0MT6QvEggscTXQdfop92Hw0h0pIhrNyB1JJ 1I+qiT3G+kQmhi71DMSfp79xyS5XtxuZq/Rdu33UmjGcGN7CkiXtaIKU0m+HR0OTXYEXAWiyChjNz HZs12Z6YpK8/oNzuwNLIgMZLYij6OHCHsOTx5/EcKiBRF1dIO3FYyvTlVmqgLsmZFZ4MVrhaKGJhl nV33Hzn2uvorWauJpg9apSP/skOUhuX/mm6C6lOdG/xDKvlMaFzcQU8zaCAy6Bntw23WMpMpW9Ky/ 4HKzBP6pej2/SyADPNMLvw==; Original-Received: from [87.69.77.57] (port=4642 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 1nweqn-0002Vq-GA; Thu, 02 Jun 2022 03:02:54 -0400 In-Reply-To: <94gtya64sCqC5hvsMyWmvdXzDf-1vLD94qgNaDyqxZvVKdu6Gfp3XW-seCKlrE5kQXOQPCR6uOOc7g4JOfHSgFqTgIO_rw04bCzvfxE3V4E=@proton.me> (message from cinnaroll45 on Tue, 31 May 2022 19:50:42 +0000) 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:233522 Archived-At: > 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);