festvox / flite

A small fast portable speech synthesis system
Other
859 stars 186 forks source link

2.2: fails to build with make 4.4 #86

Open tgurr opened 1 year ago

tgurr commented 1 year ago

building with make 4.3 works, but started to fail with make 4.4 (https://lists.gnu.org/archive/html/info-gnu/2022-10/msg00008.html) with the following error:

[...]
making in doc ...
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -march=native -O2 -pipe  -I../include  -c -o find_sts_main.o find_sts_main.c
making in tools ...
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -march=native -O2 -pipe  -I../include  -c -o flite_sort_main.o flite_sort_main.c
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -o ../bin/flite_sort flite_sort_main.o -L../build/x86_64-linux-gnu/lib -lflite  -Wl,-O1 -Wl,--as-needed -lm -lpulse-simple -lpulse 
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -o ../bin/find_sts find_sts_main.o -L../build/x86_64-linux-gnu/lib -lflite  -Wl,-O1 -Wl,--as-needed -lm -lpulse-simple -lpulse 
making in main ...
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -march=native -O2 -pipe  -I../include  -c -o flite_main.o flite_main.c
making ../build/x86_64-linux-gnu/lib/libflite.so
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -march=native -O2 -pipe  -I../include  -c -o t2p_main.o t2p_main.c
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -march=native -O2 -pipe  -I../include  -c -o compile_regexes.o compile_regexes.c
x86_64-pc-linux-gnu-cc -march=native -O2 -pipe -Wall     -march=native -O2 -pipe  -I../include  -c -o flitevox_info_main.o flitevox_info_main.c
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/x86_64-linux-gnu/obj//.make_build_dirs] Error 2

complete build.log: flite-2.2-make-4.4-build-error.log

rathann commented 1 year ago

I'm seeing the same on Fedora development branches (F38 and rawhide), which indeed have make-4.4. This seems to be related to the way make processes parallel jobs, because using make -j1 or plain make makes it build fine (though slower). make -j4 fails.

tgurr commented 1 year ago

I'm seeing the same on Fedora development branches (F38 and rawhide), which indeed have make-4.4. This seems to be related to the way make processes parallel jobs, because using make -j1 or plain make makes it build fine (though slower). make -j4 fails.

Thanks for the hint for this workaround for the time being! Working here as well when restricting it to build with -j1.

barsnick commented 1 year ago

I noticed that flite_lang_list.c and flite_voice_list.c are repeatedly being clobbered and built, instead of being built only once as dependencies. (flite_lang_list is a sort-of-dependency.)

In parallel builds, they are not only built multiple times, but are also erased after another thread has built them, resulting in this build failure.

A proper dependency and rule for each should fix this. I'm posting a PR for this.