If you want to compile ncmpcpp on CentOs 8 then you have to get a few requirements out of the way first. If you are new to compiling applications on Linux then this can be a bit daunting the first time you do it.
The purpose of this guide is to give you the exact commands that you need to run to get ncmpcpp compiling on CentOS 8.
The first time I managed to get ncmpcpp on CentOs8 it took a while to figure out which dependencies I was missing, so I wrote them all down after testing it in a virtual machine to make sure that I had it correct.
This guide was written in late 2019 using CentOs 8 x64 version 1905 and ncmpcpp-0.8.2. I enabled the options for:
- Display available outputs
- Show the output visualizer
- FFT visualization
- MP3 Tag editing
Make Sure CentOs 8 Meets the Requirements
If you are just now installing CentOs 8 and you plan on compiling software then you need to make sure that, at a minimum, you include the development options, as shown here:
When you install CentOs 8 make sure that you enable Development Tools so that you can compile custom software, such as ncmpcpp. If you didn't enable this, no big deal. Yum will fetch the requirements when you run the commands in this guide. It will just take longer to download them all.
As soon as CentOs 8 is installed update it with the following command:
sudo yum update -y
After this you can install the necessary libraries.
At least one of the libraries (mpc-devel, mpdclient, and mpdclient-devel come to mind) requires EPEL, so let's install that first.
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
Lastly, you're going to need to enable the PowerTools repository like this:
sudo dnf config-manager --set-enabled PowerTools
After all of that background work is done you can install the prerequisits to compiling ncmpcpp. We'll do it all in one line to make it faster. Each of these packages is required:
sudo yum install boost-devel glib2 libmpc libmpc-devel libmpdclient libmpdclient-devel fftw-devel taglib-devel readline-devel libcurl-devel -y
Compiling ncmpcpp With FFT Visualizations
Now it's time to compile ncmpcpp, including the options that you want. First we need to clone it from the git repository, like this:
git clone https://github.com/arybczak/ncmpcpp.git cd ncmpcpp
At this point in time you can do the standard linux compile of "autogen, configure, make, make install", but if you want to add some options like FFT visualizations and TagLib support you have to be sure to do it on the configure step, like this:
./autogen.sh ./configure --enable-outputs --enable-visualizer --enable-clock --with-fftw --with-taglib make make install
Both the configure command and the make command take quite a while to run, like in the order of 5 minutes for the make command.
If all goes well you should have ncmpcpp ready to run in your /usr/local/bin/ncmpcpp directory, which most likely IS NOT already be in your path. You can start it by tying the full path at the bash prompt:
You can switch to visualizations view by pressing '8', and then toggle the different visualization modes with the keyboard.
I could not get them to look correct in Putty or Kitty, but Xshell 6 rendered them perfectly without any fiddling with character translation or font.
Here's a shot of ncmpcpp FFT visualizations working perfectly on a Windows terminal using Xshell 6.
All Commands In Order
To make it easier to copy/paste here are all the commands that you have to run in order to download, compile, and install ncmpcpp on CentOs 8:
sudo yum update -y sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y sudo dnf config-manager --set-enabled PowerTools sudo yum install boost-devel glib2 libmpc libmpc-devel libmpdclient libmpdclient-devel fftw-devel taglib-devel readline-devel libcurl-devel -y git clone https://github.com/arybczak/ncmpcpp.git cd ncmpcpp ./autogen.sh ./configure --enable-outputs --enable-visualizer --enable-clock --with-fftw --with-taglib make make install
Depending on your Linux distribution, not all of these steps may be necessary. Ubuntu seems to have more of these types of audio-related libraries already installed, whereas CentOS does not. Getting ncmpcpp to compile on Ubuntu is likely to be a few steps easier.