ubuntussheclipse-cdtxvfb

Must use Virtual Framebuffer to run Eclipse 4.5 Headless Build on Ubuntu 24.01 LTS


I am working with the Tasking IDE a proprietary fork of Eclipse 4.5. I am trying to setup a CI pipeline.

I am using Eclipse from the shell to automate build of project. However, when I run the following over ssh - I get the following.

eclipse -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data /tmp/workspace_ctc_v6.3r1 -build all
Eclipse: Cannot open display:
Eclipse:
GTK+ Version Check
Eclipse: Cannot open display:
Building All Projects...
Building workspace
Building '/<project_name>'
Eclipse: Cannot open display:
Eclipse:
An error has occurred. See the log file
/tmp/workspace_ctc_v6.3r1/.metadata/.log.

My understanding is that this shouldn't happen when executing a headless build. I do not want any display output.

This method completes the build successfully when I set up a virtual framebuffer - which I've seen referenced a suggestion in another post on unix stackexchange.

Following this method I set up the framebuffer doing the following:

Xvfb :1 -ac -screen 0 1024x768x8 & export DISPLAY=:1

I shouldn't need to do this in order to run a headless build. However, I understand that I am running an outdated version of Eclipse on a recent version of Ubuntu and perhaps this could be a potential issue.

Any suggestions would be appreciated, thank you.

I have tried the following:


Solution

  • I have been in contact with Tasking. This is a bug with this version of Eclipse (Eclipse Mars) and is described here along with some workarounds: https://bugs.eclipse.org/bugs/show_bug.cgi?id=472042