-
Notifications
You must be signed in to change notification settings - Fork 19
Building on Ubuntu 14.04
On Ubuntu 14.04 x64 LTS, GCC 4.8 is the default compiler but these plugins require GCC4.9. The same holds for ninja (1.3.x is available in the default repo but 1.5.3 is required).
(GCC4.8 does not support the -fdiagnostics-color option. You get the following error:
cc: error: unrecognized command line option ‘-fdiagnostics-color=always’
)
Install GCC4.9 (source: http://askubuntu.com/questions/428198/getting-installing-gcc-g-4-9-on-ubuntu)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9
after that if you check the version of gcc you will find the old version:
gcc --version
so we can fix it with symbolic links
cd /usr/bin
rm gcc g++ cpp
ln -s gcc-4.9 gcc
ln -s g++-4.9 g++
ln -s cpp-4.9 cpp
Install ninja from source (source: https://ninja-build.org/):
git clone git://github.com/ninja-build/ninja.git && cd ninja
git checkout release
./configure.py --bootstrap
ninja --version
will now show version 1.7.1
Next, I still could not get it to compile.
After ./configure
I had to change the build/build.ninja manually by changing the compiler options from -c
to -c -std=c11
Lastly, the M_PI macro is not defined (see: http://stackoverflow.com/questions/26065359/m-pi-flagged-as-undeclared-identifier) For that, I had to add
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
to
gst-libs/gst/3d/gst3dmesh.c
and gst-libs/gst/3d/gst3dcamera_arcball.c
Finally, make
and sudo make install
run without problems.
I am sure there are better ways to fix these problems, but I hope this helps.