QXcbIntegration: Cannot create platform OpenGL context - qt5

I've been trying to add Qt5 support to a core-image-sato image using Yocto's Poky Pyro on Raspberry Pi 3.
In my bblayer.conf I added these lines:
BBLAYERS ?= " \
/poky-pyro/meta \
/poky-pyro/meta-poky \
/poky-pyro/meta-yocto-bsp \
/poky-pyro/meta-openembedded/meta-oe \
/poky-pyro/meta-openembedded/meta-multimedia \
/poky-pyro/meta-openembedded/meta-networking \
/poky-pyro/meta-openembedded/meta-perl \
/poky-pyro/meta-openembedded/meta-python \
/poky-pyro/meta-raspberrypi \
/poky-pyro/meta-qt5 \
"
In my local.conf I added these lines:
DISTRO_FEATURES_append = " opengl "
IMAGE_INSTALL_append = " qtbase qtdeclarative qtquickcontrols2 qtmultimedia qttools cinematicexperience "
Bitbake finished building the image successfully, but when I run Qt5_cenimaticExperience on the target I get this error message:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled.

This is the default configuration of Qtbase and based on what you have:
PACKAGECONFIG_GL ?= "${#bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}"
PACKAGECONFIG_DEFAULT ?= "dbus udev evdev widgets tools libs freetype tests"
PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib"
As you can see, we only enabled -opengl desktop; What we need is opengl es2 for embedded system.
To correct this, add this line to your local.conf:
PACKAGECONFIG_append_pn-qtbase = " gles2 "
By the way, this is my qtbase configuration:
PACKAGECONFIG_append_pn-qtbase = " gles2 fontconfig \
gstreamer \
accessibility \
tslib examples \
"

Related

apache installation of latest version in solaris machine

I am trying to install apache version:2.4.54,
./configure --prefix= -with-included-apr --with-apr-util= --with-pcre=
Congiration completed successfully.
installation for apr(1.7.0),apr-util(version:1.6.1),pcre (version : 2-10.40) is successful.
facing below issue while make in the path (httpd/server):
/home/httpd/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99 -g -O2 -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE -I. -I/home/httpd/os/unix -I/home/httpd/include -I/home/httpd/srclib/apr/include -I/home/httpd/srclib/apr-util/include -I/home/pcre/include -I/home/httpd/modules/aaa -I/home/httpd/modules/cache -I/home/httpd/modules/core -I/home/httpd/modules/database -I/home/httpd/modules/filters -I/home/httpd/modules/ldap -I/home/httpd/modules/loggers -I/home/httpd/modules/lua -I/home/httpd/modules/proxy -I/home/httpd/modules/http2 -I/home/httpd/modules/session -I/home/httpd/modules/ssl -I/home/httpd/modules/test -I/home/httpd/server -I/home/httpd/modules/md -I/home/httpd/modules/arch/unix -I/home/httpd/modules/dav/main -I/home/httpd/modules/generators -I/home/httpd/modules/mappers -prefer-non-pic -static -c util.c && touch util.lo
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
/usr/ccs/bin/as: "/var/tmp//ccl7Uxwi.s", line 37236: error: statement syntax
*** Error code 1
make: Fatal error: Command failed for target `util.lo'
Current working directory /home/httpd/server
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' mpm'; \
for i in $list; do \
if test -d "$i"; then \
target="$otarget"; \
echo "Making $target in $i"; \
if test "$i" = "."; then \
made_local=yes; \
target="local-$target"; \
fi; \
(cd $i && make $target) || exit 1; \
fi; \
done; \
if test "$otarget" = "all" && test -z 'delete-exports libmain.la export_vars.h httpd.exp'; then \
made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'```
Any Solution for the issue.
installation is done in solaris machine.

Bitbake LibSocketCAN

