Skip to content

nano: unbreak on darwin#417500

Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom
ryand56:nano/unbreak-darwin
Jun 17, 2025
Merged

nano: unbreak on darwin#417500
Aleksanaa merged 1 commit intoNixOS:masterfrom
ryand56:nano/unbreak-darwin

Conversation

@ryand56
Copy link
Member

@ryand56 ryand56 commented Jun 17, 2025

#417495

Fixes an issue with format string is not a string literal breaking nano on Darwin.
https://hydra.nixos.org/build/300187289/nixlog/1

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@ryand56 ryand56 changed the title nano: unbreak on aarch64-darwin nano: unbreak on darwin Jun 17, 2025
@ryand56 ryand56 force-pushed the nano/unbreak-darwin branch from fa791b3 to c7a6170 Compare June 17, 2025 10:36
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jun 17, 2025
@ryand56
Copy link
Member Author

ryand56 commented Jun 17, 2025

cc @ngn999 @trofi

@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jun 17, 2025
Copy link
Member

Choose a reason for hiding this comment

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

isDarwin or isClang

Copy link
Member

Choose a reason for hiding this comment

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

No, I mean whether this should be isDarwin or isClang

Copy link
Member Author

@ryand56 ryand56 Jun 17, 2025

Choose a reason for hiding this comment

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

Oh, my bad. This should be isDarwin as the failures happen specifically on those platforms. Though, I haven't tested clang

Copy link
Member

Choose a reason for hiding this comment

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

This should be isDarwin as the failures happen specifically on those platforms.

It's not enough. We have some packages that need to be built with clang, and some attempts are using clang as the default compiler. I hope we can always try to find the root cause instead of just turning off the error check when it appears.

@ryand56 ryand56 force-pushed the nano/unbreak-darwin branch 2 times, most recently from 66907dc to c7a6170 Compare June 17, 2025 11:30
@Aleksanaa
Copy link
Member

Aleksanaa commented Jun 17, 2025

https://fossies.org/diffs/gettext/0.23_vs_0.23.1/gettext-tools/gnulib-lib/openat-die.c-diff.html

This is probably fixing the issue. As a workaround, hardeningDisable should be turned on unconditionally.

Fixes an issue with `format string is not a string literal` breaking nano on Darwin.
https://hydra.nixos.org/build/300187289/nixlog/1
@ryand56 ryand56 force-pushed the nano/unbreak-darwin branch from c7a6170 to acfc0b3 Compare June 17, 2025 11:59
@ryand56
Copy link
Member Author

ryand56 commented Jun 17, 2025

I've turned on hardeningDisable unconditionally for now. Hopefully, this will be good as a temporary workaround.
Edit: gettext has an update in #405793

@Aleksanaa
Copy link
Member

Still don't know why this is popping up.

Since 25.05,

  • Default clang version on macOS hasn't changed
  • nano hasn't been updated or modified
  • gettext hasn't been updated

Why nano builds succeeded on 25.05?

@ryand56
Copy link
Member Author

ryand56 commented Jun 17, 2025

What really confuses me is why it broke now, it worked fine a week ago..
Edit: Oh wait, nano was updated recently 🤦‍♂️

@Aleksanaa
Copy link
Member

And last staging-next PR #412425 hasn't been merged yet

@trofi
Copy link
Contributor

trofi commented Jun 17, 2025

My guess would be that nano itself updated it's bundled gnulib version and that is not very compatible with darwin and format hardening.

@github-actions github-actions bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 17, 2025
@Aleksanaa
Copy link
Member

--------- Report for 'aarch64-darwin' ---------
1 package marked as broken and skipped:
debian-devscripts

15 packages built:
cabal2nix cvs cvs-fast-export cvs2svn cvs2svn.dist cvsps cvsq luarocks-packages-updater luarocks-packages-updater.dist nano nano.info nix-prefetch-cvs nix-prefetch-scripts nix-update-source nix-update-source.dist

@Aleksanaa Aleksanaa merged commit 239b64f into NixOS:master Jun 17, 2025
15 of 17 checks passed
@Aleksanaa
Copy link
Member

Yes, it's bundled. nano-8.4/lib/openat-die.c

@ryand56 ryand56 deleted the nano/unbreak-darwin branch June 17, 2025 18:09
@deftdawg deftdawg mentioned this pull request Jun 18, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages 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.

3 participants