unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Tassilo Horn <tsdh@gnu.org>
Cc: 47987@debbugs.gnu.org
Subject: bug#47987: 28.0.50; [native-comp] Can't compile ELN if EL and ELC reside in different directories
Date: Tue, 27 Apr 2021 17:00:28 +0000	[thread overview]
Message-ID: <xjfbl9z3bo3.fsf@sdf.org> (raw)
In-Reply-To: <87im4ci1fw.fsf@fastmail.fm> (Tassilo Horn's message of "Sat, 24 Apr 2021 09:20:45 +0200")

Tassilo Horn <tsdh@gnu.org> writes:

> I use mu with its mu4e Emacs package for reading my mail.  I have it
> checked out as
>
>   ~/Repos/el/mu/
>
> and the *.el files are in
>
>   ~/Repos/el/mu/mu4e/.
>
> Mu can be build with the meson build tool which places the build
> artifacts in a separate build/ subdirectory, so the executables are in
>
>   ~/Repos/el/mu/build/mu/
>
> and the *.elc files are in
>
>   ~/Repos/el/mu/build/mu4e/.
>
> I've added both ~/Repos/el/mu/mu4e/ and ~/Repos/el/mu/build/mu4e/ to
> `load-path', so `C-h f mu4e' says
>
>   mu4e is an interactive compiled Lisp function in ‘mu4e.el’.
>
> i.e., it has loaded the compiled file and the help links to the source
> file (probably because I've set `load-prefer-newer').  Perfect!
>
> However, the native compiler complains that it cannot find the source
> files in a *Warnings* buffer:
>
> Warning (comp): Cannot look-up eln file as no source file was found for /home/horn/Repos/el/mu/build/mu4e/mu4e.elc Disable showing Disable logging

[...]

> As the no-native-comp emacs has no problem locating byte-compiled and
> source file, the native-comp emacs shouldn't have that problem, too.
>
> In the information below, see that mu4e's byte-compiled files are listed
> as load-path-shadows, shadowing the source files.

Hi Tassilo,

The trouble is that given the bytecode being loaded Emacs needs to find
the source file, both to native compile it (if necessary) both to hash
it in order to the locate the correct .eln file to load.

Now given the .elc file removing the final 'c' was the simple algo
applied for this scope :)  But is this is not sufficient we have to
either provide a more sophisticate mechanism so that a package can
register a new mapping or either disable eln load for some package.

Thanks

  Andrea





  reply	other threads:[~2021-04-27 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24  7:20 bug#47987: 28.0.50; [native-comp] Can't compile ELN if EL and ELC reside in different directories Tassilo Horn
2021-04-27 17:00 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-04-27 17:41   ` Eli Zaretskii
2022-11-06  9:33     ` Tassilo Horn
2022-11-06 10:17       ` 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=xjfbl9z3bo3.fsf@sdf.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=47987@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=tsdh@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).