CompileOnUnix/es

En distribuciones recientes de linux, FreeCAD es sencillo de construir ya que todas las dependencias usualmente las provee el administrador de paquetes. Involucra 3 pasos básicamente:


 * 1) Getting the FreeCAD source code
 * 2) Getting the dependencies (packages FreeCAD depends upon)
 * 3) Compiling with "cmake . && make"

Below, you'll find detailed explanations of the whole process and particularities you might encounter. If you find anything wrong or out-of-date in the text below (Linux distributions change often), or if you use a distribution which is not listed, please help us correcting it.

Getting the source
Before you can compile FreeCAD, you need the source code. There are 3 ways to get it:

Git
The quickest and best way to get the code is to clone the read-only git repository (you need the git package installed): git clone git://git.code.sf.net/p/free-cad/code free-cad-code This will place a copy of the latest version of the FreeCAD source code in a new directory called "free-cad-code". The first time you try connecting to the free-cad.git.sourceforge.net host, you will receive a message asking to authenticate the sourceforge SSH key, which is normally safe to accept (you can check their SSH keys on the sourceforge website if you are not sure)

Github
There is an always up to date FreeCAD repository on Github: github.com/FreeCAD/FreeCAD_sf_master

Source package
Alternatively you can download a source package, but they could be already quite old so it's always better to get the latest sources via git or github.


 * Official FreeCAD source packages (distribution-independent): https://sourceforge.net/projects/free-cad/files/FreeCAD%20Source/
 * Debian (outdated): http://packages.debian.org/source/sid/freecad
 * Ubuntu (outdated): http://packages.ubuntu.com/source/precise/freecad

Getting the dependencies
To compile FreeCAD under Linux you have to install all libraries mentioned in Third Party Libraries first. Please note that the names and availability of the libraries will depend on your distribution. Note that if you don't use the most recent version of your distribution, some of the packages below might be missing from your repositories. In that case, look in the Older and non-conventional distributions section below.

Skip to Compile FreeCAD

Debian and Ubuntu
On Debian-based systems (Debian, Ubuntu, Mint, etc...) it is quite easy to get all needed dependencies installed. Most of the libraries are available via apt-get or synaptic package manager. build-essential cmake python python-matplotlib libtool either: libcoin60-dev (Debian Wheezy, Wheezy-backports, Ubuntu 13.04 and before) or: libcoin80-dev (Debian unstable(Jesse), testing, Ubuntu 13.10 and forward, See Additional instruction below]) libsoqt4-dev libxerces-c-dev libboost-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libboost-signals-dev libboost-thread-dev libqt4-dev libqt4-opengl-dev qt4-dev-tools python-dev python-pyside pyside-tools either: libopencascade-dev (official opencascade version) or: liboce*-dev (opencascade community edition) oce-draw gfortran libeigen3-dev libqtwebkit-dev libshiboken-dev libpyside-dev libode-dev swig libzipios++-dev libfreetype6 libfreetype6-dev Additional instruction for libcoin80-dev Debian wheezy-backports, unstable, testing, Ubuntu 13.10 and forward

Note that liboce*-dev includes the following libraries: liboce-foundation-dev liboce-modeling-dev liboce-ocaf-dev liboce-visualization-dev liboce-ocaf-lite-dev You may have to install these packages by individual name.

Optionally you can also install these extra packages: libsimage-dev (to make Coin to support additional image file formats) checkinstall (to register your installed files into your system's package manager, so yo can easily uninstall later) python-pivy (needed for the 2D Drafting module) python-qt4 (needed for the 2D Drafting module) doxygen and libcoin60-doc (if you intend to generate source code documentation) libspnav-dev (for 3Dconnexion devices support like the Space Navigator or Space Pilot)

Fedora
You need the following packages: cmake doxygen swig gcc-gfortran gettext dos2unix desktop-file-utils libXmu-devel freeimage-devel mesa-libGLU-devel OCE-devel python python-devel python-pyside-devel boost-devel tbb-devel eigen3-devel qt-devel qt-webkit-devel ode-devel xerces-c xerces-c-devel opencv-devel smesh-devel coin2-devel soqt-devel freetype freetype-devel And optionally: libspnav-devel (for 3Dconnexion devices support like the Space Navigator or Space Pilot) pivy ( https://bugzilla.redhat.com/show_bug.cgi?id=458975 Pivy is not mandatory but needed for the Draft module ) Building FreeCAD with coin3 is still more of a hassle on Fedora, since only coin2 is provided in the official repos, but if you wish so anyway, you can avoid to rebuild all the coin3 / soqt / pivy suite by installing coin3-ready packages from http://www.zultron.com/rpm-repo/

Gentoo
You need the following packages to build FreeCAD: dev-cpp/eigen dev-games/ode dev-libs/boost dev-libs/xerces-c dev-python/pivy dev-python/PyQt4 media-libs/coin media-libs/SoQt sci-libs/opencascade-6.5 sys-libs/zlib virtual/fortran x11-libs/qt-gui x11-libs/qt-opengl x11-libs/qt-svg x11-libs/qt-webkit x11-libs/qt-xmlpatterns dev-lang/swig-2.0.4-r1 app-admin/eselect-python-20091230 dev-lang/python-2.7.2-r3 dev-util/cmake-2.8.4 sys-apps/findutils-4.4.0 freetype Since the latest opencascade version is not available, you might want to compile opencascade too, hence the following additional libraries are needed: media-libs/ftgl virtual/opengl x11-libs/libXmu dev-lang/tcl-8.5.9 dev-lang/tk-8.5.9-r1 dev-tcltk/itcl-3.4_beta1 dev-tcltk/itk-3.4_pre20090417 dev-tcltk/tix-8.4.3 x11-libs/gl2ps sys-devel/automake-1.11 sys-devel/autoconf-2.68 sys-devel/libtool dev-java/java-config-2.1.11-r3

OpenSUSE
You need the following packages: gcc cmake OpenCASCADE-devel libXerces-c-devel python-devel libqt4-devel python-qt4 Coin-devel SoQt-devel boost-devel libode-devel libQtWebKit-devel libeigen3-devel gcc-fortran freetype2 freetype2-devel For FreeCAD 0.14 stable and 0.15 unstable you need to add Eigen3 and swig libraries, that don't seem to be in standard repos. You can get them with a one-click install here:
 * Eigen3
 * swig

Also, note that the Eigen3 Library from Factory Education was causing problems sometimes, so use the one from the KDE 4.8 Extra repo

Arch Linux
You will need the following libraries from the official repositories: boost-libs curl hicolor-icon-theme libspnav opencascade python2-pivy python2-matplotlib python2-pyside python2-shiboken qtwebkit shared-mime-info xerces-c boost cmake coin desktop-file-utils eigen gcc-fortran swig xerces-c Also, make sure to check the AUR for any missing packages that are not on the repositories, currently: python2-pyside-tools

Older and non-conventional distributions
On other distributions, we have very few feedback from users, so it might be harder to find the required packages. Try first locating the required libraries mentioned in Third Party Libraries. Beware that some of them might have a slightly different package name in your distribution (such as name, libname, name-dev, name-devel, etc...).

You also need the GNU gcc compiler version equal or above 3.0.0. g++ is also needed because FreeCAD is completely written in C++. During the compilation some Python scripts get executed. So the Python interpreter has to work properly. To avoid any linker problems during the build process it is also a good idea to have the library paths either in your LD_LIBRARY_PATH variable or in your ld.so.conf file. This is normally already the case in recent distributions.

For more details have also a look to README.Linux in your sources. Below is additional help for a couple of libraries that might not be present in your distribution repositories

Eigen 3
La librería Eigen3 es requerida por el módulo Sketcher. Esta librería está disponible únicamente a partir de los repositorios de Ubuntu 11.10. Para versiones anteriores de Ubuntu, puedes ya sea descargarlo de aquí e instalarlo manualmente, o agregar el PPA de Construcciones Diarias de FreeCAD a tus fuentes de software antes de instalarlo a través de alguno de los medios listado abajo.

OpenCASCADE community edition (OCE)
Recientemente OpenCasCade ha sido bifurcado (le han hecho fork) en Community edition, que es mucho más fácil de construir. FreeCAD puede utilizar cualquier versión instalada en tu sistema, ya sea la edición "oficial" o la edición de comunidad. El sitio web de OCE contiene instrucciones detalladas de como construirlo.

OpenCASCADE official version
Note: You are advised to use the OpenCasCade community edition above, which is easier to build, but this one works too. Not all Linux distributions have an official OpenCASCADE package in their repositories. You have to check for yourself if one is available for your distribution. At least from Debian Lenny and Ubuntu Intrepid an official .deb package is provided. For older Debian or Ubuntu releases you may get unofficial packages from here. To build your own private .deb packages follow these steps: wget http://lyre.mit.edu/~powell/opencascade/opencascade_6.2.0.orig.tar.gz wget http://lyre.mit.edu/~powell/opencascade/opencascade_6.2.0-7.dsc wget http://lyre.mit.edu/~powell/opencascade/opencascade_6.2.0-7.diff.gz

dpkg-source -x opencascade_6.2.0-7.dsc

sudo apt-get install build-essential devscripts debhelper autoconf automake libtool bison libx11-dev tcl8.4-dev tk8.4-dev libgl1-mesa-dev libglu1-mesa-dev java-gcj-compat-dev libxmu-dev
 * 1) Install OCC build-deps

cd opencascade-6.2.0 ; debuild
 * 1) Build Opencascade packages. This takes hours and requires
 * 2) at least 8 GB of free disk space

