Hi, Kurento users and the team,
seems some of us were trying to compile the kms server from C sources, and it turned out not to be an easy task. I just waned to share some step-by-steps here.
You can use the described strategy on both Ubuntu 14.04 and 16.04. By the time of writing the Kurento repo on GitHub contains sources version 6.6.1.
Heads up, you need a clean installation of ubuntu. I was testing the desktop versions 14.04.5 LTS (
http://releases.ubuntu.com/trusty) and 16.04.2 LTS (
http://releases.ubuntu.com/xenial), but the server distros should work too, please confirm. With non-clean installs, many packages (like those of kms 6.6.2-dev) were getting in the way making (or c-making ;)) cmake unhappy.
Copy-paste-run the instructions below by one line if you prefer watching the output in your terminal, answering "y" when asked.
1. Point to the deb repos to be looked for packages.
U 14.04
U 16.04
2. Download kms packages.
3. Install git, then clone kms sources.
4. Now the trick, we need to find out, which packages are needed. If you install wrong packages, the build won't succeed. To figure out correct packages, we need to open the
/home/dev/kurento-media-server/debian/control file and take a note of the "Build-Depends" section. Run
apt-get install for all the listed packages.
sudo apt-get install cmake
sudo apt-get install debhelper
sudo apt-get install binutils
sudo apt-get install kms-core-6.0-dev
sudo apt-get install kms-elements-6.0-dev
sudo apt-get install kms-filters-6.0-devsudo apt-get install libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libboost-log-dev libevent-dev libssl-dev
5. On Ubuntu 16.04, you need to install some extra packages:
U 16.04
sudo apt-get install libboost-all-dev
sudo apt-get install libssl-dev
sudo apt-get install pkg-config
sudo apt-get install libevent-dev
6. Now you are ready to cross fingers and go cmake:
cd ~/kurento-media-server
cmake .
make -j4
sudo make install
7. If you are going to work on kms filters or elements, you need to clone their sources. I needed kms elements, so I provide instructions on building them, but for filters or whatever else kms packages you can use the same approach.
8. Get dependencies from the "Build-Depends" section of
/home/dev/kms-elements/debian/controlsudo apt-get install pkg-config
sudo apt-get install kms-core-6.0-dev
sudo apt-get install libboost-filesystem-dev
sudo apt-get install libboost-test-dev
sudo apt-get install libsoup2.4-dev
sudo apt-get install libnice-dev
sudo apt-get install gstreamer1.5-nice
sudo apt-get install uuid-dev
sudo apt-get install valgrind
sudo apt-get install openwebrtc-gst-plugins-dev
sudo apt-get install ffmpeg
sudo apt-get install libav-tools
sudo apt-get install libssl-dev
9. Now cmake/make/install/develop.
cd ~/kms-elements
cmake .
make -j4
sudo make install
The instruction above are not optimized in a sense that some of the packages will be tried to install twice, but extra warnings "already installed" is nothing compared to the joy of successful build in the end. Maybe some of you will come up with a source build installation script. I tested on bare metal, never tried VMs /AWS instances.
Please come back with any issues you come across. If the instructions work for you, the team might want to include them in the docs, no attribution needed.
Cheers,
Sergei