2
votes

Using Yocto, I am trying to build a Linux image with Open GL and the corresponding SDK to build an application for this image.

I have an error when building the application. The file GL/gl.h cannot be found in the SDK directory (/opt/poky/1.7.3). I only have the following files:

  • ./sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/gstreamer-1.0/gst/gl/gl.h
  • ./sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/include/GLES/gl.h
  • ./sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/src/debug/mesa/2_10.1.3-r0/Mesa-10.1.3/include/GL/gl.h

So GL/gl.h is not in the /usr/include diredctory

In Yocto build directory, there are GL/gl.h files:

  • ./tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/mesa/2_10.1.3-r0/sysroot-destdir/usr/include/GL/gl.h
  • ./tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/mesa/2_10.1.3-r0/packages-split/mesa-dbg/usr/src/debug/mesa/2_10.1.3-r0/Mesa-10.1.3/include/GL/gl.h
  • ./tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/mesa/2_10.1.3-r0/packages-split/libgl-mesa-dev/usr/include/GL/gl.h
  • ./tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/mesa/2_10.1.3-r0/package/usr/src/debug/mesa/2_10.1.3-r0/Mesa-10.1.3/include/GL/gl.h
  • ./tmp/work/cortexa9hf-vfp-neon-mx6qdl-poky-linux-gnueabi/mesa/2_10.1.3-r0/package/usr/include/GL/gl.h
  • ./tmp/work/imx6dlgpr-poky-linux-gnueabi/gpr3/1.0-r0/sdk/image/opt/poky/1.7.3/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/src/debug/mesa/2_10.1.3-r0/Mesa-10.1.3/include/GL/gl.h

I build the sdk with the following command:

bitbake fsl-image-multimedia-full -c populate_sdk

What do I have to do to found the GL/gl.h files in the SDK include directory? In my local.conf file I added:

DISTRO_FEATURES_remove = "x11 wayland"
DISTRO_FEATURES_append = " mesa-gl opengl"

Any help whould be welcome. Thanks

1
I have the same problem right now. Did you find a solution to fix your problem ?Zyend

1 Answers

1
votes

If a package is not added automatically to the SDK you can add it to the TOOLCHAIN_TARGET_TASK manually:

TOOLCHAIN_TARGET_TASK += " libgl-mesa-dev "

For more information on this topic please take a look at the documentation: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-TOOLCHAIN_TARGET_TASK