From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bhavin Gandhi Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83a6hbvw5d.fsf@gnu.org> <838rwvvtqs.fsf@gnu.org> <83zgpavoui.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13488"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52376@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 10 11:05:10 2021 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 1mvcm6-0003Ch-DU for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 11:05:10 +0100 Original-Received: from localhost ([::1]:48482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvcm4-0006Z3-RA for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Dec 2021 05:05:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvcBC-0004cs-HP for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 04:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mvcBB-0004Rk-Ua for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 04:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mvcBB-0006vn-Rk for bug-gnu-emacs@gnu.org; Fri, 10 Dec 2021 04:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bhavin Gandhi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Dec 2021 09:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52376 X-GNU-PR-Package: emacs Original-Received: via spool by 52376-submit@debbugs.gnu.org id=B52376.163912839226606 (code B ref 52376); Fri, 10 Dec 2021 09:27:01 +0000 Original-Received: (at 52376) by debbugs.gnu.org; 10 Dec 2021 09:26:32 +0000 Original-Received: from localhost ([127.0.0.1]:45529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvcAh-0006v3-Ui for submit@debbugs.gnu.org; Fri, 10 Dec 2021 04:26:32 -0500 Original-Received: from mail-yb1-f181.google.com ([209.85.219.181]:42831) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mvcAe-0006uo-QE for 52376@debbugs.gnu.org; Fri, 10 Dec 2021 04:26:31 -0500 Original-Received: by mail-yb1-f181.google.com with SMTP id j2so19825269ybg.9 for <52376@debbugs.gnu.org>; Fri, 10 Dec 2021 01:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LO+GC4QKLOQDNSf5d6jvzqa/ZliqAdBHxZxlmx5/zwA=; b=ZKii+IGiystVWJWyAaF/CewEbJVjWFRy++7IBmT3AfZurnaa5bxDRY9B8+z0ZBIdWO Enu5ZOn7JrsEMo7suhOWAQTip+SvQIP2AHp1iyL4cfLviBWHTa/nhVua+Uqof27jA1NY xtTE84xctnKBfYYSHVtKbs42RZQFfp3uAF25tSuy7hCEgUgl0eakhw8NC5dzT6PxqTiw oKo3ez5jUHT54hzWOuvcwFo+Nyv+5pMb/3jch0msrNKcEOOZvvNJEQXsh1Cml8x/Owqm kBjqnm4ucm/KpXlXUg3UtjqnLdDgBSrKnSArkFsc5r0Lvk2Yon8OmaoO5u083Db7HavG Oc/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LO+GC4QKLOQDNSf5d6jvzqa/ZliqAdBHxZxlmx5/zwA=; b=wYuRe11n2Nt9VqweqwvEpTaak2qM/EJ/oLdEn3vlB1XvaRb/LXtdgyztpRfXJDrS5s +xLaL9AxEe9chrn7ufo/ECZmEWS69XHPws+wOsuY+5YNb4zgAgmmHacgEmq9/bXZAgrA IoUBu5yytMThSIkAfKZPtPaspXUxIVgRfgMxAAXOO2NEmIPR5FXOZB6NYeO29Kkq+DIM pUuB471+0OjTipGzadXn3/5h+kuJ24v9P2uhRutsvzQjQDylPFJD5cUvb/pZNZz1IGVk vDSphyrJGWnOzOTcdTklb9W2rEf6ejQQVxRfQRMTpzQ3tjYagFMTA1Ikk4beWGzdslL1 TSpw== X-Gm-Message-State: AOAM532oRQANGbl5OLG4K6VVaylXMOtX+coNlorkPHSUnV6UCbNaDfnj TyhEZU6SsnAkRL6uX190EpoeJ21s+oOQXkiASaDrT4hi9r4= X-Google-Smtp-Source: ABdhPJx2Yzr4YHMIk5UDADdURJZG1NcBy3ro7z4DlhqwwPLKinbWGGfT1KVAiHELZud6Ol0RtiEv095wOpsg+i384Zs= X-Received: by 2002:a25:3fc3:: with SMTP id m186mr13105603yba.562.1639128383155; Fri, 10 Dec 2021 01:26:23 -0800 (PST) In-Reply-To: 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:222040 Archived-At: On Fri, 10 Dec 2021 at 01:44, Andrea Corallo 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'