unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49864@debbugs.gnu.org
Subject: bug#49864: 28.0.50; Fails to start after "make install"
Date: Thu, 5 Aug 2021 14:44:00 +0200	[thread overview]
Message-ID: <CAOS0-34Q4ZviMRzceCj12LT4UFh-vpYbqM9XPtUxrscKYeGJRw@mail.gmail.com> (raw)
In-Reply-To: <83mtpwjpa7.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 6631 bytes --]

It did not go exactly as the above, but adding the whole log here in case
it helps, as I am not 100% sure if I did it correctly; will go over it
again later in today.

~/src/tools/emacs/src $ gdb /usr/local/bin/emacs-28.0.50
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/emacs-28.0.50...
warning: File "/home/wilhelm/src/tools/emacs/src/.gdbinit" auto-loading has
been declined by your `auto-load safe-path' set to
"$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /home/wilhelm/src/tools/emacs/src/.gdbinit
line to your configuration file "/home/wilhelm/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/wilhelm/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the
shell:
info "(gdb)Auto-loading safe path"
(gdb) source ./.gdbinit
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from
terminal]
DISPLAY = :0.0
TERM = xterm-256color
Breakpoint 1 at 0x4766c: file emacs.c, line 399.
Breakpoint 2 at 0x105420: file xterm.c, line 10258.
(gdb) break pdumper.c:5315
Breakpoint 3 at 0x19959d: file pdumper.c, line 5315.
(gdb) r -Q
Starting program: /usr/local/bin/emacs-28.0.50 -Q
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".

Breakpoint 3, dump_do_dump_relocation (dump_base=<optimized out>,
reloc=...) at pdumper.c:5315
5315 if (installation_state == UNKNOWN)
(gdb) p cu_file1
$1 = XIL(0x7ffff08e4bac)
(gdb) xstring
$2 = (struct Lisp_String *) 0x7ffff08e4ba8
"../lib/emacs/28.0.50/native-lisp/28.0.50-864bf4e5/preloaded/window-0d1b8b93-dcb2375f.eln"
(gdb) p cu_file2
$3 = XIL(0x7ffff08e4b8c)
(gdb) xstring
$4 = (struct Lisp_String *) 0x7ffff08e4b88
"../native-lisp/28.0.50-864bf4e5/preloaded/window-0d1b8b93-dcb2375f.eln"
(gdb) n
5317    eln_fname = make_uninit_string (execdir_len + fn1_len);
(gdb) n
5318    fndata = SSDATA (eln_fname);
(gdb) n
5319    memcpy (fndata, emacs_execdir, execdir_len);
(gdb) n
1561  return XSTRING (string)->u.s.data;
(gdb) n
5321    if (file_access_p (fndata, F_OK))
(gdb) p fndata
$5 = <optimized out>
(gdb) next
5325 eln_fname = make_uninit_string (execdir_len + fn2_len);
(gdb) p errno
'errno' has unknown type; cast it to its declared type
(gdb) n
5326 fndata = SSDATA (eln_fname);
(gdb) n
5327 memcpy (fndata, emacs_execdir, execdir_len);
(gdb) n
1561  return XSTRING (string)->u.s.data;
(gdb) n
5329 installation_state = LOCAL_BUILD;
(gdb) p fndata
$6 = <optimized out>
(gdb) n
5331    fixup_eln_load_path (eln_fname);
(gdb) n
5352 comp_u->file = eln_fname;
(gdb) p eln_fname
$7 = XIL(0x555555c2bcb4)
(gdb) xstring
$8 = (struct Lisp_String *) 0x555555c2bcb0
"/usr/local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/../../../../bin/../native-lisp/28.0.50-864bf4e5/preloaded/window-0d1b8b93-dcb2375f.eln"
(gdb) n
1561  return XSTRING (string)->u.s.data;
(gdb) n
5354 if (!comp_u->handle)
(gdb) n
5356    fprintf (stderr, "Error using execdir %s:\n",
(gdb) n
Error using execdir
/usr/local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/../../../../bin/:
5358    error ("%s", dynlib_error ());
(gdb) p errno
'errno' has unknown type; cast it to its declared type
(gdb) n
emacs:
/usr/local/libexec/emacs/28.0.50/x86_64-pc-linux-gnu/../../../../bin/../native-lisp/28.0.50-864bf4e5/preloaded/window-0d1b8b93-dcb2375f.eln:
cannot open shared object file: No such file or directory
[Inferior 1 (process 4129) exited with code 01]
(gdb) q

On Thu, Aug 5, 2021 at 9:59 AM Eli Zaretskii <eliz@gnu.org> wrote:

> > From: Wilhelm Kirschbaum <wkirschbaum@gmail.com>
> > Date: Thu, 5 Aug 2021 09:14:10 +0200
> > Cc: 49864@debbugs.gnu.org
> >
> > Yes, of course, but I will only be able to do it a bit later today. I am
> not too familiar with GDB though.
>
> Thanks.  The instructions are below:
>
>   $ cd /home/wilhelm/src/tools/emacs/src
>   $ gdb /usr/local/bin/emacs-28.0.50
>   ...
>   (gdb) source ./.gdbinit
>   (gdb) break pdumper.c:5315
>   (gdb) r -Q
>
> When GDB announces that the breakpoint at pdumper.c:5315 breaks, do
> this:
>
>   (gdb) p cu_file1
>   (gdb) xstring
>   (gdb) p cu_file2
>   (gdb) xstring
>
> and show the results of these commands.  Then step through the code,
> one line at a time, with the "n" ("next") command.  Eventually, you
> should get to line 5321:
>
>   5321                if (file_access_p (fndata, F_OK))
>
> Then show the value of fndata, which should be a file name:
>
>   (gdb) p fndata
>
> Type "next" again.  If the file_access_p call fails (returns 'false'),
> show the value of errno immediately after stepping past the line that
> calls file_access_p:
>
>   (gdb) p errno
>
> In that case (if file_access_p fails), the "next" command will land
> you in this block:
>
>             else
>               {
>                 eln_fname = make_uninit_string (execdir_len + fn2_len);
>                 fndata = SSDATA (eln_fname);
>                 memcpy (fndata, emacs_execdir, execdir_len);
>                 memcpy (fndata + execdir_len, SSDATA (cu_file2), fn2_len);
>                 installation_state = LOCAL_BUILD;
>               }
>
> Please type "n" ("next") repeatedly until you get to the last line,
> which starts with "installation_state =", and show the value of
> fndata:
>
>   (gdb) p fndata
>
> Finally, keep stepping with "n" until you come to this line:
>
>         comp_u->handle = dynlib_open (SSDATA (eln_fname));
>
> and type the following commands:
>
>   (gdb) p eln_fname
>   (gdb) xstring
>
> and show their results.
>
> You can then terminate the GDB session:
>
>   (gdb) q
>
> (Answer "y" if it asks whether to quit.)
>
> I hope the data you collect and report will explain what happens, or
> at least give us a direction in which to look for the explanation.
>
> Thanks again for your help in this matter.
>

[-- Attachment #2: Type: text/html, Size: 8316 bytes --]

  reply	other threads:[~2021-08-05 12:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  5:42 bug#49864: 28.0.50; Fails to start after "make install" Wilhelm Kirschbaum
2021-08-04 11:56 ` Eli Zaretskii
2021-08-05  6:42   ` Wilhelm Kirschbaum
2021-08-05  6:50     ` Eli Zaretskii
2021-08-05  7:02       ` Wilhelm Kirschbaum
2021-08-05  7:09         ` Eli Zaretskii
2021-08-05  7:14           ` Wilhelm Kirschbaum
2021-08-05  7:58             ` Eli Zaretskii
2021-08-05 12:44               ` Wilhelm Kirschbaum [this message]
2021-08-05 13:33                 ` Eli Zaretskii
2021-08-05 14:04                   ` Eli Zaretskii
2021-08-05 15:21                     ` Wilhelm Kirschbaum
2021-08-05 16:29                       ` Eli Zaretskii
2021-08-05 18:27                         ` Wilhelm Kirschbaum
2021-08-06  6:48                           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOS0-34Q4ZviMRzceCj12LT4UFh-vpYbqM9XPtUxrscKYeGJRw@mail.gmail.com \
    --to=wkirschbaum@gmail.com \
    --cc=49864@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).