Q: how do I share a pdf-tools
installation between computers?
I use pdf-tools
on two
difference machines, and sync my .emacs.d
between them via
Dropbox.
I have installed pdf-tools
through
the
package manager. pdf-info-epdfinfo-program
points to the executable epdfinfo
,
which pdf-tools
builds when installing. That's apparently a problem.
Formerly, I ran one machine on MacOS and another on Linux
(Fedora), and neither one could use the other's epdfinfo
executable. I now run one machine with Fedora and another with
Ubuntu, and, surprisingly, I have the same problem despite both
being Linux: the Fedora machine can't use the Ubuntu machine's
epdfinfo
and vice-versa. The error message suggests that it cannot one of the poppler
libraries:
pdf-info-check-epdfinfo: Error running ‘/home/dan/Dropbox/.emacs.d/packages/pdf-tools-20170417.150/epdfinfo’: /home/dan/Dropbox/.emacs.d/packages/pdf-tools-20170417.150/epdfinfo: error while loading shared libraries: libpoppler.so.64: cannot open shared object file: No such file or directory
What I have done in the past is:
1) install pdf-tools
on one machine and save a copy of its
executable (say, as epdfinfo-alt
),
2) install pdf-tools
on the other machine,
3) copy epdfinfo-alt
into the pdf-tools
directory,
4) put a conditional statement in my init
file like:
;; pseudocode
(when (eq machine machine-alt)
(setq pdf-info-epdfinfo-program
"some-directory/epdfinfo-alt"))
Surely there is a better way to share a pdf-tools
install
between machines that are not running the same operating
system or flavor of Linux. How do I do it without going to all
this fiddly trouble?
pdf-tools
on each machine, which, in turn, compiles a differentepdfinfo
on each machine. However, I don't have to deal with the poppler issues once I have the two compiled executables, because I have the janky conditional statement in the init file that uses the executable made by the current machine.