From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ihor Radchenko 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 20:37:42 +0800 Message-ID: <871rppx2i1.fsf@localhost> References: <87imj3wl0t.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="61989"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40099@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 18 13:42:13 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 1jEY1V-000G16-Lv for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 13:42:13 +0100 Original-Received: from localhost ([::1]:50236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEY1U-00045P-OE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Mar 2020 08:42:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45440) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jEY1L-00045I-LK for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 08:42:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jEY1K-0008IQ-Db for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 08:42:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33990) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jEY1K-0008Gl-8I for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 08:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jEY1K-00057L-4i for bug-gnu-emacs@gnu.org; Wed, 18 Mar 2020 08:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Mar 2020 12:42: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.158453527019609 (code B ref 40099); Wed, 18 Mar 2020 12:42:02 +0000 Original-Received: (at 40099) by debbugs.gnu.org; 18 Mar 2020 12:41:10 +0000 Original-Received: from localhost ([127.0.0.1]:39963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEY0U-00056B-7W for submit@debbugs.gnu.org; Wed, 18 Mar 2020 08:41:10 -0400 Original-Received: from mail-pg1-f179.google.com ([209.85.215.179]:39205) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEY0Q-00055Y-4W for 40099@debbugs.gnu.org; Wed, 18 Mar 2020 08:41:07 -0400 Original-Received: by mail-pg1-f179.google.com with SMTP id b22so7621793pgb.6 for <40099@debbugs.gnu.org>; Wed, 18 Mar 2020 05:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=brheBoRrIYbLirSVw2JwVifVHf7vSZSWh3TL60mvYcw=; b=S8o7Aes9Wh1H+6RWj4SafR8+NpNajmElHBv3Dkdu3ZGliHIGVDtg5r3QFxcy1bHpgy Jd6K/te6UL8hK65cqVUhT6vHluzhwBYR+duP8g/LoYae09J9B1RU8vTSIHvhrBZWuzhg H9PaSXwkGMlNhAILwWh/VzoHaHqWLTCEkYJp4gvnqxdKkYUmkA1aycIF7N9oQuUnmGFk kL6ecRfLp6f7MP1PHUHFehKKCwlK6N5tFzs+VgSAN9TBp9bNf4d/YXJ4CnMZ7E8Xtt5p TTTFwjr/7PEwC0sSR/yI0ZJyfmF+o0HoPyJQAL4GJXmGTsFwmQP1baVR+nRF2QZu8zGN TNIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=brheBoRrIYbLirSVw2JwVifVHf7vSZSWh3TL60mvYcw=; b=hNbNgXlyHlIiSLTWkPkFwdJksUHpN8U/k+OMcJARRb1LgypxHuBvMdbtj40GPvRy+d TkoJLu6kxt4kaF267a/weV21d5pirLvmGKr7iG1Vle9qSZXvl1/LXhj4iPMd0baUYvac 7BMkgFTbzNNMsGc+bP1sha8HWaKs8iaa51yHCldd13wfBDBWhLdQann16SoDmb1YgVih KBqkELDJF9jF8zKfjJaEj5X2DgHN0eQl7rZqEb0gkTb0jrPf6ZuuNOBfaTc/JtKu34ql bCyPbASwCekjMZCfkzEhsJdEj1G7qBiFeJp3VKRGP+Arc91uxFi368HoRU8frkoIoWpS /RjA== X-Gm-Message-State: ANhLgQ2rwWnblZHQTZC0qCJLCB6t4sRWaX8e9zr2gPUJMFgBdlRvU6GD jSioy7DsWBUp4ut6jZ9+CK8= X-Google-Smtp-Source: ADFU+vvpyqdD7K8/UppAvBumt3b+QDj7Q5Z/eXiqpTXd/SjTTojEXt6uS7hUrKHNOIoqEAhACWx1qw== X-Received: by 2002:a65:5b49:: with SMTP id y9mr4387610pgr.153.1584535260087; Wed, 18 Mar 2020 05:41:00 -0700 (PDT) Original-Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id 19sm5930854pgx.63.2020.03.18.05.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2020 05:40:59 -0700 (PDT) In-Reply-To: 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:177490 Archived-At: > 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 Andrea Corallo writes: > Ihor Radchenko writes: > >> After native-compiling pdf-tools, the loaded files failed to find some >> files required for the package to work. >> >> Specifically, pdf-tools tried to rebuild the epdfinfo, which is usually >> done by running make on "build" directory in the same folder with >> pdf-tools.el and failed because pdf-tools.eln is located in different >> directory. The working directory for pdf-tools.eln seems to be >> ./eln-x86_64-pc-linux-gnu-85c5ba0bf5e77f42/ and does not contain >> "build". >> >> I guess that it would make sense to set working directory to be same >> when loading .el, .elc, and .eln. >> >> Best, >> Ihor > > 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. > > Here it's hard to say something without more informations. > > Could I have exact instructions to preproduce it? > > Thanks > > Andrea > > -- > akrl@sdf.org -- Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg