milkytracker / MilkyTracker

An FT2 compatible music tracker
http://milkytracker.github.io/
Other
1.69k stars 162 forks source link

Can't cross compile MilkyTracker on Linux #230

Closed ghost closed 1 year ago

ghost commented 3 years ago

Specifications:

Expected behaviour:

Actual behaviour:

MilkyTracker only builds on the following architectures:

CMake finds the needed libraries but then it exits with the following errors:

CMake Deprecation Warning at CMakeLists.txt:176 (cmake_policy):
  The OLD behavior for policy CMP0004 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- Could NOT find LHASA (missing: LHASA_LIBRARY LHASA_INCLUDE_DIR) 
-- Found ZZIPLIB: /usr/aarch64-linux-gnu/usr/lib/libzzip.so  
-- Enabled MIDI support (ALSA/RtMidi)
LHA decompressor disabled (lhasa unavailable)
-- Enabled GZIP decompressor
-- Enabled ZIP decompressor
-- Enabled ALSA support
-- Enabled JACK support
-- Enabled SDL2 support
-- Configuring done
CMake Error in src/milkyplay/CMakeLists.txt:
  Imported target "SDL2::SDL2" includes non-existent path

    "/usr/include/SDL2"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in src/milkyplay/CMakeLists.txt:
  Imported target "SDL2::SDL2" includes non-existent path

    "/usr/include/SDL2"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in src/ppui/osinterface/CMakeLists.txt:
  Imported target "SDL2::SDL2" includes non-existent path

    "/usr/include/SDL2"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

CMake Error in src/ppui/osinterface/CMakeLists.txt:
  Imported target "SDL2::SDL2" includes non-existent path

    "/usr/include/SDL2"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

I suspect that there's a faulty option set for cross building so a regression, since the previous version of milkytracker (1.02.00) compiled without any issue.

Deltafire commented 3 years ago

Looks like the cmake command find_package(SDL2 REQUIRED) is setting up the include paths incorrectly. MilkyTracker v1.02 included a CMake script for this (see here), but this was removed to rely on the version that should be bundled with libsdl2.

As a workaround, try adding the deleted FindSDL2.cmake back to the cmake directory.