nba-emu / NanoBoyAdvance

A cycle-accurate Nintendo Game Boy Advance emulator.
GNU General Public License v3.0
998 stars 55 forks source link

cmake error compiling on Linux Mint 21.1 Cinnamon. #283

Closed Littlemac123 closed 1 year ago

Littlemac123 commented 1 year ago

I fallowed the documented readme compile guide and got this error. i was on the latest master as of writing this report from git clone --recursive https://github.com/nba-emu/NanoBoyAdvance.git

littlemac@littlemac:~/Downloads/NanoBoyAdvance/build$ cmake -DCMAKE_BUILD_TYPE=Release .. -- Version: 6.1.3 -- Build type: Release -- CXX_STANDARD: 11 -- Required features: cxx_variadic_templates

CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindOpenGL.cmake:315 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning. FindOpenGL found both a legacy GL library: OPENGL_gl_LIBRARY: /usr/lib/x86_64-linux-gnu/libGL.so and GLVND libraries for OpenGL and GLX: OPENGL_opengl_LIBRARY: /usr/lib/x86_64-linux-gnu/libOpenGL.so OPENGL_glx_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLX.so OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): src/platform/core/CMakeLists.txt:10 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:28 (find_package): Could not find a package configuration file provided by "Qt5OpenGL" with any of the following names: Qt5OpenGLConfig.cmake qt5opengl-config.cmake Add the installation prefix of "Qt5OpenGL" to CMAKE_PREFIX_PATH or set "Qt5OpenGL_DIR" to a directory containing one of the above files. If "Qt5OpenGL" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): src/platform/qt/CMakeLists.txt:34 (find_package) -- Configuring incomplete, errors occurred! See also "/home/littlemac/Downloads/NanoBoyAdvance/build/CMakeFiles/CMakeOutput.log". See also "/home/littlemac/Downloads/NanoBoyAdvance/build/CMakeFiles/CMakeError.log". littlemac@littlemac:~/Downloads/NanoBoyAdvance/build$ neofetch ...-:::::-... littlemac@littlemac .-MMMMMMMMMMMMMMM-. ------------------- .-MMMM`..-:::::::-..`MMMM-. OS: Linux Mint 21.1 x86_64 .:MMMM.:MMMMMMMMMMMMMMM:.MMMM:. Host: MS-7758 1.0 -MMM-M---MMMMMMMMMMMMMMMMMMM.MMM- Kernel: 5.15.0-67-generic `:MMM:MM` :MMMM:....::-...-MMMM:MMM:` Uptime: 3 hours, 36 mins :MMM:MMM` :MM:` `` `` `:MMM:MMM: Packages: 2976 (dpkg), 16 (flatpak) .MMM.MMMM` :MM. -MM. .MM- `MMMM.MMM. Shell: bash 5.1.16 :MMM:MMMM` :MM. -MM- .MM: `MMMM-MMM: Resolution: 1920x1080 :MMM:MMMM` :MM. -MM- .MM: `MMMM:MMM: DE: Cinnamon 5.6.7 :MMM:MMMM` :MM. -MM- .MM: `MMMM-MMM: WM: Mutter (Muffin) .MMM.MMMM` :MM:--:MM:--:MM: `MMMM.MMM. WM Theme: Mint-Y-Dark-Aqua (Mint-Y) :MMM:MMM- `-MMMMMMMMMMMM-` -MMM-MMM: Theme: Mint-Y-Aqua [GTK2/3] :MMM:MMM:` `:MMM:MMM: Icons: Mint-X [GTK2/3] .MMM.MMMM:--------------:MMMM.MMM. Terminal: gnome-terminal '-MMMM.-MMMMMMMMMMMMMMM-.MMMM-' CPU: Intel i5-2500K (4) @ 6.300GHz '.-MMMM``--:::::--``MMMM-.' GPU: NVIDIA GeForce GTX 960 '-MMMMMMMMMMMMM-' Memory: 4006MiB / 7892MiB ``-:::::-`` [CMakeError.log](https://github.com/nba-emu/NanoBoyAdvance/files/10914210/CMakeError.log) [CMakeOutput.log](https://github.com/nba-emu/NanoBoyAdvance/files/10914211/CMakeOutput.log)
fleroviux commented 1 year ago

The error message reads like Qt5OpenGL may be missing. Please check if the libqt5opengl5-dev package is installed and if not install it and retry. Normally I think it would be installed together with qtbase5-dev, at least that's my experience on Ubuntu so far, so not sure why it would be missing but it's worth a try.

Edit: it looks like libqt5opengl5-dev is only a recommended dependency of qtbase5-dev and it's possible that your apt is configured to not install recommends.

Littlemac123 commented 1 year ago

okay a apt install of libqt5opengl5-dev fixed the problem its now able to make, and it booted into the UI and a game, thank you. do you think we could change the build guide for ubuntu/deb to include libqt5opengl5-dev

fleroviux commented 1 year ago

Yes, I updated the compilation guide.