Mod Archive Forums

Music Production => MilkyTracker => Tracking => MilkyTracker Support => Topic started by: retrocoder on March 19, 2018, 22:08:03

Title: Cant build Milkytracker with SDL2 on Centos 7
Post by: retrocoder on March 19, 2018, 22:08:03
Hello trackers!
I have a build problem I havent been able to resolve. Maybe anyone can give me some hints on how to proceed.
I am running centos 7 on my work station and I have cloned the milkyway git repo. After that I installed all dependencies with yum. And then I tried building milkytracker with cmake but got the folliowing error message:
"CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SDL2MAIN_LIBRARY"
After searching a little I found "https://raw.githubusercontent.com/brendan-w/collector/master/cmake/FindSDL2.cmake" which I downloaded into my /usr/share/cmake/Modules/ directory.
But I still get errors when I try to build milkytracker:
$ cmake ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found SDL2: /usr/include/SDL2 (found suitable version "2.0.3", minimum required is "2")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Could NOT find LHASA (missing:  LHASA_LIBRARY LHASA_INCLUDE_DIR)
-- Found ZZIPLIB: /usr/lib64/libzzip.so (found version "0.13.62")
-- Found ALSA: /usr/lib64/libasound.so (found version "1.1.3")
-- Found JACK: /usr/lib64/libjack.so (found version "1.9.9.5")
-- Could NOT find RTMIDI (missing:  RTMIDI_LIBRARY RTMIDI_INCLUDE_DIR) (Required is at least version "2.1.0")
MIDI support disabled (RtMidi unavailable)
LHA decompressor disabled (lhasa unavailable)
-- Enabled GZIP decompressor
-- Enabled ZIP decompressor
-- Enabled ALSA support
-- Enabled JACK support
-- Enabled SDL2 support
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SDL2MAIN_LIBRARY

Especially see the row
-- Found SDL2: /usr/include/SDL2 (found suitable version "2.0.3", minimum required is "2")
But still I get CMake error on SDL2.
So what can I do to fix this?

Title: Re: Cant build Milkytracker with SDL2 on Centos 7
Post by: Deltafire on April 05, 2018, 23:09:58
It looks like either the SDL2 library is not installed, or the FindSDL2.cmake script that you downloaded isn't finding it.

CMake allows you to manually set the variables, you should set SDL2MAIN_LIBRARY to the correct location.