Mar 5, 2011

Compiling FreeCAD on Ubuntu: The easy way

If you are curious about the progress on FreeCAD's  development you will probably like the idea of installing the latest development release from source. Let's do that step by step on Ubuntu following the instructions of FreeCAD's documentation

  • Enabling the Source code repository
The very first step is to enable the Source-Code repository on your system. This is necessary for the second step. Go to Ubuntu Software Center and select Edit--->Software Sources from menu. Then select the Source Code choice on the first tab. Reload your package manager's information (you will be prompted to do that after closing the window)
  • Installing building dependencies
Now you have to install the necessary packages for building FreeCAD. You can do this automatically by typing the following command in terminal
sudo apt-get build-dep freecad
  • Downloading the latest source 
Now you have to get the latest development version of FreeCAD's source code. You can do it easily by typing the following command in a terminal:
svn co https://freecad.svn.sourceforge.net/svnroot/free-cad/trunk freecad
This command will download the latest available source code of  FreeCAD and save it inside the freecad folder in your home directory
  • Building
First use Synaptic or Software Center to install automake and libtool packages or install them via terminal with the command:
sudo apt-get install automake libtool
  1. Open a terminal (if you don't have any opened) and move to your freecad folder : cd freecad
  2. Type the following 3 commands : 

./autogen.sh    
./configure  
 make

    The first command creates a configuration script, the second command uses this script to check if your system is ready to build the package and the last command builds the package. This last command usually takes some time to be finished.

      • Installing
      Simply type:
      make install
      to install your package to your home folder ( you don't need to use sudo). This command will install FreeCAD in the FreeCAD folder inside your home directory. You can run FreeCAD by clicking on the FreeCAD executable archive inside the ~/FreeCAD/bin/ folder. You can create a launcher on Desktop for easy access to the program.

      • Uninstalling
      Just delete the FreeCAD folder

          1 comment:

          1. I am so happy that a Greek i suppose is writing this blog!I am studying architecture and am trying soooo hard to stay in linux and erase my windows partition BUT i find this very hard!So all your useful stuff is huge for me!Do you have any idea of a workflow in architectural work with linux?It would be GREAT!Thanks

            ReplyDelete