Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdf-tools: fix build #41940

Merged
merged 1 commit into from Jun 17, 2018
Merged

pdf-tools: fix build #41940

merged 1 commit into from Jun 17, 2018

Conversation

pmiddend
Copy link
Contributor

@pmiddend pmiddend commented Jun 13, 2018

Motivation for this change

To fix #41916, this commit upgrades the emacs package “pdf-tools” to the HEAD revision, since there’s no official release containing the fix. I'm not sure what to set the package's "version" to, though. Or what to do about the melpa versions of this package.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Jun 13, 2018

I'm not sure what to set the package's "version" to, though.

In such cases we typically set the version to the git revision's date and mark it as unstable, like
version = "unstable-20180613";

@pmiddend
Copy link
Contributor Author

@xeji Ah, thanks, fixed!

@xeji
Copy link
Contributor

xeji commented Jun 13, 2018

Thanks. I just tried to build this locally but it failed because emacs packages apparently must have a number as version, so we cannot use the word "unstable" here. Didn't know about that emacs-specific constraint. If you set version = "20180429"; it builds.

@oxij
Copy link
Member

oxij commented Jun 13, 2018 via email

@pmiddend
Copy link
Contributor Author

@xeji So sorry for not giving this a try before committing! @oxij thanks for the suggestion, I have changed the version accordingly. Seems to work.

@xeji
Copy link
Contributor

xeji commented Jun 14, 2018

@GrahamcOfBorg build emacsPackagesNg.pdf-tools

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Attempted: emacsPackagesNg.pdf-tools

Partial log (click to expand)

/build/source/lisp/pdf-util.el -> /build/pdf-toolsAE1I2z/pdf-tools-0.80-20180429-git/pdf-util.el
/build/source/lisp/pdf-view.el -> /build/pdf-toolsAE1I2z/pdf-tools-0.80-20180429-git/pdf-view.el
/build/source/lisp/pdf-virtual.el -> /build/pdf-toolsAE1I2z/pdf-tools-0.80-20180429-git/pdf-virtual.el
/build/source/server/epdfinfo -> /build/pdf-toolsAE1I2z/pdf-tools-0.80-20180429-git/epdfinfo
Built in 0.021s, finished at Thu Jun 14 07:34:47 2018
glibPreInstallPhase
installing
Opening input file: No such file or directory, /build/source/pdf-tools-0.80snapshot20180429snapshot.tar
builder for '/nix/store/2swb193iz6ad3i6a1l18m2h5iamfj46d-emacs-pdf-tools-0.80-20180429-git.drv' failed with exit code 255
error: build of '/nix/store/2swb193iz6ad3i6a1l18m2h5iamfj46d-emacs-pdf-tools-0.80-20180429-git.drv' failed

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: emacsPackagesNg.pdf-tools

Partial log (click to expand)

/private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/source/lisp/pdf-util.el -> /private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/pdf-toolsHosawF/pdf-tools-0.80-20180429-git/pdf-util.el
/private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/source/lisp/pdf-view.el -> /private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/pdf-toolsHosawF/pdf-tools-0.80-20180429-git/pdf-view.el
/private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/source/lisp/pdf-virtual.el -> /private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/pdf-toolsHosawF/pdf-tools-0.80-20180429-git/pdf-virtual.el
/private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/source/server/epdfinfo -> /private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/pdf-toolsHosawF/pdf-tools-0.80-20180429-git/epdfinfo
Built in 0.036s, finished at Thu Jun 14 08:20:15 2018
glibPreInstallPhase
installing
Opening input file: No such file or directory, /private/tmp/nix-build-emacs-pdf-tools-0.80-20180429-git.drv-0/source/pdf-tools-0.80snapshot20180429snapshot.tar
builder for '/nix/store/s5zrsn5drlr6mdgmikxx0zlaa24hkgmg-emacs-pdf-tools-0.80-20180429-git.drv' failed with exit code 255
error: build of '/nix/store/s5zrsn5drlr6mdgmikxx0zlaa24hkgmg-emacs-pdf-tools-0.80-20180429-git.drv' failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: emacsPackagesNg.pdf-tools

Partial log (click to expand)

/build/source/lisp/pdf-util.el -> /build/pdf-toolsovg3qp/pdf-tools-0.80-20180429-git/pdf-util.el
/build/source/lisp/pdf-view.el -> /build/pdf-toolsovg3qp/pdf-tools-0.80-20180429-git/pdf-view.el
/build/source/lisp/pdf-virtual.el -> /build/pdf-toolsovg3qp/pdf-tools-0.80-20180429-git/pdf-virtual.el
/build/source/server/epdfinfo -> /build/pdf-toolsovg3qp/pdf-tools-0.80-20180429-git/epdfinfo
Built in 0.086s, finished at Thu Jun 14 07:35:21 2018
glibPreInstallPhase
installing
Opening input file: No such file or directory, /build/source/pdf-tools-0.80snapshot20180429snapshot.tar
builder for '/nix/store/k61dyxija68l06v116yp9imykkqf4w7h-emacs-pdf-tools-0.80-20180429-git.drv' failed with exit code 255
error: build of '/nix/store/k61dyxija68l06v116yp9imykkqf4w7h-emacs-pdf-tools-0.80-20180429-git.drv' failed

