Skip to content
Craig Minihan edited this page May 11, 2015 · 24 revisions

** THIS GUIDE IS NOT FULLY TESTED, IT MAY WORK BUT YOU ARE ON YOUR OWN UNTIL WE TEST IT OUT **

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:

sudo yum install gcc gcc-c++ make autoconf wget curl

Now we need to install GCC 4.9.2:

sudo 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.tar.bz2
./configure --disable-multilib --enable-languages=c,c++
make -j 4
sudo make install

Now we need Python 2.7:

sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-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
sudo make altinstall

Now you can clone and build libjsapi:

git clone https://github.com/RipcordSoftware/libjsapi.git
cd libjsapi
make

If the build process completes you can build and run the examples:

cd examples
make
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.

Clone this wiki locally