From c39696bee3548ade5e90676758213bdb6304aea5 Mon Sep 17 00:00:00 2001 From: Kevin Lenzo Date: Thu, 8 Jan 2026 14:00:06 -0500 Subject: [PATCH 1/2] Fix race conditions in make -jN --- Makefile | 6 ++++++ src/Makefile | 3 +++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 0dfaae6..2e34c6d 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,12 @@ system_dummy := $(shell $(MAKE) -C $(TOP)/config -f make_system.mak TOP=.. syste include $(TOP)/config/common_make_rules +# Ensure proper build order for parallel make (fixes race conditions) +# bin depends on src (for executables) and examples (for text2wave script) +bin: src examples +# doc depends on src (for festival executable to generate documentation) +doc: src + default_voices: ./src/scripts/default_voices.sh diff --git a/src/Makefile b/src/Makefile index 71ff7bc..d048cfc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -46,6 +46,9 @@ ALL = .sub_directories include $(TOP)/config/common_make_rules +# Ensure main waits for library directories to complete (fixes parallel make race condition) +main: arch modules + tags: @ rm -f $(TOP)/FileList @ $(MAKE) --no-print-directory file-list From dc66339600f55c019238a910eabdb29677636dc1 Mon Sep 17 00:00:00 2001 From: Kevin Lenzo Date: Thu, 8 Jan 2026 14:04:07 -0500 Subject: [PATCH 2/2] Update to work with C++17 but still back to C++11 --- src/arch/festival/server.cc | 2 +- src/modules/clunits/acost.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/arch/festival/server.cc b/src/arch/festival/server.cc index 2ec6c6e..8fc47b5 100644 --- a/src/arch/festival/server.cc +++ b/src/arch/festival/server.cc @@ -122,7 +122,7 @@ int festival_start_server(int port) serv_addr.sin_port = htons(port); serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); - if (bind(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) + if (::bind(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) { cerr << "socket: bind failed" << endl; festival_error(); diff --git a/src/modules/clunits/acost.cc b/src/modules/clunits/acost.cc index d12ca9c..a18a479 100644 --- a/src/modules/clunits/acost.cc +++ b/src/modules/clunits/acost.cc @@ -46,6 +46,7 @@ /* */ /*=======================================================================*/ #include +#include #include "festival.h" #include "clunits.h" @@ -196,7 +197,7 @@ static void cumulate_ss_frames(EST_Track *a,EST_SuffStats *ss_frames) for (j=0; j < a->num_channels(); j++) { p = a->a_no_check(i,j); - if (!finite(p)) + if (!std::isfinite(p)) { p = 1.0e5; a->a_no_check(i,j) = p;