Installing ALSA Development Kit
The OSS sound API is very old and not well supported. It is recommended that you use the ALSA sound API. The PortAudio configure script will look for the ALSA SDK. You can install the ALSA SDK on Ubuntu using:
sudo apt-get install libasound-dev
You might need to use yum, or some other package manager, instead of apt-get on your machine. If you do not install ALSA then you might get a message when testing that says you have no audio devices.
You can find out more about ALSA here: http://www.alsa-project.org/
Configuring and Compiling PortAudio
You can build PortAudio in Linux Environments using the standard configure/make tools:
./configure && make
That will build PortAudio using Jack, ALSA and OSS in whatever combination they are found on your system. For example, if you have Jack and OSS but not ALSA, it will build using Jack and OSS but not ALSA. This step also builds a number of tests, which can be found in the bin directory of PortAudio. It's a good idea to run some of these tests to make sure PortAudio is working correctly.
Using PortAudio in your Projects
To use PortAudio in your apps, you can simply install the .so files:
sudo make install
Projects built this way will expect PortAudio to be installed on target systems in order to run. If you want to build a more self-contained binary, you may use the libportaudio.a file:
cp lib/.libs/libportaudio.a /YOUR/PROJECT/DIR
On some systems you may need to use:
cp /usr/local/lib/libportaudio.a /YOUR/PROJECT/DIR
You may also need to copy portaudio.h, located in the include/ directory of PortAudio into your project. Note that you will usually need to link with the approriate libraries that you used, such as ALSA and JACK, as well as with librt and libpthread. For example:
gcc main.c libportaudio.a -lrt -lm -lasound -ljack -pthread -o YOUR_BINARY
Reference
Found solution by myself but thanks @edwinksl for his tip.
In order to install dlib
for python3 it's better to use pip
:
pip install dlib
You will need boost python. To get it:
sudo apt-get install libboost-all-dev
If you have "Could NOT find PythonLibs (missing: PYTHON_LIBRARIES) (Required is at least version "3.4")" error make sure you have cmake > 2.8 (In my case it is 3.2.2). To install cmake > 2.8:
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update
sudo apt-get install cmake
That solved the issue for me.
Best Answer
Your installation with
cmake
fails because you are downloading a very old version ofjsoncpp
from SourceForge , a version that actually does not use cmake. The file README.txt with the 0.5.0 tarball has the details:Newer versions of
jsoncpp
are seen on GitHub (latest stable version is 1.7.3) and these actually do usecmake
to build.However a reasonable version exists in the Trusty Repositories and the following command will get you
jsoncpp 0.6.0
:Here are the details of the package on my system:
If you need a newer version this can be built from source but perhaps this version is enough for your purposes...