problem with gles2
-
Hello, I encountered a problem developing a GLES2 application on ubuntu touch, cmake simply does not see the installed GLES2 (libgles2-mesa-dev. It is installed both on the system itself and in the build container, as indicated in the clickable.yaml)
"Could not find OpenGL (missing: GLES2)"
Moreover, if I try to find a package using pkg-config(in cmake), it compiles successfully, but a link error occurs, for some reason the reference to libGL(idk) remains
-
I'm not knowledgeable on this topic but I would suggest checking out some apps in the store that might be helpful...at least I guess they could be
- Circle Jump (uses Godot)
- Tux Racer (uses SDL2 specifically built for mirclient)
-
@lxsed I think you need to specify the lib in the clickable yml file:
https://clickable-ut.dev/en/latest/project-config.html#install-lib
Maybe this helps:
https://github.com/rinigus/pure-maps/blob/master/packaging/click/full-build.yaml#L24 -
@CiberSheep for what? gles2 is supported in ubuntu touch by default, the so file is needed only so that the linker does not complain about the lack of lib
-
@kugiigi I think why not port cocos2d-x or any engine that uses GLES
that would be very cool -
If I manually link the GLES and EGL libraries(using pkg-config), the compiler won't find the gl symbols.
-- Checking for module 'glesv2'
-- Found glesv2, version 3.2
-- Checking for module 'egl'
-- Found egl, version 1.5/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/opengltest.dir/main.cpp.o: undefined reference to symbol 'glColor3f'
/usr/lib/gcc-cross/aarch64-linux-gnu/9/../../../../aarch64-linux-gnu/bin/ld: /lib/aarch64-linux-gnu/libGL.so.1: error adding symbols: DSO missing from command linefrom cmakelists:
find_package(PkgConfig)
pkg_check_modules(GLES2 REQUIRED IMPORTED_TARGET GLOBAL glesv2)
pkg_check_modules(EGL REQUIRED IMPORTED_TARGET GLOBAL egl)target_link_libraries(${PROJECT_NAME} Qt5::Gui Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::OpenGL PkgConfig::GLES2 PkgConfig::EGL)
-
Hi @lxsed
The previous comments seemed relevant to me.
Alfred just shared this project of his linking a lib.
I understand your situation is a bit different, but you might find pointershttps://github.com/fredldotme/webhunt/blob/main/clickable.yaml#L5
Or you can share you sources so we can better understand your issue.
Because to me the snippets you shared don't make sense and I need more info to understand what is the issue you're facing. -
@AppLee https://github.com/VIRalZah/glestest-ut
the problem is that either GLES2 does not have the necessary symbols from opengl (I checked glClear and glClearColor work, but everything else is an undefined reference),
or for some reason the linker doesn’t see them