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

rPackages: Disable stackprotector on aarch64-darwin #165765

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

ConnorBaker
Copy link
Contributor

@ConnorBaker ConnorBaker commented Mar 25, 2022

Some derivations, like rPackages.KernSmooth, fail to build on aarch64-darwin because stackprotector is enabled.

This is similar to the fix required to get R itself working on aarch64-darwin: #158992.

I've not yet tested on other platforms. I plan on doing so shortly!

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Some derivations, like `rPackages.KernSmooth`, fail to build on `aarch64-darwin` because `stackprotector` is enabled.

This is similar to the fix required to get R itself working on `aarch64-darwin`: NixOS#158992.
@ConnorBaker
Copy link
Contributor Author

ConnorBaker commented Mar 25, 2022

aarch64-darwin

nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD" runs without issue after f50e41b.

x86_64-linux

connorbaker@ConnorPC:~/Packages/nixpkgs_R$ nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0
remote: Enumerating objects: 105, done.
remote: Counting objects: 100% (84/84), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 105 (delta 48), reused 54 (delta 38), pack-reused 21
Receiving objects: 100% (105/105), 550.12 KiB | 9.02 MiB/s, done.
Resolving deltas: 100% (49/49), completed with 26 local objects.
From https://github.com/NixOS/nixpkgs
   974af506015..d96a67d1567  master     -> refs/nixpkgs-review/0
$ git worktree add /home/connorbaker/.cache/nixpkgs-review/rev-78a439e5143ddf9e1cb0e485ea05e74f61635b40/nixpkgs d96a67d15672df117e1ba56aa98c74176d747f66
Preparing worktree (detached HEAD d96a67d1567)
Updating files: 100% (30018/30018), done.
HEAD is now at d96a67d1567 Merge pull request #161545 from Infinisil/synaesthesia
$ nix-env --option system x86_64-linux -f /home/connorbaker/.cache/nixpkgs-review/rev-78a439e5143ddf9e1cb0e485ea05e74f61635b40/nixpkgs -qaP --xml --out-path --show-trace
$ git merge --no-commit --no-ff 78a439e5143ddf9e1cb0e485ea05e74f61635b40
Automatic merge went well; stopped before committing as requested
$ nix-env --option system x86_64-linux -f /home/connorbaker/.cache/nixpkgs-review/rev-78a439e5143ddf9e1cb0e485ea05e74f61635b40/nixpkgs -qaP --xml --out-path --show-trace --meta
9 packages updated:
python3.10-CNVkit python3.10-rpy2 python3.9-CNVkit python3.9-rpy2 R RStudio RStudio sage sage

$ nix --experimental-features nix-command build --no-link --keep-going --option build-use-sandbox relaxed -f /home/connorbaker/.cache/nixpkgs-review/rev-78a439e5143ddf9e1cb0e485ea05e74f61635b40/build.nix
error: builder for '/nix/store/r1r59s843hiyp2ib4kn6nrcm771npygc-RStudio-1.4.1717.drv' failed with exit code 2;
       last 10 log lines:
       > [ 99%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/modules/SessionFindTests.cpp.o
       > [100%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/modules/SessionDiagnosticsTests.cpp.o
       > [100%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/SessionConsoleProcessTests.cpp.o
       > [100%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/SessionConsoleProcessSocketTests.cpp.o
       > [100%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/SessionConsoleProcessPersistTests.cpp.o
       > [100%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/SessionConsoleProcessInfoTests.cpp.o
       > [100%] Building CXX object src/cpp/session/CMakeFiles/rsession.dir/http/SessionPosixHttpConnectionListener.cpp.o
       > [100%] Linking CXX executable rsession
       > [100%] Built target rsession
       > make: *** [Makefile:156: all] Error 2
       For full logs, run 'nix log /nix/store/r1r59s843hiyp2ib4kn6nrcm771npygc-RStudio-1.4.1717.drv'.
error: builder for '/nix/store/n6kfphpraglwcq6vk95ivzlq8lyi7cms-python3.10-CNVkit-0.9.7.drv' failed with exit code 1;
       last 10 log lines:
       >   File "/nix/store/d0f7xzsj7034ixbnzyy1rdyvgmhvzf1j-python3.10-CNVkit-0.9.7/lib/python3.10/site-packages/skgenome/tabio/__init__.py", line 74, in read
       >     dframe = reader(infile, **kwargs)
       >   File "/nix/store/d0f7xzsj7034ixbnzyy1rdyvgmhvzf1j-python3.10-CNVkit-0.9.7/lib/python3.10/site-packages/skgenome/tabio/vcfio.py", line 30, in read_vcf
       >     raise ValueError("Must give a VCF filename, not open file handle: %s"
       > ValueError: Must give a VCF filename, not open file handle: file `b'formats/nosample.vcf'` does not have valid header (mode=`b'r'`) - is it VCF/BCF format?
       >
       > ----------------------------------------------------------------------
       > Ran 10 tests in 9.889s
       >
       > FAILED (errors=1)
       For full logs, run 'nix log /nix/store/n6kfphpraglwcq6vk95ivzlq8lyi7cms-python3.10-CNVkit-0.9.7.drv'.
error: builder for '/nix/store/rzdf325d1q461flfhx7khs23aq054j79-python3.9-CNVkit-0.9.7.drv' failed with exit code 1;
       last 10 log lines:
       >   File "/nix/store/k400cawnyw99n7sjqlr27jrfrnf2vx8s-python3.9-CNVkit-0.9.7/lib/python3.9/site-packages/skgenome/tabio/__init__.py", line 74, in read
       >     dframe = reader(infile, **kwargs)
       >   File "/nix/store/k400cawnyw99n7sjqlr27jrfrnf2vx8s-python3.9-CNVkit-0.9.7/lib/python3.9/site-packages/skgenome/tabio/vcfio.py", line 30, in read_vcf
       >     raise ValueError("Must give a VCF filename, not open file handle: %s"
       > ValueError: Must give a VCF filename, not open file handle: file `b'formats/nosample.vcf'` does not have valid header (mode=`b'r'`) - is it VCF/BCF format?
       >
       > ----------------------------------------------------------------------
       > Ran 10 tests in 2.886s
       >
       > FAILED (errors=1)
       For full logs, run 'nix log /nix/store/rzdf325d1q461flfhx7khs23aq054j79-python3.9-CNVkit-0.9.7.drv'.
error: 1 dependencies of derivation '/nix/store/1v0q4y2kykdjspq6fginq9ifjzp6jncd-RStudio-1.4.1717-wrapper.drv' failed to build
error: 3 dependencies of derivation '/nix/store/gj0vgcw20nz41a37sniaqmjzcqysrrwx-review-shell.drv' failed to build
3 packages failed to build:
python310Packages.cnvkit python39Packages.cnvkit rstudioWrapper

6 packages built:
python310Packages.rpy2 python39Packages.rpy2 rWrapper rstudioServerWrapper sage sageWithDoc

$ nix-shell /home/connorbaker/.cache/nixpkgs-review/rev-78a439e5143ddf9e1cb0e485ea05e74f61635b40/shell.nix

[nix-shell:~/.cache/nixpkgs-review/rev-78a439e5143ddf9e1cb0e485ea05e74f61635b40]$

@jbedo
Copy link
Contributor

jbedo commented Apr 4, 2022

I don't have an M1 so hard to test this, strikes me as perhaps something that should be fixed in stdenv rather than here if M1s just don't work with the stack protector? Also bit surprised nloptr requires additional requirements, the builds for aarch64-linux and x86_64-linux are fine without.

@siraben
Copy link
Member

siraben commented Apr 4, 2022

Result of nixpkgs-review pr 165765 run on aarch64-darwin 1

3 packages built:
  • python310Packages.rpy2
  • python39Packages.rpy2
  • rWrapper

@siraben siraben merged commit 0d95d03 into NixOS:master Apr 4, 2022
@ConnorBaker ConnorBaker deleted the patch-1 branch February 9, 2023 19:36
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.

3 participants