Skip to content

Conversation

@Artturin
Copy link
Member

Motivation for this change
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 via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages 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/)
  • 21.11 Release Notes (or backporting 21.05 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
  • Fits CONTRIBUTING.md.

@Artturin Artturin force-pushed the strictdepsfixes branch 2 times, most recently from 7f7bf79 to 893afb1 Compare October 22, 2021 20:50
@ofborg ofborg bot added 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. labels Oct 22, 2021
@ofborg ofborg bot requested a review from pSub October 22, 2021 22:14
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Oct 22, 2021
@Artturin Artturin added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Oct 23, 2021
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Oct 23, 2021
@Artturin
Copy link
Member Author

Artturin commented Oct 23, 2021

with these changes im able to compile everything up to python3Packages.flashfocus with this patch and without

diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index 8fa30637049..cc21b152c12 100644
--- a/pkgs/stdenv/generic/make-derivation.nix
+++ b/pkgs/stdenv/generic/make-derivation.nix
@@ -69,7 +69,7 @@ in
 , doInstallCheck ? config.doCheckByDefault or false
 
 , # TODO(@Ericson2314): Make always true and remove
-  strictDeps ? stdenv.hostPlatform != stdenv.buildPlatform
+  strictDeps ? true
 , meta ? {}
 , passthru ? {}
 , pos ? # position used in error messages and for meta.position
@@ -310,7 +310,7 @@ else let
           llvm-config = 'llvm-config-native'
         '';
       in [ "--cross-file=${crossFile}" ] ++ mesonFlags;
-    } // lib.optionalAttrs (attrs.enableParallelBuilding or false) {
+    } // lib.optionalAttrs (attrs.enableParallelBuilding or true) {
       enableParallelChecking = attrs.enableParallelChecking or true;
     } // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != [] || stdenv.hostPlatform.isMusl) {
       NIX_HARDENING_ENABLE = enabledHardeningOptions;

dependency tree: https://gist.github.com/Artturin/d63a9007774f7cb7994a93acdfb69899

@Artturin
Copy link
Member Author

Weird, with strictDeps = false; in pango/default.nix nix build ".#pkgsCross.aarch64-multiplatform.pango" fails with

pango-aarch64-unknown-linux-gnu> /nix/store/v63md8fjcf0cslrnfgxzp1fc1qfdaaxr-aarch64-unknown-linux-gnu-binutils-2.35.2/bin/aarch64-unknown-linux-gnu-ld: /nix/store/vrb86j51yj8rkmk4q882pxr123w048sk-glib-2.70.0/lib/libglib-2.0.so: error adding symbols: file in wrong format

@Artturin Artturin mentioned this pull request Oct 23, 2021
12 tasks
@Artturin
Copy link
Member Author

with this PR sway successfully cross-compiles @Mindavi

@Artturin Artturin force-pushed the strictdepsfixes branch 4 times, most recently from 869e506 to a9a4de5 Compare October 24, 2021 17:17
@Artturin
Copy link
Member Author

Artturin commented Oct 25, 2021

with this PR sway successfully cross-compiles @Mindavi

* with aarch64-linux binfmt

checked output with diffoscope

libnotify: make gobject-introspection conditional to fix binfmt cross-compile
neither gentoo or arch list them
checked with diffoscope and there were no changes
output checked with diffoscope
libgudev: make gobject-introspection conditional to fix binfmt cross-compile
librsvg-aarch64-unknown-linux-gnu> error: linker `cc` not found
librsvg-aarch64-unknown-linux-gnu>   |
librsvg-aarch64-unknown-linux-gnu>   = note: No such file or directory (os error 2)
librsvg-aarch64-unknown-linux-gnu> error: could not compile `librsvg` due to previous error
librsvg-aarch64-unknown-linux-gnu> make[2]: *** [Makefile:1572: /build/librsvg-2.52.0/target/aarch64-unknown-linux-gnu/release/rsvg-convert] Error 101
adding python3 to nativeBuildInputs is not enough as it still uses the
aarch64 python for the build
zlib has to be in nativeBuildInputs too because its run during the
build, i think.
@Artturin
Copy link
Member Author

Artturin commented Nov 5, 2021

Can we set more strictDeps?

yes but i'd like to do that in a separate pr after this is merged

@SuperSandro2000
Copy link
Member

I looked through every file and didn't see any obvious code smell. If anything major breaks we will notice it in the staging cycle. Here goes nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants