unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon South <simon@simonsouth.net>
To: 68195@debbugs.gnu.org
Subject: bug#68195: flite fails to build on core-updates
Date: Mon, 01 Jan 2024 16:45:44 -0500	[thread overview]
Message-ID: <877ckssp6f.fsf@simonsouth.net> (raw)

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

[0] https://www.gnu.org/software/make/manual/html_node/Parallel-Disable.html




             reply	other threads:[~2024-01-01 21:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-01 21:45 Simon South [this message]
2024-01-01 23:14 ` bug#68195: flite fails to build on core-updates Simon South
2024-01-13 15:09 ` bug#68195: [PATCH core-updates 0/1] gnu: flite: Fix build Simon South
2024-01-13 15:10   ` bug#68195: [PATCH core-updates 1/1] " Simon South
2024-01-30 15:19 ` bug#68195: flite fails to build on core-updates Simon South

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ckssp6f.fsf@simonsouth.net \
    --to=simon@simonsouth.net \
    --cc=68195@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).