On 4/26/24 18:23, Qian Yun wrote:


On 4/26/24 06:00, Waldek Hebisch wrote:

There is some problem with this.  On my machine I got faulty
'TEXTFILE.tex', it contained '\begin{noOutputXtc}' but no
matching end part, causing documentaion build failure.

This does not always happen, and sometimes happen to other
tmp/*tex file.  The problem is that this TeX file missing
a few last lines.

This commit changes the processing of input->spool->tex from
interpsys to fricas (with sman).  So I guess it is caused by
some buffering issues/race condition related to sman?

This can be workaround by adding a few "--" lines by
htex2input.awk.


More findings:

It seems that I can't reproduce this "missing final lines"
problem in single process environment.

So it seems like this doesn't happen when building book
with "make -j1".

Anyway, the attached patch make the generation of
input->spool->tex to use XVFB+sman only when needed.

Now I tested build with multiple processes many times
and encounter no failure.

- Qian

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/c7421509-bf38-42b2-a71c-0b9591cb397e%40gmail.com.
diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index 0d4fa41a..74059d6b 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -632,9 +632,15 @@ ${HTEX_FILES_INPUT}: tmp/%.input: ${htexsrcdir}/%.htex
 HTEX_FILES_SPOOL = ${patsubst %, tmp/%.spool, ${HTEX_FILES}}
 ${HTEX_FILES_SPOOL}: tmp/%.spool: tmp/%.input
 	${MKDIR_P} tmp
-	(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
-		echo ')read $<' | FRICAS_INITFILE='' ${XVFB} \
-		${FRICAS}/bin/fricas -noht -noclef > $@)
+	if grep "^write.*postscript" $<; then \
+		(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
+			echo ')read $<' | FRICAS_INITFILE='' ${XVFB} \
+			${FRICAS}/bin/fricas -noht -noclef > $@); \
+	else \
+		(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
+			echo ')read $<' | FRICAS_INITFILE='' \
+			${FRICAS}/bin/fricas -nosman > $@); \
+	fi
 
 HTEX_FILES_TEX = ${patsubst %, tmp/%.tex, ${HTEX_FILES}}
 ${HTEX_FILES_TEX}: tmp/%.tex: tmp/%.spool

Reply via email to