[yocto] Compiling raspberry2 with eglinfo-x11

David Weisgerber david.weisgerber at ms-gmbh.de
Thu Mar 17 02:17:56 PDT 2016


Hi,
I got Qt to compile by solving the following "problem" in the userland EGL / 
GLESv2 code:
# Khronos
#
# Note: in Android the linker is unable or unwilling to resolve
# dynamically using already loaded symbols. The libraries here
# have quite a few circular dependencies, and so the only way
# to make it work seems to be to have everything static.

There is a circular dependency between libEGL and libGLESv2. You can fix the 
Qt compile by adding the following qtbase_%.bbappend:
do_configure_prepend_rpi() {
    cat > ${S}/mkspecs/oe-device-extra.pri << 'EOF'
EGLFS_DEVICE_INTEGRATION = eglfs_brcm
QMAKE_INCDIR_EGL = $$[QT_SYSROOT]${includedir}/interface/vmcs_host/linux
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_LIBS_EGL = -lEGL -lGLESv2
EOF
}

which just changes the order of linking to the libraries.

However, I am still not able to get the Qt eglfs programs running due to the 
following problem:
* failed to add service - already in use?
which must be coming from the userland code

My problem could be caused by the fact, that changing GPU_MEM does not seem to 
have any effect atm and the vc4 driver isn't loaded at startup...

Thanks for help,
David

On Thursday, March 17, 2016 12:41:17 PM SIVA SUBRAMANIAN. P wrote:
> What is your preferred GLES provider set to, userland or mesa?
> 
> On Wed, Mar 16, 2016 at 8:51 PM, David Weisgerber
> 
> <david.weisgerber at ms-gmbh.de> wrote:
> > Hi,
> > 
> > I have problems compiling eglinfo-x11 (as well as Qt 5 from meta-qt5) with
> > egl.
> > 
> > I have setup poky, meta-raspberrypi (and meta-qt5) from git and I am on
> > branch master.
> > 
> > My target is to get a distribution with working (hw acceleratetd) Qt5 with
> > QML GUI. I have already spent some days on getting qteverywheredemo
> > running
> > but I did not succeed yet.
> > 
> > As a first test I wanted to get eglinfo-x11 running but it gives the
> > following error when compiling:
> > 
> > [11/11] cxxprogram: build/release/src/json_writer.cpp.1.o
> > build/release/src/log.cpp.1.o build/release/src/main.cpp.1.o
> > build/release/src/process_egl.cpp.1.o build/release/src/scopes.cpp.1.o
> > build/release/src/text_writer.cpp.1.o
> > build/release/src/json-sax/json.c.1.o
> > b
> > uild/release/src/platform_x11_generic.cpp.1.o
> > build/release/src/openvg_stats.cpp.1.o
> > build/release/src/process_openvg.cpp.1.o -> build/release/eglinfo
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glDiscardFramebufferEXT'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glPointSizePointerOES'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_set_error_api'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_BindFramebuffer'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glintAttribPointer'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_state_free'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_FramebufferRenderbuffer'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_buffer_info_set'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_set_error'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_DeleteFramebuffers'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `gl11_client_state_init'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_GetFramebufferAttachmentParameteriv'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_IsRenderbuffer'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_GetRenderbufferParameteriv'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_DeleteRenderbuffers'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glBufferSubData'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_FramebufferTexture2D'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_BindRenderbuffer'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_GenerateMipmap'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_RenderbufferStorage'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_GenFramebuffers'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_GenRenderbuffers'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_CheckFramebufferStatus'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `gl20_client_state_init'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_buffer_info_get'
> > /home/david/yocto/poky/build/tmp/sysroots/raspberrypi2/usr/lib/libEGL.so:
> > undefined reference to `glxx_client_IsFramebuffer'
> > 
> > 
> > 
> > It links to libEGL and libGLESv2. nm says that this symbols should be in
> > libGLESv2 but it just does not catch them up somehow?
> > 
> > 
> > 
> > My image is configured as follows:
> > 
> > include recipes-core/images/rpi-hwup-image.bb
> > 
> > 
> > 
> > GPU_MEM = "64"
> > 
> > 
> > 
> > LICENSE_FLAGS_WHITELIST = "commercial"
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > PACKAGECONFIG_append_pn-qtbase = "gles2"
> > 
> > 
> > 
> > SPLASH = "psplash-custopi"
> > 
> > 
> > 
> > ENABLE_SPI_BUS = "1"
> > 
> > 
> > 
> > IMAGE_FEATURES += "ssh-server-openssh splash x11-sato"
> > 
> > IMAGE_INSTALL_append = "qtbase qtbase-fonts custorouter custopi-gui
> > packagegroup-core-full-cmdline bluez5 wireless-tools wpa-supplicant
> > qt5everywheredemo fontconfig freetype packagegroup-core-x11-base
> > packagegroup-core-x11-sato eglinfo-x11"
> > 
> > 
> > 
> > IMAGE_LINGUAS ?= "de-de es-es fr-fr en-gb"
> > 
> > 
> > 
> > Thanks for help!
> > 
> > 
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto at yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto




More information about the yocto mailing list