Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile fails due to package configuration file not found. #333

Open
jere53 opened this issue Mar 21, 2023 · 5 comments
Open

Makefile fails due to package configuration file not found. #333

jere53 opened this issue Mar 21, 2023 · 5 comments

Comments

@jere53
Copy link

jere53 commented Mar 21, 2023

When following the build instructions, the "make -f release.makefile" command fails with error:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5/Qt5Config.cmake:31 (find_package):
  Could not find a package configuration file provided by "Qt5OpenGL" with
  any of the following names:
        Qt5OpenGLConfig.cmake
         qt5opengl-config.cmake

In order to fix this one must find the actual Qt5OpenGLConfig.cmake file and set the "Qt5OpenGL_DIR" variable in the Qt5Config.cmake to point to the directory where Qt5OpenGLConfig.cmake is, like so:


*
*
*
if (NOT Qt5_FIND_COMPONENTS)
    set(Qt5_NOT_FOUND_MESSAGE "The Qt5 package requires at least one component")
    set(Qt5_FOUND False)
    return()
endif()

//ADD THIS LINE (Replace with the path to whichever folder you found "Qt5OpenGLConfig.cmake" at):
set(Qt5OpenGL_DIR /opt/Qt/5.15.2/gcc_64/lib/cmake/Qt5OpenGL/)


set(_Qt5_FIND_PARTS_REQUIRED)
if (Qt5_FIND_REQUIRED)
    set(_Qt5_FIND_PARTS_REQUIRED REQUIRED)
endif()
*
*
*
@TRtomasz
Copy link
Member

Please provide full log

@core1024
Copy link
Member

Hello!
Although I am not entirely sure what OS you are trying to build stremio-shell on, I presume it is GNU/Linux based.
From the proposed change I also presume you have opted not to install Qt from your package manager and rather you have used the Qt Online Installer as I am not aware of package manager installing packages in /opt directory.

I strongly advise you using the Qt package provided for your operating system and installed via your package manager. For example you can see the instructions for building on Debian Linux. On other distributions the package names may vary (like qt5-base-devel on Solus instead of qt5-default) but you will be able to find the correct names either by using your package manager or asking in the community forums for your distribution. Here is also our official package for Arch Linux. In the depends and makedepends sections you can see that some of the package names also differ from these on Debian.

By using the packages for your distribution you can be sure that there will be no incompatibilities and also CMake will have no issues finding the required components.

If you want to use the Qt package from the Qt website you need to figure out how to configure it to work with CMake. Hardcoding paths in the build scripts is not the way to go.

@jerry12122134
Copy link

I had to install libqt5opengl5-dev on mx linux to get past the error you describe.
sudo apt-get install Qt5OpenGL*

@jerry12122134
Copy link

jerry12122134 commented Oct 7, 2023

Also, the make file failed at the rsvg-convert command. I had to install that with:
sudo apt-get install librsvg*

and then force a remake with:
make -f release.makefile -B

@Vance-ng-vn
Copy link

I had to install libqt5opengl5-dev on mx linux to get past the error you describe. sudo apt-get install Qt5OpenGL*

thanks u, nice answers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants