-
Notifications
You must be signed in to change notification settings - Fork 3
Building: CentOS 6
Craig Minihan edited this page Jan 5, 2017
·
24 revisions
CentOS 6 has quite an old set of dependencies which must be updated before we can build libjsapi
. First we must install GCC 4.4.7:
yum install gcc gcc-c++ make autoconf autoconf213 wget curl git unzip xz
Now add EPEL:
yum install epel-release
Now we need to build and install GCC 4.9.2:
yum install libmpc-devel mpfr-devel gmp-devel
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O
tar xvfj gcc-4.9.2.tar.bz2
cd gcc-4.9.2
./configure --disable-multilib --enable-languages=c,c++ --program-suffix=-4.9
make
make install
Now we need Python 2.7:
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel
wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local
make
make altinstall
Now you can clone and build libjsapi
:
git clone --recursive https://github.com/RipcordSoftware/libjsapi.git
cd libjsapi
make CC=gcc-4.9 CXX=g++-4.9
If the build process completes you can build and run the examples:
cd examples
make CC=gcc-4.9 CXX=g++-4.9
export LD_LIBRARY_PATH=/usr/local/lib64
./helloworld
Since libjsapi
is built with GCC 4.9.2 it depends on shared libraries not installed in your dynamic linker search path. You must therefore always set LD_LIBRARY_PATH
before executing any application which links to libjsapi
on a CentOS 6 system.
The Mandelbrot example requires GTK+ 3.x which isn't available on CentOS 6.x, so you won't be able to run that example code on a CentOS 6 system.