Can buildbots open a window?
Ryan Schmidt
ryandesign at macports.org
Sun Jan 27 16:33:21 UTC 2019
On Jan 22, 2019, at 08:40, Joshua Root wrote:
> On 2019-1-23 00:48 , Marcus Calhoun-Lopez wrote:
>> In trying to fix one bug [1], I seem to have created another [2].
>> I have been unable to fix the second bug, so I am revisiting the first.
>>
>> When building, octave tries to open a window (using Qt).
>> As far as I can tell, this caused an error with the buildbots [1].
>> Is it true that the buildbots cannot open a window?
>
> Yes. Trying to do things that require a GUI will be a problem on any
> "headless" system. There have been a few other ports that ran into
> similar issues, e.g. <https://trac.macports.org/ticket/26686>.
>
>> If so, can anyone think of a workaround?
>
> Well it boils down to "don't try to open a window". Unfortunately I have
> no idea how you would go about that with Qt or Octave. Maybe check other
> distros for patches? Headless build servers are not uncommon.
The buildbots aren't exactly headless. Yes they are virtual machines running on a server without a physical screen attached, but the macOS buildbot account is logged in so there is a virtual screen and the Finder is running and everything looks normal when I connect with screen sharing.
However, programs launched by MacPorts under the direction of the buildbot worker don't seem to always have the same abilities that programs launched directly from the Finder do. For example, the minivmac @3.5.8 port builds by launching a bootstrap copy of itself, which opens a GUI window. This works on the Lion and newer buildbot workers but for some reason not on the Snow Leopard or earlier workers. I saw similar problems when trying to upgrade the minivmac port on a remote machine via ssh. I didn't find a solution and stopped looking since minivmac @36.04 will no longer need to open a GUI window.
The buildbot worker process is started by launchd as a LaunchDaemon (at system startup). I've wondered if changing it to a LaunchAgent (which would start after user login) would fix this kind of problem but I haven't tried it yet.
More information about the macports-dev
mailing list