Skip to content

Low-impact cross fixes#33474

Closed
dtzWill wants to merge 11 commits intoNixOS:masterfrom
dtzWill:fix/cross-batch-1
Closed

Low-impact cross fixes#33474
dtzWill wants to merge 11 commits intoNixOS:masterfrom
dtzWill:fix/cross-batch-1

Conversation

@dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 5, 2018

Motivation for this change

Not exhaustive, but manageable chunk of fixes from #30882 (and a few local ones) that don't cause mass-rebuild.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 5, 2018
@dtzWill dtzWill mentioned this pull request Jan 5, 2018
8 tasks
@dtzWill dtzWill force-pushed the fix/cross-batch-1 branch from f8a138f to b917bd2 Compare January 6, 2018 00:05
@joachifm joachifm requested a review from Ericson2314 January 6, 2018 16:10
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Good after those few things. Thanks!

export lib=$out;
''
;
+ stdenv.lib.optionalString (buildPlatform != hostPlatform)
Copy link
Member

Choose a reason for hiding this comment

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

Let's skip GCC for the moment

# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." release_version));

Copy link
Member

Choose a reason for hiding this comment

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

And also skip llvm


# If architecture-dependent MO files aren't available, they're generated
# during build, so we need gettext for cross-builds.
crossAttrs.nativeBuildInputs = [ gettext buildPackages.stdenv.cc ];
Copy link
Member

Choose a reason for hiding this comment

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

Need to get rid of cross attrs and some other things. I can force push to fix or just skip for now.

'';
};

# Hack: when cross-compiling we need to manually add rpaths to ensure that
Copy link
Member

Choose a reason for hiding this comment

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

No longer need this hack.

# For now the tests are just breaking large swaths of the nixpkgs binary cache for Darwin,
# and I'd rather have everything else work at all than have stronger assurance here.
doCheck = !stdenv.isDarwin;
doCheck = !stdenv.isDarwin && stdenv.buildPlatform == stdenv.hostPlatform;
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't propagate this everywhere. Stdenv should just disable doCheck when cross compiling.

outputs = [ "bin" "dev" "out" "man" "doc" ];

doCheck = true;
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto.

@dtzWill dtzWill force-pushed the fix/cross-batch-1 branch from b917bd2 to 3a1a865 Compare January 7, 2018 17:01
@dtzWill
Copy link
Member Author

dtzWill commented Jan 7, 2018

  • Dropped gcc, llvm commits, per request. Should they go into a separate PR?
  • Dropping libgpg-error commit, I'm not sure what you'd like done. Can you make a PR for this?
  • Dropping libssh2 hack, glad it's not needed :).
  • Rebased onto master since I'm force-pushing anyway

@dtzWill
Copy link
Member Author

dtzWill commented Jan 7, 2018

@dezgeg would you mind if the stdenv doCheck fixes are tackled in a different PR? This was discussed and the consensus seems to be that this is the way to go for now: #30883

As mentioned there, cleanup would be straightforward if we find and agree on how to better handle this.

(I agree it's annoying to propagate in the meantime)

@dezgeg
Copy link
Contributor

dezgeg commented Jan 7, 2018

No, I really think that pattern shouldn't spread to everywhere in nixpkgs.

@dtzWill dtzWill force-pushed the fix/cross-batch-1 branch from 3a1a865 to 29e8c66 Compare January 7, 2018 17:45
@dtzWill
Copy link
Member Author

dtzWill commented Jan 7, 2018

Dropping perl-cross, needs some work (not being critical, but it's just not incomplete and doesn't work yet).

Thought it did work, perhaps something it needs got lost in some shuffling, will pull it out.

@Ericson2314
Copy link
Member

Ok the permenant solution I want for doCheck is a mass rebuild, but I can dig up a non-mass-rebuild rebuild for now.

@dtzWill
Copy link
Member Author

dtzWill commented Jan 7, 2018

@Ericson2314 if you could revive that it'd be great!

@dtzWill dtzWill closed this Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants