Rack’s rtaudio dependency requires cmake 3.10. I’m trying to build rack in a Docker image built on Ubuntu 16.04. I get this error message:
cd rtaudio && mkdir -p build
cd rtaudio/build && cmake -DCMAKE_INSTALL_PREFIX="/Rack/dep/." -DCMAKE_INSTALL_LIBDIR=lib -DRTAUDIO_BUILD_STATIC_LIBS=ON -DRTAUDIO_API_ALSA=ON -DRTAUDIO_API_JACK=OFF -DRTAUDIO_API_PULSE=OFF -DRTAUDIO_API_OSS=OFF ..
CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
CMake 3.10 or higher is required. You are running version 3.5.1
When I build the docker image, I apt-get install cmake without specifying a version. I’ve tried specifying apt-get install cmake=3.10 to no avail.
Any idea how to get cmake 3.10 (or higher) on Ubuntu 16.04? Will I have to build it instead of installing it?
A quick scan of the internet suggests that installing yum on Ubuntu is a sin against four different gods. I lack the religious training to evaluate such things.
I was able to install cmake 3.10 in my docker image by adding this to my Dockerfile:
ADD https://cmake.org/files/v3.10/cmake-3.10.3-Linux-x86_64.sh /cmake-3.10.3-Linux-x86_64.sh
RUN mkdir /opt/cmake \
&& sh /cmake-3.10.3-Linux-x86_64.sh --prefix=/opt/cmake --skip-license \
&& ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
I’m on an old distro (Fedora 23) and occasionally run into this problem. I resolved the issue by building the latest cmake myself and installing it to the /opt directory (NOT to anywhere in the /usr hierarchy). Then when I need it I’ll invoke it (or link it) from that path.
You can just change the required CMake version in the CMakeLists.txt of rtaudio definition, as rtaudio does not need this version to build. This then should also a be problem for rtmidi.