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:
Setting the DISPLAY=:0.0.
Running the build as root.
Reinstalling the toolchain.
I have tried logging in over remote desktop and running the headless build in the terminal, where it builds successfully. In this case the DISPLAY output is likely sent to somewhere, which causes things not to crash.
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