fricas icon indicating copy to clipboard operation
fricas copied to clipboard

xvfb-run not working (cannot build remotely)

Open jwaldmann opened this issue 4 years ago • 3 comments

Hi. I am compiling from source, on Fedora GNU/Linux (F33, F34 beta), on a remote machine. The build is stuck at

...
unset DAASE; HTPATH=.; export HTPATH; \
  FRICAS_INITFILE='' xvfb-run -a -n 0 -s '-screen 0 1024x768x24' /home/waldmann/software/cas/fricas/target/x86_64-linux-gnu/bin/sman -noihere -paste coverex.ht
...
parsing: Menuexplot2d
writing:	draw(sin(tan(x)) - tan(sin(x)),x = 0..6)
Invalid MIT-MAGIC-COOKIE-1 keyCould not open the display.
viewman could not read from a 2D viewport window
code=-1
ack=0

I can fix that with

diff --git a/configure.ac b/configure.ac
index fc49c423..b4dccaa8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -731,7 +731,7 @@ if test x"$fricas_has_xpm" = xyes; then
                     AC_CHECK_PROGS([XVFB_RUN], [xvfb-run])
                     if test -n "$XVFB_RUN"; then
                         MAYBE_VIEWPORTS=viewports
-                        XVFB="xvfb-run -a -n 0 -s '-screen 0 1024x768x24'"
+                        XVFB="xvfb-run -a -s '-screen 0 1024x768x24'"
                     else
                         AC_MSG_NOTICE([HyperDoc graphics must be built separately.])
                     fi

jwaldmann avatar Apr 05 '21 19:04 jwaldmann

Honestly, I wonder why removing "-n 0" would make a difference. With "-a" xvfb-run tries to get a free server number. I suspect, that this problem is an instance of a race-condition in a parallel build. Or can you reproduce it? @hebisch Waldek, you have suggested the "-n 0" here. https://www.mail-archive.com/[email protected]/msg13779.html Any deep reason or can it go away if this is not a race condition?

hemmecke avatar Apr 05 '21 21:04 hemmecke

race condition

that's possible, I use make -j8 (or whatever) habitually. I will check again.

jwaldmann avatar Apr 05 '21 21:04 jwaldmann

On Mon, Apr 05, 2021 at 02:00:58PM -0700, Ralf Hemmecke wrote:

Honestly, I wonder why removing "-n 0" would make a difference. With "-a" xvfb-run tries to get a free server number. I suspect, that this problem is an instance of a race-condition in a parallel build. Or can you reproduce it? @hebisch Waldek, you have suggested the "-n 0" here. @.***/msg13779.html Any deep reason or can it go away if this is not a race condition?

I do not remember any deep reason. One possible justification is to have more reproducible build. Note that my suggestion in the mail was to have single instance of 'xvfb-run'. But now build tries to start multiple instances of 'xvfb-run', due to this I would expect problems.

-- Waldek Hebisch

hebisch avatar Apr 14 '21 21:04 hebisch