Building with Travis CL

I am running Jenkins, which had no problem on Mac and Windows virtual machines, but the linux it wouldn’t run.
I installed xvfb after posting and added the xvfb-run call, that @jamiebullock posted, so that works now.

I still feel for a tool I would prefer not to depend on an xserver, but for the moment it’s fine. I just would love to understand, what makes the Projucer with almost 20 command line options relying on a GUI.

Actually it is not really working:
It works once, but I have more than one projects that I want to build, and the identical call fails for the second project. Is there a limitation on xvfb-run?

+ xvfb-run JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave VideoPlayer/VideoPlayer.jucer
JUCE v5.4.3

**********************************************************
Projucer 5.4.3  ---  Build date: Jun 10 2019
Log started: 10 Jun 2019 2:02:24pm

Linux
CPU: 3702MHz  Cores: 8  32045MB
Loading project: /var/lib/jenkins/workspace/Video-Linux_feature_jenkins/VideoPlayer/VideoPlayer.jucer
+ xvfb-run JUCE/extras/Projucer/Builds/LinuxMakefile/build/Projucer --resave VideoEditor/VideoEditor.jucer
xvfb-run: error: Xvfb failed to start

What’s your Jenkins running on?

Ubuntu 18.04.2 LTS

My problem is not so much about having the XServer installed, but to configure jenkins to use/access it. I had the same problem with pluginval in the mac/windows instances as well…

And that doesn’t have X11 running by default?

sorry, was still editing… yes it has

I’m not sure I understand the problem then.
I’ve never actually run a Ubuntu 18 Jenkins system but I have set up several Ubuntu 16 Jenkins systems and I never had to explicitly start X or run xvfb to get the PJ to resave projects?

Well, I can only say lucky you.
I installed jenkins using this recipe: https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-18-04

And set up a multibranch pipeline just standard, but the command I wrote earlier (Projucer --resave foo.jucer) fails with “Couldn’t connect to display”, and it is able to perform once using the xvfb-run, but fails, if I call it twice.

It could also be, because those two projects are parallel stages… maybe xvfb-run needs to be called sequential… I will try removing the parallel…

Reporting back, removing the parallel build fixes the issue. Calling two instances of xvfb-run in parallel seemed to be the culprit.

So in order to be able to build in parallel, and out of curiosity:
What is it, that makes Projucer CLI not able to run without a display?

JUCE uses X’s event loop. So it’s not really a “display” that’s required, just the event loop bit.

Thanks @t0m, I looked a bit into the sources, and I think I understand.

The question is, would it be an option to use the CLI of Projucer without License?
If so, the LicenseController call could simply be moved one block down, which would solve the issue.

2 Likes