projectM-visualizer / projectm

projectM - Cross-platform Music Visualization Library. Open-source and Milkdrop-compatible.
https://discord.gg/mMrxAqaa3W
GNU Lesser General Public License v2.1
3.33k stars 372 forks source link

Build fails #686

Closed matiasw closed 1 year ago

matiasw commented 1 year ago

Build fails I am trying to build projectM on a Retropie box, which is based on Raspbian.

Desktop :

I am following the instructions in the Wiki for Linux. However, I get to cmake -DCMAKE_BUILD_TYPE=Release .. and get errors:

CMake Error at src/api/CMakeLists.txt:3 (target_sources):
  target_sources may only set INTERFACE properties on INTERFACE targets

CMake Error at src/api/CMakeLists.txt:9 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "FOLDER" is not allowed.

CMake Error at cmake/GenerateExportHeader.cmake:391 (get_target_property):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "DEFINE_SYMBOL" is not allowed.
Call Stack (most recent call first):
  cmake/GenerateExportHeader.cmake:423 (_do_generate_export_header)
  src/api/CMakeLists.txt:25 (generate_export_header)

CMake Error at src/playlist/FilesystemSupport.cmake:7 (include):
  include could not find load file:

    CheckSourceCompiles
Call Stack (most recent call first):
  src/playlist/CMakeLists.txt:33 (include)

CMake Error at src/playlist/FilesystemSupport.cmake:8 (check_source_compiles):
  Unknown CMake command "check_source_compiles".
Call Stack (most recent call first):
  src/playlist/CMakeLists.txt:33 (include)

-- Configuring incomplete, errors occurred!

I am attaching the referenced CMakeOutput.log and CMakeError.log.

CMakeError.log CMakeOutput.log

kblaschke commented 1 year ago

Your CMake version is probably too low, we didn't bump the minimum required version yet (3.14 currently), as there still are changes being made to the build system.

Try using CMake 3.20 or higher, as the failing features should all be there since this version. If your OS doesn't provide it, you can either build it easily, or use the latest Linux aarch64 binary release from the official page: https://cmake.org/download/

matiasw commented 1 year ago

I got it to compile - see here: https://github.com/projectM-visualizer/projectm/issues/635

kblaschke commented 1 year ago

That's good to hear!

As stated in the other issue and on Discord, I'll be bumping up the required CMake version to 3.20. Some distros come with older versions, but CMake is really easy to upgrade, so that shouldn't hurt anyone and makes structuring the builds way easier than with older versions.

Closing the issue for now.