Skip to content

Conversation

@drawbu
Copy link
Member

@drawbu drawbu commented Mar 22, 2025

Disable check for the NEED_WAIT_H macro to always include <sys/wait.h> as it fails otherwise with gcc14 and newer compilers.

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.

Disable check for the NEED_WAIT_H macro to always include <sys/wait.h>
as it fails otherwise with gcc14 and newer compilers.
@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 22, 2025
@drawbu
Copy link
Member Author

drawbu commented Mar 22, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 392102


x86_64-linux

✅ 2 packages built:
  • elvis
  • elvis.man

@drawbu drawbu marked this pull request as ready for review March 22, 2025 15:45
Copy link
Contributor

@0xda157 0xda157 left a comment

Choose a reason for hiding this comment

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

Can confirm that it fails to compile before this pr and this pr fixes it.

@0xda157 0xda157 added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 23, 2025
@haylinmoore
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 392102

Logs: https://github.com/haylinmoore/nixpkgs-review-gha/actions/runs/14286624579


x86_64-linux

✅ 2 packages built:
  • elvis
  • elvis.man

aarch64-linux

✅ 2 packages built:
  • elvis
  • elvis.man

x86_64-darwin

❌ 2 packages failed to build:
  • elvis
  • elvis.man

aarch64-darwin

❌ 2 packages failed to build:
  • elvis
  • elvis.man

@haylinmoore
Copy link
Contributor

Could it make sense to add a substituteInPlace for osunix/tcaphelp.c to fix it working on darwin at the same time?

osunix/tcaphelp.c:135:6: error: call to undeclared function 'ioctl'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> 135 | if (ioctl(ttyscr, TIOCGWINSZ, &size) >= 0)
> |

@drawbu drawbu self-assigned this Apr 11, 2025
@pbsds
Copy link
Member

pbsds commented Apr 19, 2025

linux was broken by gcc14 https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.elvis.x86_64-linux, but darwin has been broken for a long time, https://hydra.nixos.org/job/nixpkgs/trunk/elvis.x86_64-darwin and i assume -Wimplicit-function-declaration could be the tip of the iceberg, hence in scope for a separate PR

@pbsds pbsds merged commit 3785353 into NixOS:master Apr 19, 2025
48 checks passed
@pbsds
Copy link
Member

pbsds commented Apr 19, 2025

i was right, even with

  # linux pkgsLLVM.elvis builds fine
  env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
    NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
      "-std=c11"
      "-Wno-error=implicit-function-declaration"
      "-Wno-error=implicit-int"
      # shush
      "-Wno-deprecated-non-prototype"
      "-Wno-pointer-to-int-cast"
    ];
  };

i still get https://gist.github.com/pbsds/3d44d6d151584f2abe899fd1d165c31e, i don't know darwin that well so i'll leave it for those interested in darwin to figure it out

@pbsds pbsds mentioned this pull request Apr 19, 2025
13 tasks
@drawbu drawbu deleted the fix-elvis-build branch June 16, 2025 18:59
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.

4 participants