Skip to content

flite: fix building with clang + glibc #384700

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

getchoo
Copy link
Member

@getchoo getchoo commented Feb 24, 2025

Fixes #384409

See also:

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.

@getchoo getchoo added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label Feb 24, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux and removed 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related labels Feb 24, 2025
# https://github.com/NixOS/nixpkgs/issues/384409
++ lib.optional (
stdenv.cc.isClang && stdenv.hostPlatform.libc == "glibc"
) ./0001-Remove-defining-const-as-nothing.patch;
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested on gcc & glibc and clang on macOS? #define const is probably something we'd avoid.

Copy link
Member

Choose a reason for hiding this comment

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

Does glibc even support macOS? I do agree on the #define const but it's a patch that's not made the author of this PR and we're "tracking" that patch. Ideally, we'd want to push that concern with the patch with the author of it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Have you tested on gcc & glibc and clang on macOS?

Nope. I'm honestly not familiar with the security ramifications here, so I wanted to just keep the application of this as limited as possible

If it works globally though, I'd be fine having it

@RossComputerGuy
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 384700 --package pkgsLLVM.flite


aarch64-linux

❌ 4 packages failed to build:
  • pkgsLLVM.flite
  • pkgsLLVM.flite.bin (pkgsLLVM.flite.bin.bin, pkgsLLVM.flite.bin.dev, pkgsLLVM.flite.bin.lib)
  • pkgsLLVM.flite.dev (pkgsLLVM.flite.dev.bin, pkgsLLVM.flite.dev.dev, pkgsLLVM.flite.dev.lib)
  • pkgsLLVM.flite.lib (pkgsLLVM.flite.lib.bin, pkgsLLVM.flite.lib.dev, pkgsLLVM.flite.lib.lib)

@RossComputerGuy
Copy link
Member

Fails because #374950

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: pkgsLLVM.flite
4 participants