sudo dpkg -i libopencascade6.2-0_6.2.0-7_i386.deb libopencascade6.2-dev_6.2.0-7_i386.deb Alternativamente, puedes descargar y compilar la versión más reciente desde opencascade.org:
 * 1) Install the resulting library debs

Instala los paquetes normalmente, ten en cuenta que el instalador es un programa java que requiere el java official runtime edition de Sun (nombre del paquete: sun-java6-jre), no la versión open-source (gij) que viene incluída en Ubuntu. Instálalo si lo requieres. sudo apt-get remove gij sudo apt-get install sun-java6-jre Ten cuidado, si utiilzas gij java con alguna otra cosa como un plugin, ya no funcionarán. Si el instalador no funciona, intenta: java -cp path_to_file_setup.jar <-Dtemp.dir=path_to_tmp_directory> run Una vez instalado el paquete, dirígete al directiorio "ros" dentro de opencascade dir, y ejecuta: ./configure --with-tcl=/usr/lib/tcl8.4 --with-tk=/usr/lib/tk8.4 Ahora puedes construirlo. Regresa a la carpeta ros y haz: make Tomará mucho tiempo, inclusive varias horas.

Cuando terminae, instálalo haciendo: sudo make install Las librerías serán copiadas a /usr/local/lib, lo cúal está bien, ya que serán encontradas automáticamente por cualquier programa. Alternativamente, también puedes hacer: sudo checkinstall que hará lo mismo que make install, pero creará una entrada en tu administrador de paquetes para que puedes desinstalarlo fácilmente. Ahora elimina la enorme cantidad de archivos temporales de compilación mediante: make clean Posible error 1: Si está utilizando OCC versión 6.2, es probable que el compilador se detenda justo después de iniciar la operación "make". Si esto sucede, edita el script "configure", ubica la indicación CXXFLAGS="$CXXFLAGS " y reemplázala con CXXFLAGS="$CXXFLAGS -ffriend-injection -fpermissive". Después, intenta de nuevo.

Possible error 2: Posiblemente, varios módulos (WOKSH, WOKLibs, TKWOKTcl, TKViewerTest and TKDraw) se quejarán de que no pueden encontrar los headers tcl/tk, En ese caso, ya que la opción no se ofrece en el script de configuración, deberas editar manualmente el makefile de cada módulo: Dirígete a adm/make y dentro de cada módulo edita el Makefile. Localiza las líneas CSF_TclLibs_INCLUDES = -I/usr/include y CSF_TclTkLibs_INCLUDES = -I/usr/include y agrega /tcl8.4 y /tk8.4 para que lea: CSF_TclLibs_INCLUDES = -I/usr/include/tcl8.4 y CSF_TclTkLibs_INCLUDES = -I/usr/include/tk8.4

SoQt
La librería SoQt debe ser compilada con Qt4, lo que es el caso en las distribuciones más recientes. Al momento de escribir esto, solamente existen paquetes SoQt4 para Debian. Para obtener los paquetes sigue los siguientes pasos: wget http://ftp.de.debian.org/debian/pool/main/s/soqt/soqt_1.4.1.orig.tar.gz wget http://ftp.de.debian.org/debian/pool/main/s/soqt/soqt_1.4.1-6.dsc wget http://ftp.de.debian.org/debian/pool/main/s/soqt/soqt_1.4.1-6.diff.gz dpkg-source -x soqt_1.4.1-6.dsc sudo apt-get install doxygen devscripts fakeroot debhelper libqt3-mt-dev qt3-dev-tools libqt4-opengl-dev cd soqt-1.4.1 debuild sudo dpkg -i libsoqt4-20_1.4.1-6_i386.deb libsoqt4-dev_1.4.1-6_i386.deb libsoqt-dev-common_1.4.1-6_i386.deb Si estás en un sistema de 64 bits, necesitarás reemplazar i386 por amd64.

Pivy
Pivy no es necesario para construir FreeCAD o ejecutarlo, pero es requerido para que el módulo 2D Drafting funcione. Si no planeas utilizar este módulo, no necesitas pivy. En e momento de escribir esto, Pivy es muy reciente y puede que no esté en los repositorios de tu distribución. Si no puedes encontrarlos, puedes descargar los paquetes debian/ubuntu en la página de descargas de FreeCAD:

http://sourceforge.net/projects/free-cad/files/FreeCAD%20Linux/ or compile pivy yourself:

Pivy instrucciones de compilación

Utilizando cMake
cMake es un nuevo sistema de construcción que tiene la gran ventaja de ser común en diferentes sistemas (Linux, Windows, MacOSX, etc). FreeCAD está utilizando el sistema cMake como el sistema principal de construcción. Compilar con cMake es usualmente simple y sucede en dos pasos. En el primero, cMake revisa que todos los programas y librerías estén presentes en tu sistema y prepara todo lo necesario para la compilación subsecuente. Te son dadas algunas alternativas detalladas debajo, pero FreeCAD trae consigo defaults sensibles. El segundo paso es la compilación misma, la cual produce el ejecutable FreeCAD.

Dado que FreeCAD es una aplicación pesada, compilarlo tomará un poco de tiempo (alrededor de 10 minutos en una máquina rápida, 30 minutos en una máquina lenta)

In-source building
FreeCAD can be built in-source, which means that all the files resulting from the compilation stay in the same folder as the source code. This is fine if you are just looking at FreeCAD, and want to be able to remove it easily by just deleting that folder. But in case you are planning to compile it often, you are advised to make an out-of-source build, which offers many more advantages. The following commands will compile freecad: $ cd freecad (the folder where you cloned the freecad source) If you installed pivy from source, set the compiler flag to use the correct pivy (via FREECAD_USE_EXTERNAL_PIVY=1). Also, set the build type to debug. (NOTE: the "." and space after the cmake flags are CRITICAL!): $ cmake -DFREECAD_USE_EXTERNAL_PIVY=1 -DCMAKE_BUILD_TYPE=Debug. $ make Your FreeCAD executable will then reside in the "bin" folder, and you can launch it with: $ ./bin/FreeCAD

Construir fuera de la fuente
Si pretendes seguir la ráida evolución de FreeCAD, construir en una carpeta separada es mucho más conveniente. Cada vez que actualices el código fuente, cMake distinguirá inteligentemente que archivos han cambiado y recompilará solamente aquello que sea necesario. Construcciones fuera de la fuente son especialmente útiles al utilizar el sistema Git, ya que puedes probar fácilmente otras ramas sin confundir el sistema de construcción. Para construir fuera de la fuente, simplemente crea un directorio de construcción, distinto a tu carpeta fuente de freecad, y, desde la carpeta de construccion, indícale a cMake la carpeta fuente: mkdir freecad-build cd freecad-build cmake ../freecad (or whatever the path is to your FreeCAD source folder) make El ejecutable FreeCAD residirá en el directorio "bin" (dentro de tu directorio de construcción).

Configuration options
There are a number of experimental or unfinished modules you may have to build if you want to work on them. To do so, you need to set the proper options for the configuration phase. Do it either on the command line, passing -D : = options to cMake or using one of the availables gui-frontends (eg for Debian, packages cmake-qt-gui or cmake-curses-gui).

As an example, to configure on the command line with the Assembly module built, issue: cmake -D FREECAD_BUILD_ASSEMBLY:BOOL=ON path-to-freecad-root Possible options are listed in FreeCAD's root CmakeLists.txt file.

Using autotools
Autotools has been deprecated in favour of cMake, but old versions of FreeCAD were able to be built with Autotools. You must have automake and libtool installed on your system; on Debian/Ubuntu: aptitude install automake libtool If you got the sources with git or subversion, then the very first step must be ./autogen.sh that creates the configure script and more. For the build process itself we provide a configure script. Just type ./configure To get everything configured. If you want an overview of all options you can specify, you can type ./configure --help Normally you need none of them - unless you have one of your libraries installed in a really uncommon directory. After configuration has finished, compiling FreeCAD is as simple as make If any error occurs while building from sources, please double-check this page and README.Linux file, then you could jump to the Bug Tracker on SourceForge, choose Any for status and click the Browse button to see previous reports on compile problems. After having built FreeCAD successfully, do make install to install it onto your machine. The default install directory is ~/FreeCAD It will be installed in a FreeCAD folder in your home folder, so you don't need root privileges. Instead of make install, you can also do checkinstall In this way FreeCAD will be installed by your package management system, so you can uninstall it easily later. But since all of FreeCAD installation resides into one single directory, just removing the FreeCAD directory is a valid way to uninstall too.

Qt designer plugin
If you want to develop Qt stuff for FreeCAD, you'll need the Qt Designer plugin that provides all custom widgets of FreeCAD. Go to freecad/src/Tools/plugins/widget So far we don't provide a makefile -- but calling qmake plugin.pro creates it. Once that's done, calling make will create the library libFreeCAD_widgets.so. To make this library known to Qt Designer you have to copy the file to $QTDIR/plugin/designer

Doxygen
If you feel bold enough to dive in the code, you could take advantage to build and consult Doxygen generated FreeCAD's Source documentation

Making a debian package
If you plan to build a Debian package out of the sources you need to install those packages first: dh-make devscripts lintian (optional, used for checking if packages are standard-compliant) To build a package open a console, simply go to the FreeCAD directory and call debuild Once the package is built, you can use lintian to check if the package contains errors lintian your-fresh-new-freecad-package.deb (replace by the name of the package you just created)

Note for 64bit systems
When building FreeCAD for 64-bit there is a known issue with the OpenCASCADE 64-bit package. To get FreeCAD running properly you might need to run the ./configure script with the additional define _OCC64 set: ./configure CXXFLAGS="-D_OCC64" For Debian based systems this workaround is not needed when using the prebuilt package because there the OpenCASCADE package is built to set internally this define. Now you just need to compile FreeCAD the same way as described above.

Automake macros
The configure script of FreeCAD makes use of several automake macros that are sometimes not installed with their packages: bnv_have_qt.m4, coin.m4, and soqt.m4. If needed (error while configuring), google for them and you will find them easily. They are just simple scripts that you need to put in your /usr/share/aclocal folder.

Fedora 13
To build & install FreeCAD on Fedora 13, a few tips and tricks are needed:
 * Install a bunch of required packages, most are available from the Fedora 13 repositories
 * Download and build xerces
 * Download and build OpenCascade. Need to point it to xmu: ./configure --with-xmu-include=/usr/include/X11/Xmu --with-xmu-library=/usr/lib
 * Download and build Pivy. You have to remove 2 references to non existent "SoQtSpaceball.h" from pivy/interfaces/soqt.i Commenting out those two lines allow the build & install to work.
 * Configure Freecad. You will need to point it to a few things: ./configure --with-qt4-include=/usr/include --with-qt4-bin=/usr/lib/qt4/bin --with-occ-lib=/usr/local/lib --with-occ-include=/usr/local/inc --with-xercesc-lib=/usr/local/lib
 * make - hits a problem where the build is breaking because the ldflags for soqt are set to "-LNONE" which made libtool barf. My hackish workaround was to modify /usr/lib/Coin2/conf/soqt-default.cfg so that the ldflags are "" instead of "-LNONE". After this -> success !
 * make install

Ubuntu Lucid
In Ubuntu Lucid, you don't need the qtwebkit-dev, since it is included into qt4-dev.

Automatic build scripts
Here is all what you need for a complete build of FreeCAD. It's a one-script-approach and works on a fresh installed distro. The commands will ask for root password (for installation of packages) and sometime to acknowledge a fingerprint for an external repository server or https-subversion repository. This scripts should run on 32 and 64 bit versions. They are written for distinct version, but are also likely to run on a later version with or without minor changes.

If you have such a script for your preferred distro, please send it! We will incorporate it into this article.

Ubuntu 10.04 LTS - Lucid Lynx / Ubuntu 10.10 Maverick Meerkat / Ubuntu 11.04 Natty Narwhal
Note that this script starts by adding the FreeCAD Daily Builds PPA repository so it can proceed with the Eigen3 library (libeigen3-dev) installation. If you already have this library installed on your system, you can remove the first line. sudo add-apt-repository ppa:freecad-maintainers/freecad-daily && sudo apt-get update sudo apt-get install build-essential python libcoin60-dev libsoqt4-dev \ libxerces-c2-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev \ libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev \ libboost-serialization-dev libboost-signals-dev libboost-regex-dev libboost-thread-dev \ libqt4-dev qt4-dev-tools python2.7-dev libopencascade-dev libsoqt4-dev \ libode-dev subversion cmake libeigen2-dev libsimage-dev python-qt4 \ libtool autotools-dev automake bison flex gfortran libeigen3-dev libqtwebkit-dev git git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad cd freecad cmake. make cd bin ./FreeCAD -t 0
 * 1) checkout the latest source
 * 1) go to source dir
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD

./FreeCAD<
 * 1) use FreeCAD


 * 1) Update latest version

cd freecad git pull cmake. make
 * 1) go to source dir
 * 1) Update source
 * 1) build configuration
 * 1) build FreeCAD

OpenSUSE 12.2
No external Repositories are needed to compile FreeCAD 0.13 with this release. However, there is an imcompatability with python3-devel which needs to be removed. FreeCAD can be compiled from GIT similar to in OpenSUSE 12.2 sudo zypper install gcc cmake OpenCASCADE-devel libXerces-c-devel \ python-devel libqt4-devel python-qt4 Coin-devel SoQt-devel boost-devel \ libode-devel libQtWebKit-devel libeigen3-devel gcc-fortran git swig mkdir FreeCAD-Compiled cd FreeCAD-Compiled git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad mkdir FreeCAD-Build1 cd FreeCAD-Build1 cmake ../free-cad make cd bin ./FreeCAD -t 0 Since you are using git, next time you wish to compile you do not have to clone everything, just pull from git and compile once more cd free-cad git pull cd .. mkdir FreeCAD-Build2 cd FreeCAD-Build2 cmake ../free-cad make cd bin ./FreeCAD -t 0
 * 1) install needed packages for development
 * 1) create new dir, and go into it
 * 1) get the source
 * 1) Now you will have subfolder in this location called free-cad. It contains the source
 * 1) make another dir for compilation, and go into it
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD
 * 1) go into free-cad dir created earlier
 * 1) pull
 * 1) get back to previous dir
 * 1) Now repeat last few steps from before.
 * 1) make another dir for compilation, and go into it
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD

OpenSUSE 12.1
For FreeCAD 0.13 unstable you need to add Eigen3 and swig libraries, that don't seem to be in standard repos. You can get them with one-click install here:

sudo zypper install gcc cmake OpenCASCADE-devel libXerces-c-devel \ python-devel libqt4-devel python-qt4 Coin-devel SoQt-devel boost-devel \ libode-devel libQtWebKit-devel libeigen3-devel gcc-fortran git mkdir FreeCAD-Compiled cd FreeCAD-Compiled git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad mkdir FreeCAD-Build1 cd FreeCAD-Build1 cmake ../free-cad make cd bin ./FreeCAD -t 0
 * Eigen3
 * swig
 * 1) install needed packages for development
 * 1) create new dir, and go into it
 * 1) get the source
 * 1) Now you will have subfolder in this location called free-cad. It contains the source
 * 1) make another dir for compilation, and go into it
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD

Since you are using git, next time you wish to compile you do not have to clone everything, just pull from git and compile once more

cd free-cad git pull cd .. mkdir FreeCAD-Build2 cd FreeCAD-Build2 cmake ../free-cad make cd bin ./FreeCAD -t 0
 * 1) go into free-cad dir created earlier
 * 1) pull
 * 1) get back to previous dir
 * 1) Now repeat last few steps from before.
 * 1) make another dir for compilation, and go into it
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD

OpenSUSE 11.2
This script is not working at the moment because: sudo zypper install gcc cmake subversion OpenCASCADE-devel \ libXerces-c-devel python-devel libqt4-devel python-qt4 \ Coin-devel SoQt-devel boost-devel libode-devel libQtWebKit-devel \ libeigen2-devel gcc-fortran git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad cd freecad cmake. nice make cd bin ./FreeCAD -t 0
 * libXerces-c-devel seems to have disappeared ....
 * 1) install needed packages for development
 * 1) get the source
 * 1) go to source dir
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD

OpenSUSE 11.1
sudo zypper -p http://packman.unixheads.com/suse/11.1/ sudo zypper install gcc cmake subversion OpenCASCADE-devel \ libXerces-c-devel python-devel libqt4-devel python-qt4 \ Coin-devel SoQt-devel boost-devel libode-devel libQtWebKit-devel \ libeigen2-devel git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad cd freecad cmake. nice make cd bin ./FreeCAD -t 0
 * 1) additional repository (for OpenCascade)
 * 1) install needed packages for development
 * 1) get the source
 * 1) go to source dir
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD

Debian Squeeze
sudo apt-get install build-essential python libcoin60-dev libsoqt4-dev \ libxerces-c2-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev \ libboost-graph-dev libboost-iostreams-dev libboost-program-options-dev \ libboost-serialization-dev libboost-signals-dev libboost-regex-dev \ libqt4-dev qt4-dev-tools python2.5-dev \ libsimage-dev libopencascade-dev \ libsoqt4-dev libode-dev subversion cmake libeigen2-dev python-pivy \ libtool autotools-dev automake gfortran git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad cd freecad cmake. make cd bin ./FreeCAD -t 0
 * 1) get the needed tools and libs
 * 1) checkout the latest source
 * 1) go to source dir
 * 1) build configuration
 * 1) build FreeCAD
 * 1) test FreeCAD

Updating the source code
FreeCAD development happens fast, everyday or so there are bug fixes or new features. The cmake systems allows you to intelligently update the source code, and only recompile what has changed, making subsequent compilations very fast. Updating the source code with git or subversion is very easy: cd freecad (or where you cloned the source code the first time) git pull (if you are using git) Move into the appropriate build directory and run cmake again (as cmake updates the version number data for the Help menu, ...about FreeCAD), however you do not need to add the path to source code after "cmake", just a space and a dot: cd ../freecad-build (or wherever your build directory is located) cmake. make