Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
313 stars 134 forks source link

Cmake error on Linux Mint 22 Wilma #843

Closed jimdbr closed 1 day ago

jimdbr commented 6 days ago

Building on Linux Mint 22 Wilma with CMake 3.28.3. The error is:

Make Error at CMakeLists.txt:92 (cmake_policy): Policy "CMP0167" is not known to this version of CMake.

matty0ung commented 6 days ago

This looks to be because of https://github.com/Brewtarget/brewtarget/pull/833/files.

We build every night on Ubuntu 22.04, so I would have vaguely hoped that Mint 22 would have about the same versions of things.

If you have an easy way to upgrade to CMake 3.29, that would be worth a try.

Alternatively, you could try building with Meson. (Give me a shout if you need more info on how to do that.)

Otherwise, I'll try to see if we can put in conditional sections in CMakeLists.txt so that it can be processed by both older and newer versions of CMake.

jimdbr commented 5 days ago

Uninstalled CMake 3.28.3 via package manager and installed CMake 3.30.4 from source. The default install is /usr/local/bin so I needed a sym link in /usr/bin. After that brewtarget was built, installed and ran without errors. The log file looks good.

Thanks.

matty0ung commented 5 days ago

Glad you got it working. Will upload the CMake tweak too just in case someone else hits the same problem.

jimdbr commented 5 days ago

I forgot to mention that I also had to install libssl-dev to get some stuff required for the CMake build.

matty0ung commented 5 days ago

Ah, OK, yes, that sounds a bit fiddly. Hopefully https://github.com/Brewtarget/brewtarget/pull/844 will make it easier for the next person to hit this.

matty0ung commented 1 day ago

Fix included in Release 4.0.6.