About My Blog



Whenever I get stuck doing something - the time comes to venture in the world of internet to find solution. In most cases I do find the solution, solve my problem and go on with my life. Then one day I am faced with the same problem. But now - I can't remember how the hell I solved it the first time. So the cycle begins again. Then I thought, what if I can remember all the those things? So here it is, my Auxiliary Memory. I decided to save all the problems and their solution in this blog so that I can get back to them when I need them. And the plus point is - so can everybody else.

Monday, November 17, 2014

Compiling Monodevelop in Ubuntu using git repo from behind proxy

I did the compiling twice to get a better idea of whats going on. If you install all the prerequisite packages correctly, the compilation is pretty straightforward - you clone the git, build it, and install. Here are the steps I followed -

Prerequisites

First thing first, the prerequisites. Open up a terminal and install this packages -
sudo apt-get install mono-complete mono-devel mono-xsp4 gtk-sharp2 gnome-sharp2 gnome-desktop-sharp2 mono.addins mono-tools-devel git-core build-essential checkinstall

For the compilation to succeed you will also need to import mozilla certificates. Run the following command to import the mozilla roots -
sudo mozroots --import --sync --machine

The --machine flag is only needed if you use sudo make to compile.

Cloning the Git

Now go to the folder where you want to clone the git. Here I have used /opt. Make sure your user has right permission to that folder. You can give permission using the following command -
chmod 777 -R /opt

If permission is right, then run the git clone command-
cd /opt
git clone git://github.com/mono/monodevelop.git

if you are behind proxy use https-
git clone https://github.com/mono/monodevelop.git

This will only clone monodevelop. We need to clone the submodules using another command. But if you are behind proxy, first you need to change the git urls to use https. For that open up the file .gitmodules and replace all git with https. Make sure the url ends with .git. You can easily do it by opening the file in vi and running the following ex command -
:%s/git:/https:/g

Now clone the submodules
cd monodevelop
git submodule init
git submodule update

If you are behind proxy you need to change git url in another .gitmodule file which will be cloned in /opt/monodevelop/main/external/monomac/.gitmodules after the update.

Compile & Install

Now we will compile and install monodevelop. First we run the configure script. Here I have used the default location to install monodevelop. You can pass --prefix=<location> to install monodevelop in other location.
./configure --select --profile=stable

After this we are ready to build.
make

If you have given the --select flag, you will be asked to select the modules to make. I have skipped all them since some of the addons are broken now. For example, valabinding addon needs libvala-0.12 and mine had later version installed which is not supported. After compilation is successful, run the following command to install monodevelop.
checkinstall

This command puts the program in the package manager for easy removal later.

Misc.

Some other packages that might need to be installed are.
sudo apt-get install libglade2.0-cil-dev
sudo apt-get install libtool
sudo apt-get install autoconf

No comments:

Post a Comment