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

r-modules/generic-builder: Add missing iconv library to fix build on darwin #78965

Merged
merged 5 commits into from Feb 7, 2020

Conversation

tricktron
Copy link
Member

Motivation for this change

Executing nix-shell --packages 'rWrapper.override{packages = [ rPackages.SparseM ];}' fails with the error:

ld: library not found for -liconv
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/nix/store/saj094y98yryxgi7q1ja36hkbq52yvkf-R-3.6.2/lib/R/share/make/shlib.mk:6: SparseM.so] Error 1
ERROR: compilation failed for package 'SparseM'

Adding the missing iconv library for darwin fixes the issue.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@tricktron tricktron requested a review from peti as a code owner January 31, 2020 18:45
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 labels Jan 31, 2020
Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

Please don't add that package in the generic builder. Add it to SparseM, which actually needs it.

@tricktron
Copy link
Member Author

@peti Thanks for your quick reply. Sorry for the dumb sounding question but how can I add the missing library to the SparseM package? It is a cran package and thus automatically generated with the generate-r-packages.R script.

…uild of r-modules on darwin"

This reverts commit c58985b.
@peti
Copy link
Member

peti commented Feb 1, 2020

Thibault Gagnaux added 2 commits February 1, 2020 14:13
1. Cleans up the packagesWithRDepends, packagesWithNativeBuildInputs and packagesWithBuildInputs scope using the with statement.
2. Sorts them according to the second column with `sort -t '=' -k 2`
@tricktron
Copy link
Member Author

@peti Thanks for the hint. I reverted the changes in generic-builder.nix and added the libconv library to the r-packages that I used and were breaking directly. In addition, I did a refactoring in a second commit (with statement scope & sorting using sort -t '=' -k 2).

Copy link
Member

@peti peti left a comment

Choose a reason for hiding this comment

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

Please don't make sweeping changes to that file -- especially, if those changes are unrelated to the actual topic of the PR.

Refactorings should be made in a separate pull request.

This reverts commit 2dcfa01.
@tricktron
Copy link
Member Author

@peti Ok, I reverted the refactoring changes.

@peti peti merged commit e97ac66 into NixOS:master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants