From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87imj3wl0t.fsf@localhost> <871rppx2i1.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="17623"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 40099@debbugs.gnu.org, Stefan Monnier To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 18 14:00:20 2020 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 1jEYJ2-0004Rd-7I for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 14:00:20 +0100 Original-Received: from localhost ([::1]:50488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEYJ1-0001dX-5t for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 09:00:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49454) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEYIm-0001cn-7A for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 09:00:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEYIl-0004zw-0F for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 09:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEYIk-0004xt-QW for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 09:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jEYIk-0007YY-MV for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 09:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Mar 2020 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40099 X-GNU-PR-Package: emacs Original-Received: via spool by 40099-submit@debbugs.gnu.org id=B40099.158453637728986 (code B ref 40099); Wed, 18 Mar 2020 13:00:02 +0000 Original-Received: (at 40099) by debbugs.gnu.org; 18 Mar 2020 12:59:37 +0000 Original-Received: from localhost ([127.0.0.1]:39981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEYIL-0007XR-Kh for submit@debbugs.gnu.org; Wed, 18 Mar 2020 08:59:37 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:51425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEYIK-0007XJ-18 for 40099@debbugs.gnu.org; Wed, 18 Mar 2020 08:59:36 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 02ICxYt6021726 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 18 Mar 2020 12:59:34 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 02ICxYQU006340; Wed, 18 Mar 2020 12:59:34 GMT In-Reply-To: <871rppx2i1.fsf@localhost> (Ihor Radchenko's message of "Wed, 18 Mar 2020 20:37:42 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:177491 Archived-At: Ihor Radchenko 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) #)) > (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