Skip to content

mbrola: Fix compilation on Darwin#376876

Merged
bjornfor merged 1 commit intoNixOS:masterfrom
DaGenix:fix-mbrola
Jan 26, 2025
Merged

mbrola: Fix compilation on Darwin#376876
bjornfor merged 1 commit intoNixOS:masterfrom
DaGenix:fix-mbrola

Conversation

@DaGenix
Copy link
Contributor

@DaGenix DaGenix commented Jan 26, 2025

It looks like mbrola hasn't done a release in 6 years or so. In that time, they have a few fixes for compiling on Darwin. However, picking up those changes would require us to start packaging the latest git which is unreleased. I tried grabbing the relevant patches, but they don't seem to apply cleanly. So, instead, I just made some tweaks to the files to get things to compile using substituteInPlace.

The first thing we patch is that the Makefile requests the "O6"
optimization level - which does not exist in gcc or clang - but is an
error in clang.

The second thing is that the project attempts to re-define the "swab"
function from unistd.h. Which maybe was necessary in the past, but now
is an error.

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.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Jan 26, 2025
@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: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 26, 2025
@nix-owners nix-owners bot requested a review from davidak January 26, 2025 03:32
@DaGenix
Copy link
Contributor Author

DaGenix commented Jan 26, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 376876


aarch64-darwin

⏩ 6 packages marked as broken and skipped:
  • phonemizer
  • phonemizer.dist
  • python312Packages.phonemizer
  • python312Packages.phonemizer.dist
  • python313Packages.phonemizer
  • python313Packages.phonemizer.dist
❌ 4 packages failed to build:
  • python313Packages.gruut
  • python313Packages.gruut.dist
  • tts
  • tts.dist
✅ 16 packages built:
  • chickenPackages_5.chickenEggs.espeak
  • ekho
  • espeak (espeak-ng)
  • gruut (python312Packages.gruut)
  • gruut-ipa (python312Packages.gruut-ipa)
  • gruut-ipa.dist (python312Packages.gruut-ipa.dist)
  • gruut.dist (python312Packages.gruut.dist)
  • mbrola
  • piper-phonemize
  • piper-tts
  • python312Packages.piper-phonemize
  • python312Packages.piper-phonemize.dist
  • python313Packages.gruut-ipa
  • python313Packages.gruut-ipa.dist
  • python313Packages.piper-phonemize
  • python313Packages.piper-phonemize.dist

@DaGenix DaGenix mentioned this pull request Jan 26, 2025
13 tasks
Copy link
Contributor

@bjornfor bjornfor left a comment

Choose a reason for hiding this comment

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

LGTM.

Nit: s/liek/like/ typo in commit message.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 26, 2025
It looks like mbrola hasn't done a release in 6 years or so. In that
time, they have a few fixes for compiling on Darwin. However, picking up
those changes would require us to start packaging the latest git which
is unreleased. I tried grabbing the relevant patches, but they don't
seem to apply cleanly. So, instead, I just made some tweaks to the files
to get things to compile using substituteInPlace.

The first thing we patch is that the Makefile requests the "O6"
optimization level - which does not exist in gcc or clang - but is an
error in clang.

The second thing is that the project attempts to re-define the "swab"
function from unistd.h. Which maybe was necessary in the past, but now
is an error.
@DaGenix
Copy link
Contributor Author

DaGenix commented Jan 26, 2025

Thanks, @bjornfor ! I updated the commit message to fix the typo.

@bjornfor
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 376876


x86_64-linux

⏩ 2 packages marked as broken and skipped:
  • piper-train
  • piper-train.dist
❌ 4 packages failed to build:
  • python313Packages.gruut
  • python313Packages.gruut.dist
  • python313Packages.phonemizer
  • python313Packages.phonemizer.dist
✅ 46 packages built:
  • arcan
  • arcan-all-wrapped
  • arcan-wrapped
  • arcan.dev
  • arcan.lib
  • arcan.man
  • calibre
  • cat9-wrapped
  • chickenPackages_5.chickenEggs.espeak
  • durden-wrapped
  • ekho
  • emacsPackages.emacspeak
  • espeak
  • espeakup
  • gruut (python312Packages.gruut)
  • gruut-ipa (python312Packages.gruut-ipa)
  • gruut-ipa.dist (python312Packages.gruut-ipa.dist)
  • gruut.dist (python312Packages.gruut.dist)
  • jogger
  • klavaro
  • local-ai
  • mbrola
  • mob
  • phonemizer (python312Packages.phonemizer)
  • phonemizer.dist (python312Packages.phonemizer.dist)
  • piper-phonemize
  • piper-tts
  • pipeworld-wrapped
  • prio-wrapped
  • python312Packages.espeak-phonemizer
  • python312Packages.espeak-phonemizer.dist
  • python312Packages.piper-phonemize
  • python312Packages.piper-phonemize.dist
  • python313Packages.espeak-phonemizer
  • python313Packages.espeak-phonemizer.dist
  • python313Packages.gruut-ipa
  • python313Packages.gruut-ipa.dist
  • python313Packages.piper-phonemize
  • python313Packages.piper-phonemize.dist
  • speechd
  • tts
  • tts.dist
  • unbook
  • wavebox
  • wordbook
  • xarcan

@bjornfor
Copy link
Contributor

❌ 4 packages failed to build:
* python313Packages.gruut
* python313Packages.gruut.dist
* python313Packages.phonemizer
* python313Packages.phonemizer.dist

Already broken on the base branch.

@bjornfor bjornfor merged commit 479d878 into NixOS:master Jan 26, 2025
24 of 27 checks passed
@DaGenix DaGenix deleted the fix-mbrola branch January 27, 2025 18:11
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: 11-100 This PR causes between 11 and 100 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