Skip to content

Comments

bear: fix#238531

Closed
emilazy wants to merge 2 commits intoNixOS:masterfrom
emilazy:fix-bear
Closed

bear: fix#238531
emilazy wants to merge 2 commits intoNixOS:masterfrom
emilazy:fix-bear

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Jun 19, 2023

Description of changes

The previous build system patch was incomplete and left the wrapper.d directory empty, leaving Bear unable to pick up any build commands at all and breaking the functional test suite, which we also weren't running. Switch to overriding CMake flags instead and add the patches and dependencies necessary to get the functional tests running to prevent a future regression.

I've checked that the instructions in Nix's doc/manual/src/contributing/hacking.md work after this change, which is what started this yak shave in the first place.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

The previous build system patch was incomplete and left the `wrapper.d`
directory empty, leaving Bear unable to pick up any build commands
at all and breaking the functional test suite, which we also weren't
running. Switch to overriding CMake flags instead and add the patches
and dependencies necessary to get the functional tests running to
prevent a future regression.

I've checked that the instructions in Nix's
`doc/manual/src/contributing/hacking.md` work after this change,
which is what started this yak shave in the first place.
@emilazy
Copy link
Member Author

emilazy commented Jun 19, 2023

Adding backport labels back to 22.11, because that's the version that Nix's flake pins to and it's awkward for Nix's hacking instructions to not work because of a package bug.

@ofborg ofborg bot requested review from alyssais and babariviere June 19, 2023 08:29
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 19, 2023
Copy link
Member

@Atemu Atemu left a comment

Choose a reason for hiding this comment

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

LGTM

@emilazy
Copy link
Member Author

emilazy commented Jun 19, 2023

Looks like some of the LD_PRELOAD tests fail on Linux. I will try to take a look. My guess is they're failing because of Nix wrappers adding additional unexpected exec calls or similar.

@figsoda figsoda added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 19, 2023
@emilazy
Copy link
Member Author

emilazy commented Jun 20, 2023

I fixed the majority of the Linux test case failures but there are a few remaining ones relating to arcane LD_PRELOAD interception stuff. I will try to see if I can get them fixed soon.

@zombiezen
Copy link
Member

As a casual observer who has also encountered the problems with the wrapper.d directory being empty, I hacked out a gist based on this PR.

My only real contribution here is that for cross-compiling, the tests should probably be separated out from the build phase. Bear doesn't make it easy though, and I don't think I even got it working right, but for my own purposes, I don't care about the tests passing. Hope this is helpful.

@AndersonTorres
Copy link
Member

@emilazy ping

@DieracDelta
Copy link
Member

DieracDelta commented Jan 2, 2024

Any chance we could merge this, and fix any remaining tests later? The bear on @emilazy's fork works significantly better for me than what's currently in nixpkgs.

@Atemu
Copy link
Member

Atemu commented Jan 2, 2024

This needs a rebase as bear has been marked as broken on Darwin since.

@DieracDelta
Copy link
Member

DieracDelta commented Jan 5, 2024

How can we move this forward? I'm happy do the rebase but I don't have perms to push to @emilazy 's branch. I can open a separate PR if useful.

@Atemu
Copy link
Member

Atemu commented Jan 5, 2024

Go right ahead, I don't think @emilazy would mind.

@DieracDelta DieracDelta mentioned this pull request Jan 5, 2024
13 tasks
@SuperSandro2000
Copy link
Member

Closing in favor of #279035

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-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants