flite fails to build on core-updates

  • Done
  • quality assurance status badge
Details
One participant
  • Simon South
Owner
unassigned
Submitted by
Simon South
Severity
normal

Debbugs page

Simon South wrote 1 years ago
(address . bug-guix@gnu.org)
877ckssp6f.fsf@simonsouth.net
On core-updates (4d1436b0ea65) the flite package is failing to build,
with log output like

making ../build/aarch64-linux-gnu/lib/libflite.so
make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'. Stop.
make[1]: *** Waiting for unfinished jobs....
make: *** [config/common_make_rules:133: build/aarch64-linux-gnu/obj//.make_build_dirs] Error 2

This is caused by the upgrade to make 4.4 along with what appears to be
an error in one of the project's makefiles.

The workaround is to build flite with parallel build jobs disabled,
using e.g. "./pre-inst-env guix build --cores=1 flite".

The underlying issue appears to be a misuse of the ".NOTPARALLEL"
special make target in the project's main/Makefile. Changing line 107
from

.NOTPARALLEL: $(ALL)

to simply

.NOTPARALLEL:

solves the problem: The entire project builds in parallel except for
targets in the "main" subfolder, which are built serially instead.
(These targets have to be built serially as they delete and re-create
the same "flite_voice_list.o" object file in different ways.)

With make versions 4.3 and earlier any prerequisites specified for
".NOTPARALLEL" ("$(ALL)" as shown above) were ignored, and make would
unconditionally build all remaining targets in series.

With make 4.4 this behaviour has changed and the prerequisites list is
now honoured. However, this doesn't specify a list of targets to build
serially, as it seems the flite authors expected. Rather,

If the .NOTPARALLEL special target has prerequisites, then each of
those prerequisites will be considered a target and all prerequisites
of these targets will be run serially.[0]

That is, it is the _prerequisites_ of the specified targets and not the
targets themselves that are built serially. The targets themselves may
still be built in parallel, which is how the upgrade to make 4.4 has
caused this problem to appear.

I'll add for completeness that getting clever and changing the makefile
with something like

notparallel: $(ALL)
.NOTPARALLEL: notparallel

doesn't work, as (for one reason or another) this doesn't sufficiently
protect the targets from clobbering one another.

--
Simon South
simon@simonsouth.net

Simon South wrote 1 years ago
(address . 68195@debbugs.gnu.org)
875y0cmyt2.fsf@simonsouth.net
I am of course looking into submitting a patch for this upstream, but
it's not clear how this might be done: The project's GitHub
repository[0] has seen no activity since August 2022, shortly after the
project's maintainer, Dr. Alan W. Black, retired from his position at
CMU.

I've sent an email to Dr. Black asking whether and how a patch might be
accepted.

--
Simon South
simon@simonsouth.net

Simon South wrote 1 years ago
[PATCH core-updates 0/1] gnu: flite: Fix build.
cover.1705157474.git.simon@simonsouth.net
Here's a patch that allows flite, a lightweight speech-synthesis engine, to
build in core-updates, by applying a small patch to one of its makefiles as
outlined in an earlier email[0].

I've tested this on AArch64 and x86-64 and everything seems fine.

Note I haven't received a response from Dr. Black in almost two weeks' time,
and my email asking to join the festival-talk mailing list[1] has bounced, so
it appears flite may be unmaintained at the moment.

--
Simon South
simon@simonsouth.net




Simon South (1):
gnu: flite: Fix build.

gnu/local.mk | 1 +
.../patches/flite-build-with-make-4.4.patch | 24 +++++++++++++++++++
gnu/packages/speech.scm | 3 ++-
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/flite-build-with-make-4.4.patch


base-commit: a3ae833227a284fbcfbb813b1156d0e8aeeb29d1
--
2.41.0
Simon South wrote 1 years ago
[PATCH core-updates 1/1] gnu: flite: Fix build.
01a83cb58c5a3e705670ad71887811b1115f19a1.1705157474.git.simon@simonsouth.net
* gnu/packages/patches/flite-build-with-make-4.4.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/speech.scm (flite)[source]: Apply it.

Change-Id: I263696c9571e2bcf97d5a4fc619124bce90d6799
---
gnu/local.mk | 1 +
.../patches/flite-build-with-make-4.4.patch | 24 +++++++++++++++++++
gnu/packages/speech.scm | 3 ++-
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/flite-build-with-make-4.4.patch

Toggle diff (58 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index c1833cd0dd..9b2957c9cb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1185,6 +1185,7 @@ dist_patch_DATA = \
%D%/packages/patches/flann-cmake-3.11.patch \
%D%/packages/patches/flatpak-fix-path.patch \
%D%/packages/patches/flatpak-unset-gdk-pixbuf-for-sandbox.patch \
+ %D%/packages/patches/flite-build-with-make-4.4.patch \
%D%/packages/patches/fluxbox-1.3.7-no-dynamic-cursor.patch \
%D%/packages/patches/fluxbox-1.3.7-gcc.patch \
%D%/packages/patches/fontconfig-cache-ignore-mtime.patch \
diff --git a/gnu/packages/patches/flite-build-with-make-4.4.patch b/gnu/packages/patches/flite-build-with-make-4.4.patch
new file mode 100644
index 0000000000..d959bb73a5
--- /dev/null
+++ b/gnu/packages/patches/flite-build-with-make-4.4.patch
@@ -0,0 +1,24 @@
+Building flite with GNU Make 4.4 or newer fails with log messages like
+
+ making in main ...
+ gcc -g -O2 -Wall -I../include -c -o flitevox_info_main.o flitevox_info_main.c
+ making ../build/aarch64-linux-gnu/lib/libflite.so
+ make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'. Stop.
+
+This is due to a change in how the .NOTPARALLEL special make target is
+interpreted. This patch causes the package to build as it did with earlier
+versions of Make.
+
+diff --git a/main/Makefile b/main/Makefile
+index 8166182..e5ba866 100644
+--- a/main/Makefile
++++ b/main/Makefile
+@@ -104,7 +104,7 @@ else
+ shared_libs: nothing
+ endif
+
+-.NOTPARALLEL: $(ALL)
++.NOTPARALLEL:
+
+ flite_lang_list:
+ rm -f flite_lang_list.c
diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 2ea8e4f64f..4009da9654 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -67,7 +67,8 @@ (define-public flite
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1n0p81jzndzc1rzgm66kw9ls189ricy5v1ps11y0p2fk1p56kbjf"))))
+ (base32 "1n0p81jzndzc1rzgm66kw9ls189ricy5v1ps11y0p2fk1p56kbjf"))
+ (patches (search-patches "flite-build-with-make-4.4.patch"))))
(build-system gnu-build-system)
(arguments
;; XXX:
--
2.41.0
Simon South wrote 1 years ago
control message for bug #68195
(address . control@debbugs.gnu.org)
87wmsdz2qt.fsf@simonsouth.net
tags 68195 + patch
quit
Simon South wrote 1 years ago
Re: bug#68195: flite fails to build on core-updates
(address . 68195-done@debbugs.gnu.org)
87bk92onlj.fsf@simonsouth.net
This was obsoleted by commit 5528123265f9, "gnu: flite: Disable parallel
build."

--
Simon South
simon@simonsouth.net
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 68195@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68195
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help