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

opensc: fix cross compilation #61687

Merged
merged 4 commits into from May 22, 2019
Merged

Conversation

erictapen
Copy link
Member

Motivation for this change

Fix cross compilation for opensc:

nix build nixpkgs.pkgsCross.aarch64-multiplatform.opensc
Things done

For libassuan use npth instead of pth.

  • pth fails to cross-compile atm and the fix seemed to difficult for me.
  • npth claims to be compatible with GNU pth.
  • The latest release of pth is from 2006, while npth is from 2018.
  • Also libassuan as well as npth are developed by the GnuPG project, so I think that change would be safe.

Also added myself as maintainer as there was none.

For opensc:

  • Added myself as maintainer as there was none.
  • Move autoreconfHook into nativeBuidInputs.
  • Specify path for xsltproc.

The latter fixes the following problem:

$ nix build nixpkgs.pkgsCross.aarch64-multiplatform.opensc
error: build of '/nix/store/fgf3blzqa02xhkq0azhrdh7fzzbsk7lp-opensc-0.19.0-aarch64-unknown-linux-gnu.drv' on 'ssh://root@192.168.0.101' failed: builder for '/nix/store/fgf3blzqa02xhkq0azhrdh7fzzbsk7lp-opensc-0.19.0-aarch64-unknown-linux-gnu.drv' failed with exit code 1
builder for '/nix/store/fgf3blzqa02xhkq0azhrdh7fzzbsk7lp-opensc-0.19.0-aarch64-unknown-linux-gnu.drv' failed with exit
code 1; last 10 log lines:
  checking for winscard.h... yes
  checking pcsclite.h usability... yes
  checking pcsclite.h presence... no
  configure: WARNING: pcsclite.h: accepted by the compiler, rejected by the preprocessor!
  configure: WARNING: pcsclite.h: proceeding with the compiler's result
  checking for pcsclite.h... yes
  completion detect
  checking for bash-completion >= 2.0... no
  checking XSLTPROC requirement... configure: error: Missing XSLTPROC
  builder for '/nix/store/fgf3blzqa02xhkq0azhrdh7fzzbsk7lp-opensc-0.19.0-aarch64-unknown-linux-gnu.drv' failed with exit code 1
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/fgf3blzqa02xhkq0azhrdh7fzzbsk7lp-opensc-0.19.0-aarch64-unknown-linux-gnu.drv' failed

@GrahamcOfBorg build opensc pkgsCross.aarch64-multiplatform.opensc

  • 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 nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Apparently, the location of xsltproc needs to be manually speciefied
when cross compiling.

Also autoreconfHook needs to be in nativeBuildInputs.
Copy link
Member

@lukateras lukateras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lukateras lukateras merged commit 1b7ebf1 into NixOS:master May 22, 2019
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.

None yet

2 participants