all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 37527@debbugs.gnu.org
Subject: bug#37527: [PATCH] Install C source code for for debugging help
Date: Mon, 07 Oct 2019 17:17:54 +0200	[thread overview]
Message-ID: <87lftwbn4t.fsf@gmx.de> (raw)
In-Reply-To: <3c936479-9341-caf1-2d08-7c236a660061@cs.ucla.edu> (Paul Eggert's message of "Sun, 6 Oct 2019 00:48:20 -0700")

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

Paul Eggert <eggert@cs.ucla.edu> writes:

Hi Paul,

> On 10/4/19 2:20 AM, Michael Albinus wrote:
>
>> I know that the command installs the emacs-debuginfo package. I haven't
>> found a command, which installs the emacs-debugsource package
>> only. Could you please help me here?
>
> Sorry, as far as I know there isn't a convenient way to do it. Such a
> command was suggested here:
>
> https://bugzilla.redhat.com/1494628#c9
>
> but as far as I know it was never implemented. Presumably one can do
> it by installing the debugsource packages by hand (e.g., see
> <https://fedoraproject.org/wiki/StackTraces> and look for "minimal
> set" and for "manually") but I haven't done this.
>
>>> Also, on Fedora at least, the debugsource packages are regularly
>>> out-of-sync with the main packages distributed by the Fedora servers,
>>> so the suggested approach is unreliable when Emacs is patched. This is
>>> worth mentioning as well.
>> That I don't understand completely. Aren't the debug* packages
>> intended
>> to be realeased under the same name+version as the binary packages? And
>> shouldn't they be in sync then?
>
> They should be in sync, but in practice for me they have not
> been. There can be nontrivial delay between the installation of an
> executable package and the installation of the corresponding
> debuginfo/debugsource packages. I don't know why this is. Possibly it
> has something to do with the DNF configuration files (I haven't
> changed mine, as far as I can recall). FWIW, I don't currently have a
> mismatch now (I just checked).

The text mentions now, that the installed Emacs and Emacs source package
shall run the same version.

> I update by running the command 'dnf --enablerepo=updates-debuginfo
> update', by the way. Which reminds me, we should put into our
> instructions that one must enable the debuginfo repo, as that's not
> the default.

Yes. Since people tend to forget this, it might be better to enable it
permanently via 'dnf config-manager --set-enabled updates-debuginfo'. And
then one could install the Emacs source package directly, as 'dnf
install emacs-debugsource'. I've adapted the text accordingly.

People who use the Emacs source package shall enable the debuginfo
repository anyway, to get the proper version during

>> The main intention of this discussion is to have access to Emacs C
>> sources via main distributions. Whatever we change in Emacs releases
>> doesn't matter; it counts only what the major distributions
>> offer.
>
> I don't follow this point. If we install a new file foo.el the major
> distributions will pick that up automatically. They will also pick it
> up if we install a new file foo.c. It's just a file.

Yes. But foo.c will go into the Emacs source package.

>> Shouldn't we contact them (at least Debian-based and Red
>> Hat-based distributions), and ask the maintainers what they would expect
>> from us to make access to the C sources more simple? And maybe they have
>> also descriptions, which fit better than what I have compiled.
>
> My impression is that it will be a hassle for us to track all the
> major distributions and how they do it, since they don't do it in the
> same way and they occasionally change what they do. Plus, we'll have
> to tell people to modify their DNF configurations (or similar
> configurations for other distros). This sounds like quite a pain for
> everyone concerned.

Again, I doubt that major distributions will provide C-source files
another way than via Emacs source packages. So we must describe how to
get them (that's this thread about), and maybe we could arrange with the
distoro's maintainers simper ways.

Attached the current version of my patch.


[-- Attachment #2: Type: text/plain, Size: 2792 bytes --]

diff --git a/INSTALL b/INSTALL
index 86f9e0080c..d159f2ef9a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -206,7 +206,7 @@ need to compile it.  For example, to compile Emacs with support for X
 and graphics libraries, you may need to install the X development
 package(s), and development versions of the jpeg, png, etc. packages.

-The names of the packages that you need varies according to the
+The names of the packages that you need vary according to the
 GNU/Linux distribution that you use, and the options that you want to
 configure Emacs with.  On Debian-based systems, you can install all the
 packages needed to build the installed version of Emacs with a command
@@ -214,6 +214,42 @@ like 'apt-get build-dep emacs' (on older systems, replace 'emacs' with
 eg 'emacs25').  On Red Hat-based systems, the corresponding command is
 'dnf builddep emacs' (on older systems, use 'yum-builddep' instead).

+* GNU/Linux source and debug packages
+
+Many GNU/Linux systems provide separate packages containing the
+sources and debug symbols of Emacs.  They are useful if you want to
+check the source code of Emacs primitive functions or debug Emacs on
+the C level.
+
+The names of the packages that you need vary according to the
+GNU/Linux distribution that you use.  On Debian-based systems, you can
+install a source package of Emacs with a command like 'apt-get source
+emacs' (on older systems, replace 'emacs' with eg 'emacs25').  The
+target directory for unpacking the source tree is the current
+directory.  On Red Hat-based systems, the corresponding command is
+'dnf install emacs-debugsource', with target directory /usr/src/debug
+(this requires to add the *-debuginfo repositories first, via 'dnf
+config-manager --set-enabled fedora-debuginfo updates-debuginfo').
+
+Once you have installed the source package, for example at
+/path/to/emacs-26.1, add the following line to your startup file:
+
+     (setq find-function-C-source-directory
+           "/path/to/emacs-26.1/src")
+
+The installation directory of the Emacs source package will contain
+the exact package name and version number Emacs is installed on your
+system.  If a new Emacs package is installed, the source package must
+be reinstalled as well, and the setting in your startup file must be
+updated.
+
+Emacs debugging symbols are distributed by a debug package.  It does
+not exist for every released Emacs package, this depends on the
+distribution.  On Debian-based systems, you can install a debug
+package of Emacs with a command like 'apt-get install emacs-dbg' (on
+older systems, replace 'emacs' with eg 'emacs25').  On Red Hat-based
+systems, the corresponding command is 'dnf debuginfo-install emacs'.
+

 DETAILED BUILDING AND INSTALLATION:


[-- Attachment #3: Type: text/plain, Size: 24 bytes --]


Best regards, Michael.

  reply	other threads:[~2019-10-07 15:17 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-26 20:07 bug#37527: [PATCH] Install C source code for for debugging help Paul Eggert
2019-09-27  5:09 ` Eli Zaretskii
2019-09-27  6:24   ` Paul Eggert
2019-09-27  7:21     ` Eli Zaretskii
2019-09-27  8:48       ` Andreas Schwab
2019-09-27  8:58       ` Michael Albinus
2019-09-27 11:36         ` Eli Zaretskii
2019-09-27 19:59           ` Michael Albinus
2019-09-28  5:55             ` Paul Eggert
2019-09-28  7:29               ` Eli Zaretskii
2019-09-28  7:54               ` Michael Albinus
2019-09-29  7:09                 ` Paul Eggert
2019-09-28  6:01             ` Eli Zaretskii
2019-09-28  9:11               ` Michael Albinus
2019-09-28  9:43                 ` Eli Zaretskii
2019-10-03 13:38                   ` Michael Albinus
2019-10-03 16:26                     ` Eli Zaretskii
2019-10-04  8:52                       ` Michael Albinus
2019-10-03 16:54                     ` Basil L. Contovounesios
2019-10-04  8:54                       ` Michael Albinus
2019-10-03 21:50                     ` Paul Eggert
2019-10-03 22:32                       ` Glenn Morris
2019-10-04  1:28                         ` Paul Eggert
2019-10-04  8:57                         ` Michael Albinus
2019-10-04  9:20                       ` Michael Albinus
2019-10-06  7:48                         ` Paul Eggert
2019-10-07 15:17                           ` Michael Albinus [this message]
2019-10-07 19:48                             ` Paul Eggert
2019-10-08  7:47                               ` Eli Zaretskii
2019-10-08  9:54                                 ` Michael Albinus
2019-10-08 11:58                                   ` Eli Zaretskii
2020-01-20 19:12                                     ` Stefan Kangas
2020-01-21  9:13                                       ` Paul Eggert
2020-01-21 17:02                                         ` Eli Zaretskii
2020-01-21 17:48                                           ` Paul Eggert
2020-01-21 18:04                                             ` Eli Zaretskii
2020-01-22  0:27                                               ` Paul Eggert
2020-01-22  3:31                                                 ` Eli Zaretskii
2020-01-23  8:58                                                   ` Paul Eggert
2020-01-23 14:23                                                     ` Eli Zaretskii
2020-01-23 17:42                                                       ` Paul Eggert
2020-01-23 18:24                                                         ` Eli Zaretskii
2020-01-25  0:47                                                           ` Paul Eggert
2020-01-25  7:58                                                             ` Eli Zaretskii
2020-01-26  9:00                                                               ` Paul Eggert
2020-01-26 16:13                                                                 ` Eli Zaretskii
2020-01-26 18:18                                                                   ` Paul Eggert
2020-01-26 19:24                                                                     ` Eli Zaretskii
2020-01-26 20:09                                                                       ` Michael Albinus
2020-01-27 21:17                                                                       ` Paul Eggert
2020-01-28  3:22                                                                         ` Eli Zaretskii
2020-01-26 20:06                                                                     ` Michael Albinus
2020-01-26 20:10                                                                       ` Eli Zaretskii
2019-09-28  5:51       ` Paul Eggert
2019-09-29 13:02 ` Rohan Hendrik Jotz-Lean

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=87lftwbn4t.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=37527@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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.