Trouble building rtaudio in Ubuntu 16.04

(Dale Emery) #1

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
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?

(Andrew Belt) #2

You could install a binary.

(Dale Emery) #3

Thanks, I’ll try that.

(Antonio Tuzzi) #4

I had the same problem
solved with a

sudo yum install


(Dale Emery) #5

Would I need to install yum first, or is it already there?

(Dale Emery) #6

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:

RUN mkdir /opt/cmake \
  && sh / --prefix=/opt/cmake --skip-license \
  && ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
1 Like
(Antonio Tuzzi) #7

sorry you should use

apt get install cmake

or something related on Ubuntu!
current cmake should be 3.11
(I’m on Debian!)

(Dale Emery) #8

On Ubuntu 16.04 that command installs cmake 3.5.1, which is how the failure happened in the first place.

1 Like
(Dave Phillips) #9

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.

(David O'Rourke) #10

Just run into this myself. I’m compiling cmake now.

This dependency is going to be an issue for pretty much anyone building on Ubuntu.

1 Like
(Andrew Belt) #11

I don’t see a workaround other than sending a patch to RtAudio that downgrades the CMake requirement. They might not accept it.

(David O'Rourke) #12

No, I can’t think of a good solution either.

EDIT: Actually someone else has already submitted exactly such a PR to rtaudio

(Dale Emery) #13

In the instructions for how to build Rack on Ubuntu 16.04, include instructions for how to install a sufficient version of cmake.