Currently Online

Latest Posts

Topic: missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY

Nanautzin
Avatar
Topic Opener
Joined: 2023-05-15, 18:01
Posts: 4
Ranking
Just found this site
Posted at: 2023-05-15, 18:07

While building Widelands, an error is occurring. CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY) Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindOpenGL.cmake:443 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:156 (find_package)

I'm using MSYS2, and I have installed all possible packages.

Do you have any advice on how I can resolve this problem?


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2745
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2023-05-15, 19:51

Hi,
welcome to the forum. To provide any advice we would need more information:
- Which OS version?
- which widelands version did you try to compile?
- where did you install MSYS2?
- what were the exact steps you performed to do so?
- what steps did you try to resolve this so far?

First recommendation is to clear the buildfolder and try a clean new build

edit: how do you start MSYS2 bash? and which compiler for which version do you want to use (i.e. mingw32 or mingw64)?

Edited: 2023-05-15, 19:55

Top Quote
Nanautzin
Avatar
Topic Opener
Joined: 2023-05-15, 18:01
Posts: 4
Ranking
Just found this site
Posted at: 2023-05-16, 06:02

Hi hessenfarmer Thanks for fast answer

  • Which OS version?

Windows 11

  • which widelands version did you try to compile?

I don't undestand what, i see only one version, i forked, clone and tryed to build version what it is in master barnch.

  • where did you install MSYS2?

If you mean path, C:\msys64

  • what were the exact steps you performed to do so?

I installed and configured my MSYS2 several months ago, and it has been working fine. I have already used it with CMake, Make, and GCC. Before building, I installed the required packages mentioned on this page: https://www.widelands.org/wiki/BuildingWidelands/

  • what steps did you try to resolve this so far?

I tried finding a solution on Google, and they suggested installing some packages that have OpenGL. I installed those, but the problem didn't disappear. I also deleted the build folder several times and tried rebuilding with different flags.

edit: how do you start MSYS2 bash? and which compiler for which version do you want to use (i.e. mingw32 or mingw64)?

64


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2552
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2023-05-16, 09:22

You have to install the dependencies inside the msys environment, not inside windows, if you did the latter the build process can't find the libraries.

Did you read https://www.widelands.org/wiki/BuildingWidelandsUnderWindowsNew/ ?


Top Quote
Nanautzin
Avatar
Topic Opener
Joined: 2023-05-15, 18:01
Posts: 4
Ranking
Just found this site
Posted at: 2023-05-16, 18:04

kaputtnik wrote:

You have to install the dependencies inside the msys environment, not inside windows, if you did the latter the build process can't find the libraries.

Did you read https://www.widelands.org/wiki/BuildingWidelandsUnderWindowsNew/ ?

I had some problems with MSYS. I deleted everything and installed it again, and now it works. Following the instructions from the link, I additionally had to install the Asio and ICU packages. Thanks all for the help.

In the end, I would like to ask how I can run the application after building it?


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2745
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2023-05-16, 22:30

Nanautzin wrote:

In the end, I would like to ask how I can run the application after building it?

you need to have the executable (you can find this in your buildfolder in the src folder) in the same folder togehter with the related data folder ( by copying it to such a directory) or you need to specify the datadir to use with the --datadir= PATH TO YOUR DATADIR option.
Personally I have created a link on my desktop pointing to the executable and In the properties of the link I added the --datadir=D:\widelands\data option to point at the data dir in the git repository where I build the executable from. By this the data and the executable are always in sync without the need to perform copies or similar.


Top Quote
Nanautzin
Avatar
Topic Opener
Joined: 2023-05-15, 18:01
Posts: 4
Ranking
Just found this site
Posted at: 2023-05-17, 06:09

hessenfarmer wrote:

Nanautzin wrote:

In the end, I would like to ask how I can run the application after building it?

you need to have the executable (you can find this in your buildfolder in the src folder) in the same folder togehter with the related data folder ( by copying it to such a directory) or you need to specify the datadir to use with the --datadir= PATH TO YOUR DATADIR option.
Personally I have created a link on my desktop pointing to the executable and In the properties of the link I added the --datadir=D:\widelands\data option to point at the data dir in the git repository where I build the executable from. By this the data and the executable are always in sync without the need to perform copies or similar.

Now everything works, thanks


Top Quote
hessenfarmer
Avatar
Joined: 2014-12-11, 23:16
Posts: 2745
Ranking
One Elder of Players
Location: Bavaria
Posted at: 2023-05-17, 10:40

you are welcome


Top Quote