I am trying to build libsocketcan into my image. To add libsocketcan In my main application recipe I added IMAGE_INSTALL_append += " libsocketcan ". When debugging my application with Eclipse this works perfectly. When I attempt to bitbake my application I am told
fatal error: libsocketcan.h: No such file or directory
I am not sure where I am missing my dependency.
Makefile.am
AUTOMAKE_OPTIONS = foreign subdir-objects
bin_PROGRAMS = MAIN_Application
MAIN_Application_LDADD = -lsocketcan -lpthread
AM_CPPFLAGS = \
-I$(srcdir)/include \
-I$(srcdir)/include/utilities \
-I$(srcdir)/include/comms
MAIN_Application_SOURCES = \
src/main.c \
src/scheduler.c \
src/utilities/time_conversions.c \
src/utilities/ring_buffer.c \
src/utilities/logger.c \
src/comms/can.c
I believe this is the only file that would make a difference. Has anyone else ever faced this? What else do I need to do to allow my bitbake to find the include?
Edit: recipe as requestes
LICENSE = "MIT"
IMAGE_LINGUAS = " "
# Base image Install
IMAGE_INSTALL = " packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
# Configure image base size
IMAGE_ROOTFS_SIZE ?= "4096"
IMAGE_ROOTFS_EXTRA_SPACE_append = "${#bb.utils.contains("DISTRO_FEATURES", "systemd", " + 2048", "", d)}"
# User preferences
inherit core-image
inherit extrausers
# Change root password (note the capital -P)
EXTRA_USERS_PARAMS = "\
usermod -P toor root; \
useradd -P michael -G sudo michael; \
"
# uncomment the line %sudo ALL=(ALL) ALL in /etc/sudoers
modify_sudoers() {
sed 's/# %sudo/%sudo/' < ${IMAGE_ROOTFS}${sysconfdir}/sudoers > ${IMAGE_ROOTFS}${sysconfdir}/sudoers.tmp
mv ${IMAGE_ROOTFS}${sysconfdir}/sudoers.tmp ${IMAGE_ROOTFS}${sysconfdir}/sudoers
}
ROOTFS_POSTPROCESS_COMMAND_append = " modify_sudoers;"
# Dependencies
DEPENDS = " libsocketcan "
# Install necessary libraries
IMAGE_INSTALL_append += " packagegroup-core-ssh-openssh "
IMAGE_INSTALL_append += " can-utils "
IMAGE_INSTALL_append += " libsocketcan"
IMAGE_INSTALL_append += " sudo "
IMAGE_INSTALL_append += " iw wireless-tools wpa-supplicant "
# Install SMG applications
IMAGE_INSTALL_append += " udevrules "
IMAGE_INSTALL_append += " mainapplication "
# Apply kernel customizations
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://kernel_customization.cfg"
# Remove image features
IMAGE_INSTALL_remove += " packagegroup-fsl-optee-imx"
BAD_RECOMMENDATIONS = " udev-hwdb"
#MKUBIFS_ARGS="--leb-size 126976 --min-io-size 2048 --max-leb-cnt 3600"
#UBINIZE_ARGS="--peb-size 128KiB --min-io-size 2048 --sub-page-size 2048"
#IMAGE_FSTYPES += " ubi ubifs"
Edit 2: main application recipe
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "\
file://MAIN_Application \
file://services \
"
inherit autotools systemd
S = "${WORKDIR}/MAIN_Application"
SYSTEMD_SERVICE_${PN} = "MAINapplication.service"
do_install_append () {
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/services/MAINapplication.service ${D}${systemd_system_unitdir}
sed -i -e 's,#BINDIR#,${bindir},g' ${D}${systemd_system_unitdir}/MAINapplication.service
}
libsocketcan provides these packages:
tmp/work/aarch64-poky-linux/libsocketcan/0.0.11-r0/image
└── usr
├── include
│   ├── can_netlink.h
│   └── libsocketcan.h
├── lib
│   ├── libsocketcan.so -> libsocketcan.so.2.3.0
│   ├── libsocketcan.so.2 -> libsocketcan.so.2.3.0
│   ├── libsocketcan.so.2.3.0
│   └── pkgconfig
│   └── libsocketcan.pc
Adding DEPENDS += "libsocketcan" will cause all those files to be populated into your custom layer's working directory.
NOTE
Your recipe seems to do not install your MAIN_Application output binary file. So your recipe should look like:
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "\
file://MAIN_Application \
file://services \
"
inherit autotools systemd
S = "${WORKDIR}/MAIN_Application"
DEPENDS += "libsocketcan"
SYSTEMD_SERVICE_${PN} = "MAINapplication.service"
do_install_append () {
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/services/MAINapplication.service ${D}${systemd_system_unitdir}
sed -i -e 's,#BINDIR#,${bindir},g' ${D}${systemd_system_unitdir}/MAINapplication.service
install -m 0644 ${S}/MAIN_Application ${D}${bindir}
}
Just make sure that MAIN_Application is the right binary name.
IMAGE_INSTALL_append adds package to image.
It has not much to do with build-time dependencies of your application.
What you should add to you app.bb is:
DEPENDS = "libsocketcan"
This is an answer just to help you fix some issues related to your image recipe:
Here are some important comment:
IMAGE_INSTALL
IMAGE_INSTALL = " packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL}"
...
inherit core-image
Never and never override IMAGE_INSTALL before core-image, because IMAGE_INSTALL of core-image will not take effect.
Variable assignement
IMAGE_INSTALL_append += " packagegroup-core-ssh-openssh "
IMAGE_INSTALL_append += " can-utils "
IMAGE_INSTALL_append += " libsocketcan"
IMAGE_INSTALL_append += " sudo "
IMAGE_INSTALL_append += " iw wireless-tools wpa-supplicant "
Do not use append with += , use one of them only.
DEPENDS ??
Image recipes are just dedicated to collect recipes and create image rootfs and final image type (wic, ...)
You do not need DEPENDS.
SRC_URI ??
This is also a non-image recipe variable, did it even took effect ?
Move the kernel configuration fragment to your custom virtual/kernel package recipe.
I recommend your image recipe to look like:
LICENSE = "MIT"
IMAGE_LINGUAS = " "
# Configure image base size
IMAGE_ROOTFS_SIZE ?= "4096"
IMAGE_ROOTFS_EXTRA_SPACE_append = "${#bb.utils.contains("DISTRO_FEATURES", "systemd", " + 2048", "", d)}"
# User preferences
inherit core-image extrausers
# Change root password (note the capital -P)
EXTRA_USERS_PARAMS = "\
usermod -P toor root; \
useradd -P michael -G sudo michael; \
"
# uncomment the line %sudo ALL=(ALL) ALL in /etc/sudoers
modify_sudoers() {
sed 's/# %sudo/%sudo/' < ${IMAGE_ROOTFS}${sysconfdir}/sudoers > ${IMAGE_ROOTFS}${sysconfdir}/sudoers.tmp
mv ${IMAGE_ROOTFS}${sysconfdir}/sudoers.tmp ${IMAGE_ROOTFS}${sysconfdir}/sudoers
}
ROOTFS_POSTPROCESS_COMMAND_append = " modify_sudoers;"
# Install necessary libraries
IMAGE_INSTALL_append = " packagegroup-core-ssh-openssh \
can-utils \
libsocketcan \
sudo \
iw wireless-tools wpa-supplicant"
# Install SMG applications
IMAGE_INSTALL_append = " udevrules \
mainapplication"
# Remove image features
IMAGE_INSTALL_remove += " packagegroup-fsl-optee-imx"
BAD_RECOMMENDATIONS = " udev-hwdb"
#MKUBIFS_ARGS="--leb-size 126976 --min-io-size 2048 --max-leb-cnt 3600"
#UBINIZE_ARGS="--peb-size 128KiB --min-io-size 2048 --sub-page-size 2048"
#IMAGE_FSTYPES += " ubi ubifs"

Yocto include cmake project with custom steps

I am trying to include this simple cmake-based project to my image: https://github.com/MatrixOrbital/HTT-Utility
The steps to build in Linux are:
mkdir build
cd build
cmake ..
make
I am trying to reproduce these steps within my Yocto recipe. The generated binary (./build/htt_util) should be installed in /usr/bin.
So far with the help of devtool and some manual tuning I ended up with this recipe:
LICENSE = "MIT & Unknown"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ff75ee274f4c77abeee3db089083fec7 \
file://hidapi/LICENSE.txt;md5=7c3949a631240cb6c31c50f3eb696077"
SRC_URI = "git://github.com/MatrixOrbital/HTT-Utility.git;protocol=https"
SRC_URI += "file://0001-Adding-ctype.patch;"
PATCHTOOL = "git"
# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "2045d5eacc67b89a02dafe41edfd032179333aee"
S = "${WORKDIR}/git"
inherit cmake
# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
EXTRA_OECMAKE = ""
DEPENDS += "udev"
What should I add to my recipe to achieve the goal of generating a binary and installing into /usr/bin?
I have been trying to play with:
do_configure() {
...
}
do_compile() {
...
}
do_install() {
...
}
But so far I did not manage to do anything useful.
Any help would be appreciated.
do_install() {
install -m 0644 mybinary ${D}${bindir}
}
FILES_${PN} = " \
${bindir} \
"

using EXTRA_OECMAKE doesn't have any effect in cmake variable in bitbake recipe

I wanted to add my application in a yocto Image and I used this recipe:
DESCRIPTION = "my application"
SECTION = "examples"
LICENSE = "CLOSED"
PR = "r0"
DEPENDS += "opencv"
SRC_URI = "git://address/to/myApplication.git;protocol=https;tag=v0.1"
inherit pkgconfig cmake
after running bitbake my-application, I faced this error:
fatal error: string: No such file or directory #include <string>
I searched on the internet and I found that I need to pass this variable to my CMake in my recipe:
EXTRA_OECMAKE += "-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON"
but nothing had changed. again I faced the error. then I decided to add the variable to my CMake:
set(CMAKE_NO_SYSTEM_FROM_IMPORTED ON)
after my next try, everything got fine and I didn't face any error.
I opened cmake.bbclass file and I saw these lines in a cmake_do_configure() function:
cmake \
${OECMAKE_GENERATOR_ARGS} \
$oecmake_sitefile \
${OECMAKE_SOURCEPATH} \
-DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
-DCMAKE_INSTALL_BINDIR:PATH=${#os.path.relpath(d.getVar('bindir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SBINDIR:PATH=${#os.path.relpath(d.getVar('sbindir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_LIBEXECDIR:PATH=${#os.path.relpath(d.getVar('libexecdir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SYSCONFDIR:PATH=${sysconfdir} \
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=${#os.path.relpath(d.getVar('sharedstatedir'), d. getVar('prefix') + '/')} \
-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=${localstatedir} \
-DCMAKE_INSTALL_LIBDIR:PATH=${#os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_INCLUDEDIR:PATH=${#os.path.relpath(d.getVar('includedir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_DATAROOTDIR:PATH=${#os.path.relpath(d.getVar('datadir'), d.getVar('prefix') + '/')} \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
-DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 \
${EXTRA_OECMAKE} \
-Wno-dev
by default CMAKE_NO_SYSTEM_FROM_IMPORTED is set to 1. therefor, logically I don't need to set this variable in my recipe or cmake.
why EXTRA_OECMAKE and CMake cmake_do_configure() didn't work correctly?
I checked my cmake, and I am sure that I didn't change any CXX flags in it.

qmake .pro file could not be parsed

I'm running OS X Mavericks and trying to convert a Qt4 application to Qt5. I've also never compiled the application on this machine before. I have Qt 5.1.* installed on this machine, which parses the file just fine. As soon as I switch over to my Qt 5.2.0 kit and look at the run settings, underneath my "Run configuration" there's a warning: "The .pro file '.pro' could not be parsed.".
I've looked at other solutions on SO and the qt-project website -- none of which have helped. My Qt 5.2.0 kit is a manually-added kit since I installed it using Homebrew.
Here is a screenshot of my settings:
Note that if I run qmake (/usr/local/opt/qt5/bin/qmake) in the project directory, no errors are output.
Here is my .pro file:
QT += core widgets concurrent
TARGET = Up
TEMPLATE = app
CONFIG += c++11
SOURCES += main.cpp\
MainForm.cpp \
AboutForm.cpp \
progressdialog.cpp
HEADERS += MainForm.h \
AboutForm.h \
progressdialog.h
FORMS += MainForm.ui \
AboutForm.ui \
progressdialog.ui
INCLUDEPATH += $$PWD/../FATX/FATX
RESOURCES += \
MainForm.qrc
CONFIG(debug, debug|release) {
macx: LIBS += -L$$PWD/../FATX-BUILD-OSX/debug/ -lFATX
INCLUDEPATH += $$PWD/../FATX-BUILD-OSX/debug
DEPENDPATH += $$PWD/../FATX-BUILD-OSX/debug
macx: PRE_TARGETDEPS += $$PWD/../FATX-BUILD-OSX/debug/libFATX.a
} else {
macx: LIBS += -L$$PWD/../FATX-OSX/release/ -lFATX
INCLUDEPATH += $$PWD/../FATX-BUILD-OSX/release
DEPENDPATH += $$PWD/../FATX-BUILD-OSX/release
macx: PRE_TARGETDEPS += $$PWD/../FATX-OSX/release/libFATX.a
}
cache()
The solution was to update Qt Creator to Qt 3.0.0.