From: Andrea Corallo <akrl@sdf.org>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: 40099@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#40099: 28.0.50; [feature/native-comp] Different working dir of .eln files is not expected by pdf-tools
Date: Wed, 18 Mar 2020 12:59:34 +0000 [thread overview]
Message-ID: <xjfmu8dg6o9.fsf@sdf.org> (raw)
In-Reply-To: <871rppx2i1.fsf@localhost> (Ihor Radchenko's message of "Wed, 18 Mar 2020 20:37:42 +0800")
Ihor Radchenko <yantar92@gmail.com> writes:
>> Could I have exact instructions to preproduce it?
>
> 1. Install pdf-tools and compile .elc
> 2. Run (native-compile-async "/path/to/pdf-tools/" t)
> 3. Restart emacs
> 4. Load pdf-tools and run (pdf-tools-install)
>
>> I'm not into pdf-tools but I think the trouble could be that its "make
>> build" does something different in terms of compilation that what
>> `native-compile' does. I suspect it's not a load path problem.
>
> pdf-tools does not even get to the point where it invokes make.
> The backtrace is:
>
> Debugger entered--Lisp error: (wrong-type-argument (and (not null) file-directory) nil build-directory)
> (pdf-tools-build-server "/home/yantar92/.emacs.d/straight/build/pdf-tools/eln-x86_64-pc-linux-gnu-85c5ba0bf5e77f42/" nil nil #f(compiled-function (executable) #<bytecode 0x1442895ca862f2c6>))
> (pdf-tools-install)
>
> I checked the source code to get a clue where the directory argument is
> coming from. Here is relevant code:
>
> (defconst pdf-tools-directory
> (or (and load-file-name
> (file-name-directory load-file-name))
> default-directory)
> "The directory from where this library was first loaded.")
>
> The value of pdf-tools-directory is
> "/home/yantar92/.emacs.d/straight/build/pdf-tools/eln-x86_64-pc-linux-gnu-85c5ba0bf5e77f42/".
> It makes sense considering that it takes the value of load-file-name,
> which is probably set to where .eln file is located. However, pdf-tools
> does not expect the location of the loaded file to be different from the
> package dir.
>
> Hope it helps.
>
> Best regards,
> Ihor
Great I think the problem is clear, pdf-tools is using `load-file-name'
as a way to obtain `pdf-tools-directory' but this is false assumption
for the eln folder directory we have arranged.
I'm not sure we want or can mitigate this easily but I guess the same
assumption is done in other packages so it's tricky.
Adding Stephane in cc to get an optinion on this.
Thanks for reporting.
Andrea
--
akrl@sdf.org
next prev parent reply other threads:[~2020-03-18 12:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-17 6:30 bug#40099: 28.0.50; [feature/native-comp] Different working dir of .eln files is not expected by pdf-tools Ihor Radchenko
2020-03-18 11:05 ` Andrea Corallo
2020-03-18 12:37 ` Ihor Radchenko
2020-03-18 12:59 ` Andrea Corallo [this message]
2020-03-18 14:27 ` Stefan Monnier
2020-03-18 15:54 ` Ihor Radchenko
2020-03-18 16:57 ` Andrea Corallo
2020-04-08 15:48 ` Ihor Radchenko
2020-04-08 18:22 ` Andrea Corallo
2020-04-08 18:54 ` Ihor Radchenko
2020-04-13 9:58 ` Andrea Corallo
2020-04-14 0:58 ` Ihor Radchenko
2020-04-14 7:28 ` Andrea Corallo
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=xjfmu8dg6o9.fsf@sdf.org \
--to=akrl@sdf.org \
--cc=40099@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=yantar92@gmail.com \
/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.