Created attachment 139215 [details] Cmake output SUMMARY It fails late due to a linker error [100%] Linking CXX shared library ../../../bin/libcorebindingsplugin.so /usr/bin/ld: cannot find -lOpenGL::EGL collect2: error: ld returned 1 exit status make[2]: *** [src/declarativeimports/core/CMakeFiles/corebindingsplugin.dir/build.make:357: bin/libcorebindingsplugin.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:1678: src/declarativeimports/core/CMakeFiles/corebindingsplugin.dir/all] Error 2 make: *** [Makefile:146: all] Error 2 Below is the CMAKE output
I have built this successfully multiple times in the past, I am seeing a70957d96c29aa6059753cbfe23d0615ea688b36 as a possible cause
Some additional info on this bug is at LFS mail list: https://lists.linuxfromscratch.org/sympa/arc/blfs-dev/2021-06/msg00025.html It's also broke on cmake 3.20.3. The one possible fix in the mail was used to complete my build of all kf5 5.83.0.
I don't see this problem compiling plasma-framework's latest git master version with CMake 3.20.3 on Fedora 34. Can you try again after clearing out the build dir?
Odd, I still get it cmake -Wno-dev .. -DCMAKE_INSTALL_PREFIX=$INSTALLDIR -DCMAKE_PREFIX_PATH=$INSTALLDIR -DCMAKE_BUILD_TYPE=Release my script already starts off with a clean repo
While looking in pretty much the same problem in a Yocto setup, I discovered some (at least in my impression) surprising condition checking in FindOpenGL.cmake. The logic is that the EGL target is only created, if the OpenGL target could be created, which looks for the libOpenGL.so library. Can you check that libglvnd-dev is installed on your system?
Installing libglvnd-dev seems to allow the build to succeed. Dang, it seems to pull in libglx though....
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/286
Git commit 8953e77ec26b90da0e79e3cf3ecb727034768d58 by Andreas Cord-Landwehr. Committed on 24/06/2021 at 20:11. Pushed by cordlandwehr into branch 'master'. Add compatibility code when GLVND is not available CMake's FindOpenGL internally handles EGL only correctly when GLVND is available. This might not the case on embedded systems and actually it is not necessary when EGL::EGL is found. M +14 -1 CMakeLists.txt M +3 -1 src/declarativeimports/core/CMakeLists.txt https://invent.kde.org/frameworks/plasma-framework/commit/8953e77ec26b90da0e79e3cf3ecb727034768d58
The linked MR seems to have resolved most issues I had due to https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/256, but I still get linking errors related to OpenGL at the very end. [100%] Linking CXX shared library ../../../bin/libcorebindingsplugin.so /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: CMakeFiles/corebindingsplugin.dir/windowthumbnail.cpp.o: in function `Plasma::WindowThumbnail::xcbWindowToTextureEGL(Plasma::WindowTextureNode*)': windowthumbnail.cpp:(.text+0xb9d): undefined reference to `glGetString' /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: windowthumbnail.cpp:(.text+0xccc): undefined reference to `glGenTextures' /usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/../../../../x86_64-alpine-linux-musl/bin/ld: CMakeFiles/corebindingsplugin.dir/windowthumbnail.cpp.o: in function `Plasma::DiscardEglPixmapRunnable::run()': windowthumbnail.cpp:(.text+0x30): undefined reference to `glDeleteTextures' collect2: error: ld returned 1 exit status This system doesn't have glvnd available at all (Alpine Linux) so "just installing it" is not an option.