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

Low-impact cross fixes #33474

Closed
wants to merge 11 commits into from
Closed

Low-impact cross fixes #33474

wants to merge 11 commits into from

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.

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!

@@ -314,7 +314,44 @@ stdenv.mkDerivation ({
+ stdenv.lib.optionalString (langJava || langGo) ''
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

@@ -27,6 +28,17 @@ let
# 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

@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {

# 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.

@@ -29,6 +29,14 @@ stdenv.mkDerivation rec {
'';
};

# 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.

@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
# These should be turned back on, but see https://github.com/NixOS/nixpkgs/issues/23651
# 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.

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {

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
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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants