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

Run 'make installcheck' again #8005

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented Mar 8, 2023

Motivation

This happened because the check for the existence of the 'installcheck' target failed silently, so the whole phase got skipped. It works by running 'make -n installcheck 2> /dev/null', which however barfs with

/nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld.gold: error: cannot open tests/plugins/plugintest.o: No such file or directory

Fixes #8004.

Context

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

This was failing because the check for the existence of the
'installcheck' target failed silently, so the whole phase got
skipped. It works by running 'make -n installcheck 2> /dev/null',
which however barfs with

  /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld.gold: error: cannot open tests/plugins/plugintest.o: No such file or directory

Fixes NixOS#8004.
@edolstra edolstra enabled auto-merge March 8, 2023 13:48
@Ericson2314
Copy link
Member

Wow, and I thought this was just some weirdness on my local machine.

@@ -383,6 +383,7 @@

doInstallCheck = finalAttrs.doCheck;
installCheckFlags = "sysconfdir=$(out)/etc";
installCheckTarget = "installcheck"; # work around buggy detection in stdenv
Copy link
Member

Choose a reason for hiding this comment

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

Is there a Nixpkgs issue for this stdenv buggy detection?

Copy link
Member

Choose a reason for hiding this comment

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

Good question, FWIW I had trouble reproducing it locally.

Copy link
Member

Choose a reason for hiding this comment

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

Not answering your question, but I suspect from past discussions that it's from this + which breaks make -n (because that's magic for “recursive make” and make executes these rules regardless of -n)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it's indeed the + that forces make -n to execute the command anyway. I don't understand why it's there in the first place...

Copy link
Member

Choose a reason for hiding this comment

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

Oh huh. Good eye. That's very spooky magic...

Copy link
Member

Choose a reason for hiding this comment

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

Sounds like some future work may be to remove the + and see what breaks, since it's unknown and can cause subtle breakage itself 👀

Copy link
Member

Choose a reason for hiding this comment

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

Quick blame shows it was introduced (and discussed) here: 2799fe4 (#5813)

Copy link
Member

Choose a reason for hiding this comment

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

Or we just NixOS/rfcs#132 😀

Copy link
Member

Choose a reason for hiding this comment

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

2799fe4#r1099608721

Oh that's very interesting. And arguably Ninja and the LTO stuff should use same jobserver things too so my Meson joke is not the full story.

I wonder if the variable can just expand to put in the + or that doesn't work.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if the variable can just expand to put in the + or that doesn't work.

Google tells me that we might be able to hack our way out. But that's quite nasty.

@github-actions
Copy link

github-actions bot commented Mar 8, 2023

Successfully created backport PR for 2.14-maintenance:

@edolstra edolstra deleted the run-installcheck branch March 8, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI doesn't run tests
4 participants