all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bhavin Gandhi <bhavin7392@gmail.com>
To: Andrea Corallo <akrl@sdf.org>
Cc: 52376@debbugs.gnu.org
Subject: bug#52376: 28.0.90; libdir is missing from native-comp-eln-load-path with GTK3 build
Date: Fri, 10 Dec 2021 14:55:46 +0530	[thread overview]
Message-ID: <CAOn=hbfUGryxkud0GtvLm1o=sN8GLZYpMVk5J-NwAx1eFoqCVA@mail.gmail.com> (raw)
In-Reply-To: <xjflf0tttvj.fsf@ma.sdf.org>

On Fri, 10 Dec 2021 at 01:44, Andrea Corallo <akrl@sdf.org> wrote:
> >> I suggest to set a breakpoint at pdumper.c:5321 and print 'fndata' to
> >> see where we do expect to find the installed eln we don't find.
> >
> > It did not reach that breakpoint, and Emacs just started as usual. Seems
> > like the RELOC_NATIVE_COMP_UNIT case is not getting matched.
>
> Actually this is very bizarre.  A native compiled Emacs that has been
> dumped has to go through there to startup so either:
>
> 1- we are debugging temacs and non emacs
> 2- emacs was compiled with native compilation
> 3- the breakpoint is not working as expected, maybe because it's an
> optimized build.
>
> I guess most likely we are looking at case 3 here.  Could you try in
> this case building pdumper.c (or all Emacs) with -O0 -g3?

Emacs was indeed compiled with -O0 -g3, but to rule out that possibility,
I compiled it again with these two flags. And still it is showing same
behaviour, it goes ahead without stopping at the breakpoint.

> Just to be 100% sure, one mine src/pdumper.c. from emacs28 line 5321 is:
>
>            if (file_access_p (fndata, F_OK))

In my case that line is at pdumper.c:5319

When I test the same breakpoint with the Lucid build I get the
following, it is able to find the correct paths here.

--8<---------------cut here---------------start------------->8---
$ gdb  --args /usr/bin/emacs-28.0.90-lucid -Q
Reading symbols from /usr/bin/emacs-28.0.90-lucid...
Reading symbols from
/usr/lib/debug/usr/bin/emacs-28.0.90-lucid-28.0.90-1.fc35.x86_64.debug...
(gdb) break pdumper.c:5319
Breakpoint 3 at 0x692487: file ../../src/pdumper.c, line 5319.
(gdb) run
Starting program: /usr/bin/emacs-28.0.90-lucid -Q

Breakpoint 3, dump_do_dump_relocation (dump_base=140737265905664,
reloc=...) at ../../src/pdumper.c:5319
5319            if (file_access_p (fndata, F_OK))
(gdb) p *comp_u
$3 = {
  header = {
    size = 4611686018830053383
  },
  file = XIL(0x7ffff3295623),
  optimize_qualities = XIL(0x7ffff3295593),
  lambda_gc_guard_h = XIL(0xe4d5f5),
  lambda_c_name_idx_h = XIL(0x7ffff3292625),
  data_fdoc_v = XIL(0),
  data_vec = XIL(0x7ffff328dc4d),
  data_impure_vec = XIL(0x7ffff2beb415),
  data_imp_relocs = 0x0,
  loaded_once = false,
  load_ongoing = false,
  handle = 0x0
}
(gdb) p comp_u->file
$4 = XIL(0x7ffff3295623)
(gdb) pr
("../lib64/emacs/28.0.90/native-lisp/28.0.90-be2fc0ab/preloaded/window-0d1b8b93-41a00537.eln"
. "../native-lisp/28.0.90-be2fc0ab/preloaded/window-0d1b8b93-41a00537.eln")
(gdb) p cu_file1
$5 = XIL(0x7ffff3295654)
(gdb) pr
"../lib64/emacs/28.0.90/native-lisp/28.0.90-be2fc0ab/preloaded/window-0d1b8b93-41a00537.eln"
(gdb) p cu_file2
$6 = XIL(0x7ffff3295634)
(gdb) pr
"../native-lisp/28.0.90-be2fc0ab/preloaded/window-0d1b8b93-41a00537.eln"
 --8<---------------cut here---------------end--------------->8---

From the GTK3 build:

Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz
 --with-cairo --with-json --with-native-compilation
 --enable-checking=yes,glyphs --enable-check-lisp-object-type
 build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu
 CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -flto=auto -ffat-lto-objects
 -fexceptions -grecord-gcc-switches -pipe -Wall -Werror=format-security
 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
 -O0 -g3' LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'


From the Lucid build:
Configured using:
 'configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=lucid
 --with-gpm=no --with-modules --with-harfbuzz --with-cairo --with-json
 --with-native-compilation build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -Wp,-D_GLIBCXX_ASSERTIONS
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
 -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-z,relro
 PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'





  reply	other threads:[~2021-12-10  9:25 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 17:21 bug#52376: 28.0.90; libdir is missing from native-comp-eln-load-path with GTK3 build Bhavin Gandhi
2021-12-08 17:33 ` Eli Zaretskii
2021-12-08 18:05   ` Bhavin Gandhi
2021-12-08 18:25     ` Eli Zaretskii
2021-12-08 19:19       ` Bhavin Gandhi
2021-12-08 20:11         ` Eli Zaretskii
2021-12-08 20:31           ` Bhavin Gandhi
2021-12-09 11:06           ` Andrea Corallo
2021-12-09 17:09             ` Bhavin Gandhi
2021-12-09 17:23               ` Andrea Corallo
2021-12-09 18:29                 ` Bhavin Gandhi
2021-12-09 20:14                   ` Andrea Corallo
2021-12-09 20:18                     ` Andrea Corallo
2021-12-10  9:25                       ` Bhavin Gandhi [this message]
2021-12-10  9:45                         ` Andrea Corallo
2021-12-10 10:00                           ` Bhavin Gandhi
2021-12-10 11:36                             ` Eli Zaretskii
2021-12-10 11:51                               ` Bhavin Gandhi
2021-12-10 12:20                                 ` Eli Zaretskii
2021-12-10 14:38                                   ` Bhavin Gandhi
2021-12-10 14:50                                     ` Eli Zaretskii
2021-12-10 15:08                                       ` Eli Zaretskii
2021-12-10 15:47                                         ` Bhavin Gandhi
2021-12-10 16:56                                           ` Eli Zaretskii
2021-12-10 19:53                                             ` Ken Brown
2021-12-11 12:49                                               ` Eli Zaretskii
2022-01-01 17:12                                             ` Bhavin Gandhi
2022-01-01 17:26                                               ` Ken Brown
2022-01-02 17:33                                                 ` Bhavin Gandhi
2022-01-01 17:27                                               ` Eli Zaretskii
2022-01-01 19:04                                                 ` Bhavin Gandhi
2022-01-01 19:19                                                   ` Eli Zaretskii
2022-01-02 17:39                                                     ` Bhavin Gandhi
2022-01-02 18:22                                                       ` Eli Zaretskii
2022-01-04 18:17                                                         ` Bhavin Gandhi
2022-01-04 20:07                                                           ` Eli Zaretskii
2021-12-10 11:32                           ` Eli Zaretskii
2021-12-09 18:39                 ` 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

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

  git send-email \
    --in-reply-to='CAOn=hbfUGryxkud0GtvLm1o=sN8GLZYpMVk5J-NwAx1eFoqCVA@mail.gmail.com' \
    --to=bhavin7392@gmail.com \
    --cc=52376@debbugs.gnu.org \
    --cc=akrl@sdf.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.