Skip to content

gittyup: Fix build with GCC 14 - #372123

Merged
FliegendeWurst merged 4 commits into
NixOS:masterfrom
phijor:fix-gittyup-gcc14
Jan 9, 2025
Merged

FliegendeWurst merged 4 commits into
NixOS:masterfrom
phijor:fix-gittyup-gcc14

Conversation

@phijor

@phijor phijor commented Jan 8, 2025 •

Copy link
Copy Markdown
Contributor

The test suite of gittyup depends on a vendored version of a ZIP library (https://github.com/kuba--/zip), and the build breaks when compiled with GCC 14. This is fixed in an unreleased commit (Murmele/Gittyup@d36eba1) upstream.

Fix the build by disabling the test suite. In a future release, the test suite should be re-enabled.

Patch the affected file and leave a note to remove the patch in a future release.

This fixes #371778, and (imo) supersedes #371808. @FliegendeWurst can you try and see if this the build failure you mention in #371808 (comment)?

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

Add a 👍 reaction to pull requests you find important.

@FliegendeWurst FliegendeWurst changed the title gittyup: Disable tests to fix build with GCC 14 gittyup: Disable tests to fix build with GCC 14 Jan 8, 2025
@FliegendeWurst

Copy link
Copy Markdown
Member

I would prefer setting NIX_CFLAGS_COMPILE to -Wno-error=calloc-transposed-args

@github-actions github-actions Bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 8, 2025
@FliegendeWurst

Copy link
Copy Markdown
Member

Build looks mostly good https://paste.fliegendewurst.eu/d4-v4d.log#L2789

I enabled strictDeps by default. Would be good to move cmark to nativeBuildInputs so it doesn't break in that configuration.

@phijor
phijor force-pushed the fix-gittyup-gcc14 branch from 10e68f3 to 62960f5 Compare January 8, 2025 23:41
@phijor phijor changed the title gittyup: Disable tests to fix build with GCC 14 gittyup: Fix build with GCC 14 Jan 8, 2025
@phijor

phijor commented Jan 8, 2025

Copy link
Copy Markdown
Contributor Author

I would prefer setting NIX_CFLAGS_COMPILE to -Wno-error=calloc-transposed-args

I have considered doing this, but instead have decided to simply patch the affected file. That's cleaner than silencing the error. I guess this is also easier to maintain; the patch will likely no longer apply when the next upstream release makes it into nixpkgs, and at that point it can be removed again.

phijor added 2 commits January 9, 2025 11:33
`cmark` is needed to generate documentation at build time.
GCC 14 turns transposed arguments to `calloc()` into an error.  The
affected file has been fixed upstream; patch it here to make things
work until the next release of `gittyup`.
@phijor
phijor force-pushed the fix-gittyup-gcc14 branch from 62960f5 to e029851 Compare January 9, 2025 09:36
@phijor

phijor commented Jan 9, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the review, I included your suggestions.

I'd like to ping a maintainer to merge the package, but I see that it's currently unmaintained. I'm just a casual user of gittyup, would you perhaps like to co-maintain the package?

@FliegendeWurst

Copy link
Copy Markdown
Member

You can add me as maintainer, yes. It doesn't look too troublesome to take care of the package.

You could also add yourself, if you would like to help out with issues and testing updates :)
Even as a casual user your input would be much appreciated.

@phijor

phijor commented Jan 9, 2025

Copy link
Copy Markdown
Contributor Author

You could also add yourself, if you would like to help out with issues and testing updates :) Even as a casual user your input would be much appreciated.

Done! In general I try to maintain less CMake-based projects, but life doesn't always go that way :D I'm happy to help out.

@FliegendeWurst
FliegendeWurst merged commit 57150ec into NixOS:master Jan 9, 2025
@phijor
phijor deleted the fix-gittyup-gcc14 branch January 9, 2025 23:07
@Sigmanificient Sigmanificient mentioned this pull request Mar 8, 2025
27 of 28 tasks
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: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: gittyup

2 participants