cancel
Showing results for 
Search instead for 
Did you mean: 

qt aplication problem: Failed to create wl_display

nesnes
Associate III

Hello @Erwan SZYMANSKI 

I hope your week started well.

I think the script didn’t work because I couldn't adjust the paths correctly. Could you please assist me in finding the correct paths and adjusting my script accordingly?

 

 

 

 

# !/bin/sh

export QSG_INFO=1
export QML2_IMPORT_PATH=~/imports/
export PATH=/usr/local/qt5-install/bin/:/usr/local/apitrace/bin:$PATH
export QT_QPA_PLATFORM=wayland

#Execute the Qt program
export XDG_RUNTIME_SESSION=wayland; export XDG_RUNTIME_DIR=/run/user/1000; export WAYLAND_DISPLAY=wayland-1; cd /usr/bin && ./automotive
nesnes@nesnes-ABRA-A5-V19-2:/usr/local$ tree -L 2
.
├── bin
├── etc
├── games
├── include
├── lib
│   └── python3.10
├── man -> share/man
├── sbin
├── share
│   ├── ca-certificates
│   ├── fonts
│   ├── man
│   ├── sgml
│   ├── texmf
│   └── xml
└── src

 

 

 

 

24 REPLIES 24

@PPAGE.13I have my recipe ready. My problem is getting this error. Can you help me solve this problem. I share any file you want if you write them.

QQmlApplicationEngine failed to load component
qrc:/Wearable/Main.qml: No such file or directory
SUMMARY = "Wearable Application (Prebuilt and Compiled from Source)"
DESCRIPTION = "Includes prebuilt wearable binary and also compiles wearable2 from source"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

# Ekstra dosya yollarını tanımlama - Yeni sözdizimi
FILESEXTRAPATHS:prepend := "${THISDIR}/files/src:"

SRC_URI = "file://src \
           file://src/Wearable \
           file://src/wearable.qrc"

S = "${WORKDIR}/src"

DEPENDS = "qtbase qtquickcontrols2 qtdeclarative "

inherit qmake5

# Install prebuilt wearable and build wearable2 from source
do_install() {
    install -d ${D}${bindir}
    install -d ${D}${datadir}/wearable

    # Install prebuilt executable
    install -m 0755 ${WORKDIR}/src/wearable ${D}${bindir}/wearable

    # Build from source
    cd ${S}
    qmake wearable.pro  # Specify the .pro file for qmake
    make

    # Install the source-built executable as wearable2
    install -m 0755 wearable ${D}${bindir}/wearable2

    # Install QML and resource files
    cp -r ${WORKDIR}/src/Wearable ${D}${datadir}/wearable/
}

FILES_${PN} = "${bindir}/wearable ${bindir}/wearable2"

@nesnes 

I don't see the RDEPENDS section, did you add it?

 

RDEPENDS

Lists a package's runtime dependencies (i.e. other packages) that must be installed in order for the built package to run correctly. If a package in this list cannot be found during the build, you will get a build error.

 

Philippe.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

@PPAGE.13  I have rearranged my recipe , I need to flash the image to the board and that takes some time , I will reply again soon.

SUMMARY = "Wearable Application (Prebuilt and Compiled from Source)"
DESCRIPTION = "Includes prebuilt wearable binary and also compiles wearable2 from source"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

# Extra file paths definition - Updated syntax
FILESEXTRAPATHS:prepend := "${THISDIR}/files/src:"

SRC_URI = "file://src \
           file://src/Wearable \
           file://src/wearable.qrc"

S = "${WORKDIR}/src"

DEPENDS = "qtbase qtquickcontrols2 qtdeclarative "

# Runtime dependencies: Ensure these are installed at runtime
RDEPENDS_${PN} = "qtbase qtquickcontrols2 qtdeclarative qtwayland qtgraphicaleffects qtquickcontrols qtquickcontrols2"

inherit qmake5

# Install prebuilt wearable and build wearable2 from source
do_install() {
    install -d ${D}${bindir}
    install -d ${D}${datadir}/wearable

    # Install prebuilt executable
    install -m 0755 ${WORKDIR}/src/wearable ${D}${bindir}/wearable

    # Build from source
    cd ${S}
    qmake wearable.pro  # Specify the .pro file for qmake
    make

    # Install the source-built executable as wearable2
    install -m 0755 wearable ${D}${bindir}/wearable2

    # Install QML and resource files
    cp -r ${WORKDIR}/src/Wearable ${D}${datadir}/wearable/
    cp -r ${WORKDIR}/src/WearableSettings ${D}${datadir}/wearable/
    cp -r ${WORKDIR}/src/WearableStyle ${D}${datadir}/wearable/
}

FILES_${PN} = "${bindir}/wearable ${bindir}/wearable2"

 

@PPAGE.13  Still get the same error

root@stm32mp15-disco:~# wearable
QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000
QQmlApplicationEngine failed to load component
qrc:/Wearable/Main.qml: No such file or directory

@nesnes,

Don't you have a case issue with Wearable directory, but installed in wearable?

If not, I don't have much more idea.

Philippe.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.