@xeji
Copy link
Contributor

xeji commented Jun 14, 2018

This still doesn't build.

@jtojnar
Copy link
Contributor

jtojnar commented Jun 14, 2018

Even better would be using the release and adding the relevant commits to patches:

    patches = [
      (fetchpatch {
        url = https://github.com/politza/pdf-tools/commit/6505a0e817495b85897c9380161034ae611ddd90.patch;
        sha256 = "122ycbja8ckaysp58xqfcv11sgpbcp78pll5mywf9hgr0qap9jsy";
      })
      (fetchpatch {
        url = https://github.com/politza/pdf-tools/commit/ded6341b0e3ad97e8b14f68c1796ba66dc155fd1.patch;
        sha256 = "0hd2v4c6xq2jzg2m6s5kzs0fldgygf1pnfqd11v6x4w05zvxn6a2";
      })
      (fetchpatch {
        url = https://github.com/politza/pdf-tools/commit/50a5297b82e26cfd52f6c00645ddc1057099d6a7.patch;
        sha256 = "107rqzldg06h8k3pmdinkl78dr4xycm570sp2an4ihjmpmph0z39";
      })
    ];

@pmiddend
Copy link
Contributor Author

@xeji How are you testing this?

@pmiddend
Copy link
Contributor Author

@jtojnar If I do this, should the version stay at 0.80?

@jtojnar
Copy link
Contributor

jtojnar commented Jun 14, 2018

Yes.

@xeji
Copy link
Contributor

xeji commented Jun 17, 2018

@pmiddend to test the build with your local nixpkgs clone, you can use
nix-build /path/to/nixpkgs-clone -A emacsPackagesNg.pdf-tools

To fix NixOS#41916, this commit upgrades the emacs package “pdf-tools” to
the HEAD revision, since there’s no official release containing the fix.
@pmiddend
Copy link
Contributor Author

@xeji Ah, thanks. I was able to reproduce it. I used fetchpatch like @jtojnar suggested to fix the problem (and keep the version at 0.80).

@xeji
Copy link
Contributor

xeji commented Jun 17, 2018

@GrahamcOfBorg build emacsPackagesNg.pdf-tools

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: emacsPackagesNg.pdf-tools

Partial log (click to expand)

Parsing tar file...
Parsing tar file...done
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/dycb9719nbz5qpi96b12hafwbwsggqa0-emacs-pdf-tools-0.80
shrinking /nix/store/dycb9719nbz5qpi96b12hafwbwsggqa0-emacs-pdf-tools-0.80/share/emacs/site-lisp/elpa/pdf-tools-0.80/epdfinfo
strip is /nix/store/4mf2xm9p32lzrim927yk92xhx35yaz62-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/dycb9719nbz5qpi96b12hafwbwsggqa0-emacs-pdf-tools-0.80
checking for references to /build in /nix/store/dycb9719nbz5qpi96b12hafwbwsggqa0-emacs-pdf-tools-0.80...
/nix/store/dycb9719nbz5qpi96b12hafwbwsggqa0-emacs-pdf-tools-0.80

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: emacsPackagesNg.pdf-tools

Partial log (click to expand)

Parsing tar file...
Parsing tar file...done
glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/91azmkyj5l4qh68naagq4p2y0l5g6w4j-emacs-pdf-tools-0.80
shrinking /nix/store/91azmkyj5l4qh68naagq4p2y0l5g6w4j-emacs-pdf-tools-0.80/share/emacs/site-lisp/elpa/pdf-tools-0.80/epdfinfo
strip is /nix/store/min150lkigznaayzpwvf8d4jdl1dqvx6-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/91azmkyj5l4qh68naagq4p2y0l5g6w4j-emacs-pdf-tools-0.80
checking for references to /build in /nix/store/91azmkyj5l4qh68naagq4p2y0l5g6w4j-emacs-pdf-tools-0.80...
/nix/store/91azmkyj5l4qh68naagq4p2y0l5g6w4j-emacs-pdf-tools-0.80

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: emacsPackagesNg.pdf-tools

Partial log (click to expand)

Warning: Unknown macro property font-lock in pdf-virtual-define-adapter
Warning: Unknown macro property imenu in pdf-virtual-define-adapter
Done (Total of 15 files compiled, 2 skipped)
Parsing tar file...
Parsing tar file...done
glibPreFixupPhase
post-installation fixup
strip is /nix/store/8q05v40n0f7amgw70pk6bkb23r7hrzgn-cctools-binutils-darwin/bin/strip
patching script interpreter paths in /nix/store/h5sx8sjn84kwdwmz1gp89pinmmh13qdf-emacs-pdf-tools-0.80
/nix/store/h5sx8sjn84kwdwmz1gp89pinmmh13qdf-emacs-pdf-tools-0.80

@xeji
Copy link
Contributor

xeji commented Jun 17, 2018

Looks good, thank you.

@xeji xeji changed the title pdf-tools: 0.80 -> HEAD pdf-tools: fix build Jun 17, 2018
@xeji xeji merged commit 3babb8d into NixOS:master Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

emacs-pdf-tools-0.80 fails to build
5 participants