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, batch 2 #33480

Closed
wants to merge 14 commits into from
Closed

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 5, 2018

Motivation for this change

Next batch in spirit of #33474 (picked from #30882).

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.

@bgamari
Copy link
Contributor

bgamari commented Jan 5, 2018

Thank you for doing this!

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.

Just need to check with @bgamari on that one thing bit then we are good.

@@ -17,7 +17,7 @@ let
hardeningEnable = [ "pie" ];
installPhase = ''
mkdir -p $out/bin
gcc -Wall -O2 -DWRAPPER_DIR=\"${parentWrapperDir}\" \
${pkgs.stdenv.cc.targetPrefix}cc -Wall -O2 -DWRAPPER_DIR=\"${parentWrapperDir}\" \
Copy link
Member

Choose a reason for hiding this comment

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

Can use $CC I'd assume? @bgamari

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh, fair point.

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

configureFlags = stdenv.lib.optional stdenv.isArm "--disable-arm-iwmmxt";

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.

Again stdenv should be changed to cope with this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should it? It's not clear to me that stdenv should dictate this.

@@ -28,6 +28,7 @@ stdenv.mkDerivation rec {
"--with-logpath=/var/log/sudo.log"
"--with-iologdir=/var/log/sudo-io"
"--with-sendmail=${sendmailPath}"
"--enable-tmpfiles.d=no"
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed it could use a comment. I'll have to revert it to recall why this was necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Dropping-- presumably this is forcing the expect value so as to avoid performing a cross-unfriendly check. Perl is on the path to sudo and so perhaps this should be revisited once perl works.

{
outputs = [ "out" "devdoc" ];

doCheck = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Again for stdenv to handle.

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.

Few more catches.

configureFlags =
[ "--with-ssl=${openssl.dev}" "--with-gc=${boehmgc.dev}" ]
++ optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"ac_cv_func_setpgrp_void=yes"
Copy link
Member

Choose a reason for hiding this comment

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

While we're checking things. I found I needed a lot less of these configure test overrides than @bgamari, so maybe pull this out initially?



configureFlags =
stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_malloc_0_nonnull=yes" ];
Copy link
Member

Choose a reason for hiding this comment

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

Same might not be needed

@@ -5,6 +5,7 @@ stdenv.mkDerivation {

src = kernel.src;

nativeBuildInputs = [ gettext ];
buildInputs = [ coreutils pciutils gettext ];
Copy link
Member

Choose a reason for hiding this comment

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

Gettext need not be build input, I'd think?

@Ericson2314
Copy link
Member

@dtzWill do you have hydra access? It would make testing whether some of those changes are needed far easier

@dtzWill
Copy link
Member Author

dtzWill commented Jan 7, 2018

@Ericson2314 nope, no Hydra access.

Testing is difficult--many of these packages can't be built even after these changes since they depend on packages that required mass-rebuilds to fix. Hmm.

Do you know if you two were testing on the same set of cross configurations?

@Ericson2314
Copy link
Member

@dtzWill mmm. then let's just land without any configure test overrides, and assume will need to more later. The idea is these PRs will land the changes we're sure we need, and then later we will land anything else we end up needing.

Sorry landing these things is so complicated!

@dtzWill
Copy link
Member Author

dtzWill commented Jan 7, 2018

No worries, thanks for working with me on this. And the reviewers 👍.

I'll think how to best proceed, probably nuking both of these PR's and pulling out things that are less "controversial".

I think the current guidelines are something like:

  1. Doesn't induce a mass-rebuild for non-cross (these should be sent to staging, separately)

2a) On the build-frontier for cross-compilation as currently shown by Hydra
or
2b) trivial/minor/"obvious" such as fixing incorrect use of nativeBuildInputs

... sound good?

@dtzWill
Copy link
Member Author

dtzWill commented Jan 7, 2018

For example, the pkg-config fix satisfies 2a but probably not 2b and as a result is possible for reviewers to try out and inspect.

@dtzWill dtzWill closed this Jan 7, 2018
@Ericson2314
Copy link
Member

@dtzWill Well if it's on the build frontier (I think by which you mean we can build all deps just not it, good term :)) then it's fine if it's a bit weirder, as we can actually confirm the weirdness is needed.

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