compile singularity [debian, ubuntu]

install singularity [ubuntu 16.04]:

based on:
http://www.singularityviewer.org/kb/build-linux

sudo apt install cmake
sudo apt install build-essential -y
sudo apt-get install libc6-dev libstdc++6 libx11-dev libxrender-dev
sudo apt install python-pip
sudo pip install --upgrade pip
sudo apt-get install opengl
sudo apt install libx
sudo apt install mercurial
sudo apt install libpng-dev
sudo apt install libimlib2-dev
sudo apt install libglm-dev
sudo apt-get install libxrandr-dev
sudo apt-get install libxrender-dev
sudo apt-get install libglew-dev
sudo apt-get install libimlib2-dev
sudo apt-get install libxext-dev
sudo apt-get install libpng-dev libjpeg-dev libxxf86vm1 libxxf86vm-dev libxi-dev libxrandr-dev
sudo apt-get install gcc-multilib g++-multilib
sudo apt-get install gcc-4.9
sudo apt-get install --install-recommends bison bzip2 cmake curl flex g++-4.9 gdb m4 mercurial python python-dev python-pip
sudo apt-get install --install-recommends libgl1-mesa-dev libglu1-mesa-dev libstdc++6 libx11-dev libxinerama-dev libxml2-dev libxrender-dev
sudo apt-get install gstreamer1.0-pulseaudio:i386
sudo apt install gstreamer-0.10-dev
sudo apt install gstreamer-0.10
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
sudo apt install gstreamer-plugins-base-0.10
sudo apt install libgstreamer-plugins-base-0.10
sudo apt install libgstreamer-plugins-base0.10-0
sudo apt install gcc
sudo apt install g++
sudo apt install libgstreamer-plugins-base1.0
sudo apt install libgstreamer-plugins-base0.10-0-dev
sudo apt install libgstreamer1.0-dev
sudo apt install libgstreamer-plugins-base0.10-dev #correct one
sudo apt install libgstreamer-plugins-base1.0-dev
sudo apt install libboost-dev
sudo apt-get install g++ libboost-dev cmake make git
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 85 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.9
g++ -v #to check it
gcc -v #to check it
git clone git://github.com/singularity-viewer/SingularityViewer.git singularity
cd singularity/
git reset --hard 1271eeb80824a3ac94afad7a50d9de7de0c9a873
sudo pip install "hg+https://bitbucket.org/alchemyviewer/autobuild-alchemy"
autobuild configure -c Release -p linux64 -- -DFMODSTUDIO:BOOL=ON
cd build-linux-x86_64/
make -j 2

now the viewer should be in:
/singularity/build-linux-x86_64/newview/packaged/bin

compile singularity from sources [ubuntu 64 bit 14.04]:
if you are using a 16.x system i recommend to install virtualbox
in virtualbox install ubuntu 14.04 (2500 MB RAM and 2 cores for the virtual machine)
then you can also follow the instruction (compiling took 1h 40min for me)
to get the packaged folder to your real system i recommend to create a compressed archive of it.
based on:
http://pastebin.com/hKYxB0v3
http://www.singularityviewer.org
install some tools:
sudo apt install libldap2-dev libidn11-dev
sudo apt install git-core -y
sudo apt install cmake -y
sudo apt install build-essential -y
sudo apt install bison flex -y
sudo apt install freeglut3-dev -y
sudo apt install openssl -y
sudo apt install libxrender-dev -y
sudo apt install libxinerama-dev -y
#sudo apt install libcrypto++9 -y
sudo apt install libcrypto++

make a folder and clone the git:
mkdir singularitydev
cd singularitydev
git clone https://github.com/singularity-viewer/SingularityViewer.git
cd SingularityViewer
git reset --hard 897e175d3c9be3ea25acbf5c7b4a53dc53e31453
wget -O xyz.patch http://xyz/singularity/master?codeblock=1
cat xyz.patch | patch -p1 --dry-run
cat xyz.patch | patch -p1

setup the build script for 64bit:
indra/develop.py -m64 -tRelease configure -DFMODSTUDIO:BOOL=TRUE #not =ON ?
setup the build script for 32bit:
indra/develop.py -m32 -tRelease configure -DFMODSTUDIO:BOOL=TRUE
now build it (that took 4 hours or so for me)
64bit:
cd build-linux-x86_64-release
32bit:
cd build-linux-i686-release
make -j 2

then you should find it in:
~/singularitydev/singularity/build-linux-x86_64-release/newview/packaged
install the 64 bit one:
cd ~/singularitydev/SingularityViewer/build-linux-x86_64-release/newview/packaged/ && ./install.sh
cd
sudo rm -r singularitydev

remove things if your build failed:
cd /var/tmp/$USER && rm -r sg.install.cache/
cd ~/singularitydev/SingularityViewer && rm -r build-linux-x86_64-release/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.