Hello Everyone,
I would like to add GTK library to eclipse, i compiled the toradex reference multimedia image and built the SDK.
I struggle problem to integrate this SDK to Eclipse. I followed this tutorial and adapted with the new path of the sdk. When I try to compile my program I get this error :
15:41:25 **** Build of configuration Debug for project DP2018 ****
make all
Building file: ../GUI/dilutionWindow.c
Invoking: Cross GCC Compiler
aarch64-tdx-linux-gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/tdx-xwayland/5.3.0/sysroots/aarch64-tdx-linux -O0 -g3 -Wall -O2 -pipe -g -feliminate-unused-debug-types -c --sysroot=/opt/tdx-xwayland/5.3.0/sysroots/aarch64-tdx-linux/ `/opt/tdx-xwayland/5.3.0/sysroots/x86_64-tdxsdk-linux/usr/bin/pkg-config --cflags gtk+-3.0` -MMD -MP -MF"GUI/dilutionWindow.d" -MT"GUI/dilutionWindow.o" -o "GUI/dilutionWindow.o" "../GUI/dilutionWindow.c"
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
In file included from ../GUI/../global.h:8,
from ../GUI/../dosing.h:13,
from ../GUI/dilutionWindow.h:9,
from ../GUI/dilutionWindow.c:11:
/opt/tdx-xwayland/5.3.0/sysroots/aarch64-tdx-linux/usr/include/gtk-3.0/gtk/gtk.h:30:10: fatal error: gdk/gdk.h: No such file or directory
GUI/subdir.mk:30: recipe for target 'GUI/dilutionWindow.o' failed
30 | #include <gdk/gdk.h>
| ^~~~~~~~~~~
compilation terminated.
make: *** [GUI/dilutionWindow.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.
15:41:25 Build Failed. 3 errors, 0 warnings. (took 123ms)
I cannot find the gl package.
Would you have any tips to resolve this error ?
Could you describe us how you created the image and corresponding SDK? Please share all the changes to local.conf and other important files, thus we can reproduce the issue.
Hello @jaski.tx
Thanks for your answer.
In order to create this image and SDK I followed this tutorial.
About the local.conf I added packages like this :
Yes, I am already aware of this solution as I used it previously . It worked perfectly with the BSP/SDK 2.8 on Colibri IMX6.
Now I would like to do the same thing on Colibri IMX8X with the BSP/SDK 5.
I followed the same pattern to configure eclipse only updating the different required paths with the path of the new SDK .
I am not sure how I can include it in eclipse, do you have any documentation/tips to do this ?
To the gl.pc file I have found nothing.
I already tried to run this command for gtk±3.0 and gdk-3.0
rd-5@rd5-Inspiron-5482:/opt/tdx-xwayland/5.3.0$ /opt/tdx-xwayland/5.3.0/sysroots/x86_64-tdxsdk-linux/usr/bin/pkg-config --cflags gdk-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
rd-5@rd5-Inspiron-5482:/opt/tdx-xwayland/5.3.0$ /opt/tdx-xwayland/5.3.0/sysroots/x86_64-tdxsdk-linux/usr/bin/pkg-config --cflags 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
$ pkg-config --libs --cflags gtkmm-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 apalis-imx8 with 5.4.0 tdx-xwayland and I built the Reference Multimedia Image with gtk+3 and gtkmm3 packages.
If I source my SDK, I got these:
$ . /opt/tdx-xwayland/5.4.0/environment-setup-aarch64-tdx-linux
$ which pkg-config
/opt/tdx-xwayland/5.4.0/sysroots/x86_64-tdxsdk-linux/usr/bin/pkg-config
$ /opt/tdx-xwayland/5.4.0/sysroots/x86_64-tdxsdk-linux/usr/bin/pkg-config --cflags gtkmm-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
make all
Building file: ../main.cpp
Invoking: Cross G++ Compiler
aarch64-tdx-linux-g++ -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/tdx-xwayland/5.4.0/sysroots/aarch64-tdx-linux -O0 -g3 -Wall -O2 -pipe -g -feliminate-unused-debug-types -c -std=c++98 --sysroot=/opt/tdx-xwayland/5.4.0/sysroots/aarch64-tdx-linux/ `/opt/tdx-xwayland/5.4.0/sysroots/x86_64-tdxsdk-linux/usr/bin/pkg-config --cflags gtkmm-3.0` -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.cpp"
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
../main.cpp:7:10: fatal error: gtkmm.h: No such file or directory
7 | #include <gtkmm.h>
| ^~~~~~~~~
compilation terminated.
make: *** [subdir.mk:20: main.o] Error 1
"make all" terminated with exit code 2. Build might be incomplete.