Again XDG_RUNTIME_DIR not set

Good day!
Faced the following problem similar to this issue “XDG_RUNTIME_DIR not set”.
But to solve it did not work for me. Tried two different options.

1. First varianе:

linux-build:
docker:
- image: circleci/python:3.7.0
steps:
- checkout
- run:
name: Start Xvfb
command: Xvfb :99 -screen 0 1280x1024x24
background: true
#- run: install Qt
- run:
name: Build Qt project
command: |
qmake “CONFIG+=release”
make
make check

The result is to build the business even does not reach the stage of “Start Xvfb” is issued the following:

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Step was cancelled

If you do not try to run Xvfb, then we get:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-circleci’
QQmlComponent: Component is not ready

2. Second varianе:

linux-build:
docker:
- image: circleci/python:3.7.0-browsers
steps:
- checkout
#- run: install Qt
- run:
name: Build Qt project
command: |
qmake “CONFIG+=release”
make
make check

But XDG_RUNTIME_DIR is still not installed. And if you try to run the software Xvfb reported that it is already running:

(EE)
Fatal server error:
(EE) Server is already active for display 99
If this server is no longer running, remove /tmp/.X99-lock
and start again.
(EE)
Exited with code 1

Need your help! :slightly_smiling_face: Without it, I can’t test window applications and upload ready builds.

Dealt with this problem:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-circleci’
QQmlComponent: Component is not ready

This is exactly the Qt problem. Not a very good conclusion confuses.
If you get such an error from Qt, most likely Qt should support OpenGL (if not - you need to rebuild Qt with OpenGL) and you just need to create a folder that it did not find:

    - run:
        name: Set XDG_RUNTIME_DIR
        command: |
          mkdir -p /tmp/runtime-circleci
          echo "export XDG_RUNTIME_DIR=/tmp/runtime-circleci" >> $BASH_ENV
    - run: 
        name: Install OpenGL
        command: sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.