Skip to content

Low-impact cross fixes, batch 2#33480

Closed
dtzWill wants to merge 14 commits intoNixOS:masterfrom
dtzWill:fix/cross-batch-2
Closed

Low-impact cross fixes, batch 2#33480
dtzWill wants to merge 14 commits intoNixOS:masterfrom
dtzWill:fix/cross-batch-2

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.

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 5, 2018
@bgamari
Copy link
Contributor

bgamari commented Jan 5, 2018

Thank you for doing this!

@joachifm joachifm requested a review from Ericson2314 January 6, 2018 16:11
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.

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.

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.

"--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

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 dtzWill force-pushed the fix/cross-batch-2 branch from 37e5757 to 93aa130 Compare January 7, 2018 17:52
@dtzWill dtzWill force-pushed the fix/cross-batch-2 branch from 93aa130 to f866587 Compare January 7, 2018 17:57
@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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants