How to install OpenGL in Yocto to resolve "No GL implementation is available" error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to install OpenGL in Yocto to resolve "No GL implementation is available" error

4,927件の閲覧回数
hareendran-tl
Contributor II

I'm encountering an issue when running an application on my Yocto-based system, and I'm getting the error message: "Failed to start Flutter renderer: No GL implementation is available." Additionally, when I check the existence of the 'gtk+-3.0' package using `pkg-config`, it shows that the 'gl' package is not found in the search path and suggests adding the directory containing 'gl.pc' to the `PKG_CONFIG_PATH` environment variable.


root@apalis-imx8-07013820:/usr/lib/pkgconfig# pkg-config --exists --print-errors 'gtk+-3.0'
Package gl was not found in the pkg-config search path.
Perhaps you should add the directory containing `gl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gl', required by 'epoxy', not found

I have already added the 'mesa' package to my local.conf, but it seems that 'gl.pc' is not present in the '/usr/lib/pkgconfig' directory. When I open the 'epoxy.pc' file, it shows the following content:


prefix=/usr
libdir=${prefix}/lib
includedir=${prefix}/include

epoxy_has_glx=1
epoxy_has_egl=1
epoxy_has_wgl=0

Name: epoxy
Description: GL dispatch library
Version: 1.5.10
Requires.private: x11, egl, gl egl
Libs: -L${libdir} -lepoxy
Libs.private: -ldl
Cflags: -I${includedir}

I would appreciate any guidance on how to properly install OpenGL or resolve the "No GL implementation is available" error in Yocto. Additionally, I'd like to know how to ensure that 'gl.pc' is available in the '/usr/lib/pkgconfig' directory. Thank you for your help!

Tried to install OpenGL in Yocto. Expected success, got "No GL implementation" error.

タグ(3)
0 件の賞賛
返信
3 返答(返信)

4,876件の閲覧回数
hareendran-tl
Contributor II

Hi @Manuel_Salas ,

I'm using Ubuntu 20.04 as my host system for Yocto build and i want to compile Linux version 5.15.129.

When I added libgl-mesa-dev package to the yocto and the gl.pc file created under the pkgconfig directory and the error when running the pkg-config --exists --print-errors 'gtk+-3.0' command was gone.

But the following error when running the application still persist.
WARNING **: 06:27:15.221: Failed to start Flutter renderer: No GL implementation is available

0 件の賞賛
返信

4,878件の閲覧回数
hareendran-tl
Contributor II

Hi @Manuel_Salas ,

I'm using Ubuntu 20.04 as my host system for the Yocto build.
I want to compile Linux 5.15.129.

And when I added libgl-mesa-dev package to the yocto and the gl.pc file created under the pkgconfig directory and the error when running the pkg-config --exists --print-errors 'gtk+-3.0' command was gone.

But the following error when running the application still persist.
WARNING **: 06:27:15.221: Failed to start Flutter renderer: No GL implementation is available

0 件の賞賛
返信

4,907件の閲覧回数
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @hareendran-tl ,

 

Could you please share more details about of the environment?

For example, what Ubuntu version are you using in your host, what Linux version you want to compile, etc.

 

Also, you can try:

$ sudo apt install libgl1-mesa-dev

$ export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig

$ export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0

 

 

Best regards!

0 件の賞賛
返信