GNU bug report logs -
#55741
Getting an error when running the Emacs 28.1 binary that I built from source
Previous Next
Reported by: cinnaroll45 <cinnaroll45 <at> proton.me>
Date: Tue, 31 May 2022 14:33:02 UTC
Severity: normal
Tags: moreinfo
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55741 in the body.
You can then email your comments to 55741 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Tue, 31 May 2022 14:33:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
cinnaroll45 <cinnaroll45 <at> proton.me>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 31 May 2022 14:33:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
OS: Debian 11 (Fresh Install)
ARCH: amd64
When building Emacs 27.2 from source, I use the following config:
```bash
./autogen.sh
./configure --prefix=/home/user/emacs --bindir=/home/user/bin \
--with-json --with-gif --with-jpeg --with-png --with-tiff --with-rsvg
```
It builds without an issue and the binaries end up in my PATH and I can run Emacs.
When building Emacs 28.1 on the same system, I use the same config but with the addition of the `--with-native-compilation`flag:
```bash
./autogen.sh
./configure --prefix=/home/user/emacs --bindir=/home/user/bin \
--with-native-compilation \
--with-json --with-gif --with-jpeg --with-png --with-tiff --with-rsvg
```
The build goes without a hitch and the binaries end up in my PATH. However when I try to run the Emacs binary, I get the following error:
`Error using execdir /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/:
emacs: /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../native-lisp/28.1-2120ad00/preloaded/window-0d1b8b93-7ef4271a.eln: cannot open shared object file: No such file or directory`
I should also note that, if I try to run the built binary within the `src`folder, Emacs starts without an issue. Only the binary that's on my PATH seems to have this error.
I have found a very similar problem on the emacs-devel mailing list:
[https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg00003.htm](https://lists.gnu.org/archive/html/emacs-devel/2021-05/msg00003.html)
However, the person is trying to create a deb package so the recommendations there didn't help me.
Both source files are tarballs from the GNU FTP server and my system is Debian stable. Cleaning up build configs and trying fresh builds has not helped.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Tue, 31 May 2022 15:59:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 55741 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 31 May 2022 13:01:06 +0000
> From: cinnaroll45 via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> When building Emacs 28.1 on the same system, I use the same config but with the addition of the
> `--with-native-compilation` flag:
>
> ```bash
>
> ./autogen.sh
> ./configure --prefix=/home/user/emacs --bindir=/home/user/bin \
> --with-native-compilation \
> --with-json --with-gif --with-jpeg --with-png --with-tiff --with-rsvg
>
> ```
>
> The build goes without a hitch and the binaries end up in my PATH. However when I try to run the Emacs
> binary, I get the following error:
>
> `Error using execdir /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/:
> emacs:
> /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../native-lisp/28.1-2120ad00/preloaded/window-0d1b8b93-7ef4271a.eln:
> cannot open shared object file: No such file or directory`
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Tue, 31 May 2022 16:30:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 55741 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 31 May 2022 13:01:06 +0000
> From: cinnaroll45 via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> The build goes without a hitch and the binaries end up in my PATH. However when I try to run the Emacs
> binary, I get the following error:
>
> `Error using execdir /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/:
> emacs:
> /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../native-lisp/28.1-2120ad00/preloaded/window-0d1b8b93-7ef4271a.eln:
> cannot open shared object file: No such file or directory`
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"?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Tue, 31 May 2022 16:58:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 55741 <at> debbugs.gnu.org (full text, mbox):
> Cc: 55741 <at> debbugs.gnu.org
> Date: Tue, 31 May 2022 19:29:50 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > Date: Tue, 31 May 2022 13:01:06 +0000
> > From: cinnaroll45 via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >
> > The build goes without a hitch and the binaries end up in my PATH. However when I try to run the Emacs
> > binary, I get the following error:
> >
> > `Error using execdir /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/:
> > emacs:
> > /home/user/emacs/libexec/emacs/28.1/x86_64-pc-linux-gnu/../../../../bin/../native-lisp/28.1-2120ad00/preloaded/window-0d1b8b93-7ef4271a.eln:
> > cannot open shared object file: No such file or directory`
>
> 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"?
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.
Thanks.
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 31 May 2022 18:43:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Tue, 31 May 2022 19:11:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 55741 <at> debbugs.gnu.org (full text, mbox):
[Please use Reply All to keep the bug tracker on the CC list.]
> Date: Tue, 31 May 2022 18:10:56 +0000
> From: cinnaroll45 <cinnaroll45 <at> proton.me>
>
> > 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.
OK.
> > 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
OK.
> > 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.
The *.eln files should be under /home/user/emacs/native-lisp/, can you
see if they are indeed there?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Tue, 31 May 2022 19:52:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 55741 <at> debbugs.gnu.org (full text, mbox):
> 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!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Thu, 02 Jun 2022 07:04:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 55741 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 31 May 2022 19:50:42 +0000
> From: cinnaroll45 <cinnaroll45 <at> proton.me>
> Cc: 55741 <at> 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);
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55741
; Package
emacs
.
(Sat, 11 Jun 2022 10:55:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 55741 <at> debbugs.gnu.org (full text, mbox):
Ping!
Could you please try the fix I posted? I'd like to install it for
Emacs 28.2.
> Cc: 55741 <at> debbugs.gnu.org
> Date: Thu, 02 Jun 2022 10:02:42 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> > Date: Tue, 31 May 2022 19:50:42 +0000
> > From: cinnaroll45 <cinnaroll45 <at> proton.me>
> > Cc: 55741 <at> 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);
>
>
>
>
>
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Mon, 20 Jun 2022 16:07:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
cinnaroll45 <cinnaroll45 <at> proton.me>
:
bug acknowledged by developer.
(Mon, 20 Jun 2022 16:07:01 GMT)
Full text and
rfc822 format available.
Message #33 received at 55741-done <at> debbugs.gnu.org (full text, mbox):
> Cc: 55741 <at> debbugs.gnu.org
> Date: Sat, 11 Jun 2022 13:54:01 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
>
> Ping!
>
> Could you please try the fix I posted? I'd like to install it for
> Emacs 28.2.
No further comments, so I installed the fix on the emacs-28 branch,
and I'm closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 19 Jul 2022 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 337 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.