Compile on MacOS/sv: Difference between revisions
Renatorivo (talk | contribs) (page) |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
Since Mac OS X is BSD (UNIX) based, compiling FreeCAD on a Mac isn't much different from [[CompileOnUnix]], however there are a number of Mac-specific details critical to getting everything working properly. These instructions have been tested on Lion (10.7), but ''should work'' on Intel Macs running (Snow) Leopard as well. |
|||
Att kompilera FreeCAD på en Mac skiljer sig inte så mycket från stegen i Linux eller andra UNIX varianter. Den största utmaningen är att verkligen få alla beroenden installerade. I de följande avsnitten, kommer Jag (lhagan) att beskriva exakt de stegen som jag fick gå igenom för att få denna applikation att kompileras på Leopard och Snow Leopard med en Intel Mac (PowerPC borde vara möjligt, men kräver omkompilering av några binära bibliotek som jag inte hunnit än). Såvitt jag vet, så är jag den enda som har lyckats bygga FreeCAD på en Mac nyligen, så var snäll och posta på [http://forum.freecadweb.org/viewforum.php?f=8 discussion forum] om dessa steg fungerar för dig, på[http://forum.freecadweb.org/viewforum.php?f=4 help forum] om de inte fungerar, eller redigera denna sidan om du hittar fel. |
|||
== 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 [http://git-scm.com/ git] package installed): |
|||
git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad |
|||
This will place a copy of the latest version of the FreeCAD source code in a new directory called "freecad". 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 Gihub: |
|||
[https://github.com/FreeCAD/FreeCAD_sf_master github.com/FreeCAD/FreeCAD_sf_master] |
|||
=== Source package === |
|||
Först så behöver du en kopia av FreeCAD's källkodsträd. Kolla den senaste revisionen från Sourceforge subversion programförråd genom att använda detta kommandot i terminalen: |
|||
Alternatively you can download a source package, but they could be already quite old so it's always better to get the latest sources. Depending on your distribution, there are several ways to obtain a source package: |
|||
Official FreeCAD source packages (distribution-independent): https://sourceforge.net/projects/free-cad/files/FreeCAD%20Source/ |
|||
Debian: http://packages.debian.org/source/sid/freecad |
|||
Ubuntu: http://packages.ubuntu.com/source/precise/freecad |
|||
=== Install Dependencies === |
|||
On Mac OS X 10.7, the following dependencies are NOT bundled with the operating and thus must be installed before building FreeCAD: |
|||
*sip |
|||
*fortran |
|||
*xerces-c |
|||
*boost |
|||
*eigen |
|||
*ftgl |
|||
*coin3d |
|||
*OpenCASCADE |
|||
*Qt |
|||
*pyqt |
|||
*soqt |
|||
==== Option 1: Homebrew ==== |
|||
<pre>svn co http://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk freecad</pre> |
|||
'''Note''': this section is still a work in progress! See the help forum post for the latest. |
|||
:https://forum.freecadweb.org/viewtopic.php?f=4&t=2064&p=15405 |
|||
Download and install the package manager Homebrew: |
|||
Detta kommer att lägga FreeCAD's källkod och relaterade filer i din home mapp (~/freecad/). Placeringen är inte så viktig om du hellre vill ha den någon annanstans, du behöver bara full åtkomst till filerna. |
|||
:http://mxcl.github.com/homebrew/ |
|||
Then compile and install most of FreeCAD's dependencies: |
|||
brew install sip gfortran xerces-c boost eigen coin qt pyqt soqt ftgl |
|||
=== Installera MacPorts OCH biblioteksberoenden === |
|||
Go on to [[CompileOnMac#Build OpenCASCADE]]. |
|||
==== Option 2: MacPorts/Fink ==== |
|||
Sedan, om du inte redan har gjort det, installera MacPorts. MacPorts är ett system som tillåter dig att ladda ned, kompilera, och installera många vanliga öppen-källkodsapplikationer med ett enda kommando. Liknanade applikationer från UNIX/Linux världen är PKGSRC och APT. För att installera, ladda bara ned diskavbildningen från MacPorts sajten och följ anvisningarna: |
|||
'''Note: this section is in need of updates.''' |
|||
Install MacPorts (if you don't already have it). MacPorts is a system that allows you to download, compile, and install many common open-source applications with a single command. Similar applications from the UNIX/Linux world are PKGSRC and APT. To install, just download the disk image from the MacPorts site and follow the directions: |
|||
:http://www.macports.org/install.php |
:http://www.macports.org/install.php |
||
Whether or not you just installed MacPorts, you'll probably want to make sure it's up to date. Run: |
|||
sudo port selfupdate |
sudo port selfupdate |
||
Now that MacPorts is installed and up to date, you can start installing some of FreeCAD's required packages: |
|||
*ode |
|||
*xercesc |
*xercesc |
||
*boost |
*boost |
||
*py-sip |
|||
*gts |
|||
*ftlg |
|||
*opencv |
|||
*f2c |
|||
*eigen3 |
|||
*py-pyqt4 |
|||
*Coin |
|||
The following command will compile/install the above libraries. If MacPorts produces errors, you may want to try installing them one at a time. |
|||
sudo port install xercesc boost ftgl f2c eigen3 py-sip py-pyqt4 Coin |
|||
Note that for python packages like py-sip and py-pyqt4, there are multiple packages, one for each MacPorts version of Python. |
|||
Note that boost is a large package, and py-pyqt4 depends on qt4-mac, which is a large package. You may want to run port -v install so that you have more of an idea what's going on during these long builds. |
|||
Följande kommando kommer att kompilera/installera alla nödvändiga bibliotek. Om MacPorts producerar fel, såkanske du kan prova att installera dem en åt gången. |
|||
Qt4 is also available for Mac as a binary installer from the Qt web site. I'm not sure how nicely this approach plays with FreeCAD compiling. |
|||
It is also possible to choose the version of the gcc compiler to use, some recent versions might sometimes cause problems: |
|||
sudo port install ode xercesc boost gts opencv |
|||
sudo port -v install gcc_select |
|||
sudo port select --list gcc |
|||
sudo port select --set gcc mp-gcc46 |
|||
'''Install Fortran Compiler''' |
|||
You also need a FORTRAN compiler. Apple's fork of gcc on OSX does not come with FORTRAN. |
|||
An installer for GFortran can be found here, and will do the trick: |
|||
'''På Snow Leopard, så kan opencv för närvarande inte byggas. Du kan emellertid fortsätta utan opencv.''' |
|||
http://gcc.gnu.org/wiki/GFortranBinaries#MacOS |
|||
If you are using fink, another method is to use the following commands (attempted by Shaneyfelt 2100.Nov.14) |
|||
sudo fink selfupdate |
|||
sudo fink install gcc46 |
|||
''This installs another gcc compiler collection with the name gcc-4 to avoid a name conflict with the apple one.'' |
|||
MacPorts gcc4x packages also include FORTRAN compilers, so this should also work: |
|||
sudo port install gcc46 |
|||
Another possible MacPorts package is g95. This seems to be a valid FORTRAN90 compiler and will pass FreeCAD's cmake configuration tests, but the actual build seems to ask for gcc-specific options, so probably easier to stick to gcc4x. |
|||
'''Install Eigen3''' |
|||
Download and unzip the latest eigen3 library here: |
|||
http://eigen.tuxfamily.org/index.php?title=Main_Page |
|||
These are needed for solver functionality. Once unzipped, the folder named 'Eigen' can be dropped into |
|||
'''/usr/local/include/eigen3/''' |
|||
=== Installera ramverk och OpenCASCADE === |
|||
=== Build OpenCASCADE === |
|||
FreeCAD har andra beroenden (se [[CompileOnUnix/sv|Kompilera på Unix]]), men resten är antingen inkluderat som standard i OS X Leopard eller kan installeras genom att använda Installer paket. Ladda ned och installera följande: |
|||
*Qt http://qt.nokia.com/downloads |
|||
:Hämta "Framework Only" versionen såvida du inte tänker utveckla med hjälp av Qt (den är mycket mindre). FreeCAD kompilerar på OS X Leopard med Qt 4.5. Installeras i /Library/Frameworks och /usr/bin. |
|||
*Coin http://www.coin3d.org/lib/coin/releases/ |
|||
:Installera Coin.pkg OCH CoinTools.pkg. FreeCAD kompilerar på OS X Leopard med Coin 3.1.0. Installeras i /Library/Frameworks. |
|||
*SoQt http://dl.getdropbox.com/u/103808/FreeCAD/SoQt-1.4.1.dmg |
|||
:Installera SoQt.pkg OCH SoQtTools.pkg. Av någon anledning, så erbjuds inte SoQt ramverket som en officiell binär. För smidighet så erhåller jag den ovan kompilerade versionen. Om du vill kompilera din egen, ladda ned den senaste källkoden från http://www.coin3d.org/lib/soqt/releases och följ anvisningarna i README.MACOSX. FreeCAD kompilerar på OS X Leopard med SoQt 1.4.1. Installeras i /Library/Frameworks. |
|||
*OpenCASCADE http://dl.getdropbox.com/u/103808/FreeCAD/OpenCASCADE_i386_6.3.0_20091128.dmg |
|||
:Den ovanstående OCC 6.3.0 binära distributionen är en modifierad version av den som erbjuds av underhållarna av PythonOCC http://www.pythonocc.org/. Du kan använda versionen från PythonOCC, men ändringar i .la filerna behövs för att FreeCAD's byggprocess ska länka korrekt till den och du behöver ladda ned OCC källkoden separat. Jag har inte ännu lyckats bygga OpenCASCADE själv, men vill kanske göra det -- detta skulle vara nyckeln till att erbjuda en PowerPC distribution (om det ens är möjligt). Om du kan få OpenCASCADE att bygga på OS X, låt mig veta hur. Installeras i /usr/local/lib/OCC och /usr/local/include/OCC. |
|||
:'''UPPDATERAD 2009-11-28 med fixar för Snow Leopard. Om du installerade OCC innan detta datum, så rekommenderas det att du manuellt raderar de gamla filerna och installerar det nya paketet.''' |
|||
sudo rm -r /usr/local/lib/OCC |
|||
sudo rm -r /usr/local/include/OCC |
|||
=== Ladda ned och 'installera' FreeCAD.app mall === |
|||
Följande arkiv innehåller en applikationsbunt mall för FreeCAD. Denna är inte strikt nödvändig, men den gör arbete med FreeCAD mycket smidigare är standardinstallationskonfigurationen. Min är i /Applications mappen, men du ska kunna lägga den var du vill -- kom bara ihåg att bunten inte kan flyttas efter att FreeCAD har kompilerats och installerats (utan några ytterligare ändringar). Genom att köra make install med konfigurationen nedan kommer mallen att installeras i denna bunt. |
|||
Currently, the easiest way to build OpenCASCADE on OS X is from the community edition (oce). Download the source or check out the Git repository from: |
|||
:https://github.com/tpaviot/oce |
|||
Then, in terminal: |
|||
mkdir build |
|||
cd build |
|||
cmake .. |
|||
cd .. |
|||
make |
|||
make install/strip |
|||
You may need cmake: |
|||
sudo port install cmake |
|||
=== Download and 'install' the FreeCAD.app template === |
|||
The following archive contains an application bundle template for FreeCAD. This is not strictly necessary, but it makes working with FreeCAD more convenient than the default installation configuration. The recommended install location for the bundle is the /Applications folder, but you should be able to put it anywhere you want -- just remember that the bundle can't be moved after FreeCAD is complied and installed without further modifications. Running make install using the configuration in the next step will install into this bundle. |
|||
:http://dl.getdropbox.com/u/103808/FreeCAD/FreeCAD_bundle_template_20091128.tar.gz |
:http://dl.getdropbox.com/u/103808/FreeCAD/FreeCAD_bundle_template_20091128.tar.gz |
||
=== Compile === |
|||
Configure, compile, and install FreeCAD using the following commands from within the root FreeCAD folder. If you put your FreeCAD.app bundle somewhere other than /Applications (or aren't using the bundle), change the 'PREFIX' argument accordingly. |
|||
:UPPDATERAD 2009-11-28 med den nya FreeCAD applikationsikonen |
|||
=== Kompilera === |
|||
Konfigurera, kompilera, och installera nu FreeCAD genom att använda följande kommandon inifrån FreeCAD's rotmapp. Om du lägger din FreeCAD.app bunt på någon annan plats än /Applications (eller inte använder bunten), ändra 'PREFIX' raden motsvarande. |
|||
./autogen.sh |
./autogen.sh |
||
PREFIX=/Applications/FreeCAD.app/Contents |
PREFIX=/Applications/FreeCAD.app/Contents |
||
If you installed dependencies using Option 1 (Homebrew): |
|||
./configure --with-xercesc-lib=/opt/local/lib --with-xercesc-include=/opt/local/include --with-boost-lib=/opt/local/lib \ |
|||
''Note'': this config line has not been verified and may contain errors! |
|||
--with-boost-include=/opt/local/include --with-qt4-bin=/usr/bin --with-qt4-framework=/Library/Frameworks \ |
|||
--with- |
./configure --with-xercesc-lib=/usr/local/lib --with-xercesc-include=/usr/local/include \ |
||
--with-boost-lib=/usr/local/lib --with-boost-include=/usr/local/include \ |
|||
--with-soqt=/Library/Frameworks --prefix=$PREFIX --bindir=$PREFIX/MacOS --libdir=$PREFIX/Frameworks/FreeCAD \ |
|||
--with-qt4-dir=/usr/local--with-qt4-lib=/usr/local/lib --with-qt4-include=/usr/local/include \ |
|||
--includedir=$PREFIX/Resources/include --datarootdir=$PREFIX/Resources/share |
|||
--with-qt4-framework=/usr/local/lib --with-qt4-bin=/usr/local/bin --with-occ-lib=/usr/local/lib \ |
|||
--with-occ-include=/usr/local/include/oce --with-coin=/usr/local/lib --with-soqt=/usr/local/lib \ |
|||
make LDFLAGS=-Wl,-headerpad_max_install_names |
|||
--prefix=/Applications/FreeCAD.app/Contents --bindir=/Applications/FreeCAD.app/Contents/MacOS \ |
|||
--libdir=/Applications/FreeCAD.app/Contents/Frameworks/FreeCAD \ |
|||
--includedir=/Applications/FreeCAD.app/Contents/Resources/include \ |
|||
--datarootdir=/Applications/FreeCAD.app/Contents/Resources/share --enable-debug=no \ |
|||
--with-python-include=/System/Library/Frameworks/Python.framework/Versions/2.5/Headers |
|||
Or if you installed dependencies using Option 2 (MacPorts/Fink): |
|||
./configure --with-xercesc-lib=/opt/local/lib --with-xercesc-include=/opt/local/include \ |
|||
--with-boost-lib=/opt/local/lib --with-boost-include=/opt/local/include \ |
|||
--with-qt4-dir=/usr/local/Trolltech/Qt-4.8.0 --with-qt4-lib=/usr/local/Trolltech/Qt-4.8.0/lib \ |
|||
--with-qt4-include=/usr/local/Trolltech/Qt-4.8.0/include --with-qt4-framework=/Library/Frameworks \ |
|||
--with-qt4-bin=/usr/local/Trolltech/Qt-4.8.0/bin --with-occ-lib=/usr/local/lib \ |
|||
--with-occ-include=/usr/local/include/oce --with-coin=/Library/Frameworks \ |
|||
--with-soqt=/Library/Frameworks --prefix=/Applications/FreeCAD.app/Contents \ |
|||
--bindir=/Applications/FreeCAD.app/Contents/MacOS --libdir=/Applications/FreeCAD.app/Contents/Frameworks/FreeCAD \ |
|||
--includedir=/Applications/FreeCAD.app/Contents/Resources/include \ |
|||
--datarootdir=/Applications/FreeCAD.app/Contents/Resources/share --enable-debug=no \ |
|||
--with-python-include=/System/Library/Frameworks/Python.framework/Versions/2.5/Headers |
|||
Then: |
|||
make |
|||
make install |
make install |
||
Depending on your machine's processing power, the make step can take quite a while. |
|||
=== Run === |
|||
If everything went OK, double-clicking the .app bundle should start FreeCAD. If you have any issues, post the details on the [http://forum.freecadweb.org/viewforum.php?f=4 help forum]. |
|||
=== PyQt4 === |
|||
Beroende på din maskin, så kan make steget ta en ganska lång stund. |
|||
=== Kör === |
|||
Some users reported facing a "No Module named PyQt4" message on FreeCAD startup. This is a workaround to correct it: |
|||
Om allt fungerade som det skulle, så ska ett dubbelklick på .app bunten starta FreeCAD. Om du har några problem, posta detaljerna på [http://forum.freecadweb.org/viewforum.php?f=4 help forum]. |
|||
cd /Library/Python/2.6/site-packages |
|||
sudo ln -s /contrib/lib/python2.6/site-packages/PyQt4 . |
|||
sudo ln -s /contrib/lib/python2.6/site-packages/sip* . |
|||
cd /volatile/FreeCAD-r5443-ser/bin/pivy |
|||
cp _coin.dylib _coin.so |
|||
cd /volatile/FreeCAD-r5443-ser/lib |
|||
for i in *.dylib; do j=`basename $i .dylib`; cp $i $j.so; done |
|||
=== Pivy === |
|||
Some FreeCAD components won't work without Pivy. See [[Extra_python_modules#Pivy|here]] for partial build instructions. |
|||
{{docnav |
{{docnav|CompileOnUnix|Third Party Libraries}} |
||
[[Category:Developer Documentation]] |
|||
{{languages/sv | {{en|CompileOnMac}} {{es|CompileOnMac/es}} {{fr|CompileOnMac/fr}} }} |
|||
{{clear}} |
|||
[[Category:Developer Documentation/sv]] |
|||
<languages/> |
Revision as of 22:05, 6 November 2014
Since Mac OS X is BSD (UNIX) based, compiling FreeCAD on a Mac isn't much different from CompileOnUnix, however there are a number of Mac-specific details critical to getting everything working properly. These instructions have been tested on Lion (10.7), but should work on Intel Macs running (Snow) Leopard as well.
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://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad
This will place a copy of the latest version of the FreeCAD source code in a new directory called "freecad". 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 Gihub: 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. Depending on your distribution, there are several ways to obtain a source package:
Official FreeCAD source packages (distribution-independent): https://sourceforge.net/projects/free-cad/files/FreeCAD%20Source/ Debian: http://packages.debian.org/source/sid/freecad Ubuntu: http://packages.ubuntu.com/source/precise/freecad
Install Dependencies
On Mac OS X 10.7, the following dependencies are NOT bundled with the operating and thus must be installed before building FreeCAD:
- sip
- fortran
- xerces-c
- boost
- eigen
- ftgl
- coin3d
- OpenCASCADE
- Qt
- pyqt
- soqt
Option 1: Homebrew
Note: this section is still a work in progress! See the help forum post for the latest.
Download and install the package manager Homebrew:
Then compile and install most of FreeCAD's dependencies:
brew install sip gfortran xerces-c boost eigen coin qt pyqt soqt ftgl
Go on to CompileOnMac#Build OpenCASCADE.
Option 2: MacPorts/Fink
Note: this section is in need of updates.
Install MacPorts (if you don't already have it). MacPorts is a system that allows you to download, compile, and install many common open-source applications with a single command. Similar applications from the UNIX/Linux world are PKGSRC and APT. To install, just download the disk image from the MacPorts site and follow the directions:
Whether or not you just installed MacPorts, you'll probably want to make sure it's up to date. Run:
sudo port selfupdate
Now that MacPorts is installed and up to date, you can start installing some of FreeCAD's required packages:
- xercesc
- boost
- py-sip
- ftlg
- f2c
- eigen3
- py-pyqt4
- Coin
The following command will compile/install the above libraries. If MacPorts produces errors, you may want to try installing them one at a time.
sudo port install xercesc boost ftgl f2c eigen3 py-sip py-pyqt4 Coin
Note that for python packages like py-sip and py-pyqt4, there are multiple packages, one for each MacPorts version of Python.
Note that boost is a large package, and py-pyqt4 depends on qt4-mac, which is a large package. You may want to run port -v install so that you have more of an idea what's going on during these long builds.
Qt4 is also available for Mac as a binary installer from the Qt web site. I'm not sure how nicely this approach plays with FreeCAD compiling.
It is also possible to choose the version of the gcc compiler to use, some recent versions might sometimes cause problems:
sudo port -v install gcc_select sudo port select --list gcc sudo port select --set gcc mp-gcc46
Install Fortran Compiler
You also need a FORTRAN compiler. Apple's fork of gcc on OSX does not come with FORTRAN.
An installer for GFortran can be found here, and will do the trick: http://gcc.gnu.org/wiki/GFortranBinaries#MacOS If you are using fink, another method is to use the following commands (attempted by Shaneyfelt 2100.Nov.14)
sudo fink selfupdate sudo fink install gcc46
This installs another gcc compiler collection with the name gcc-4 to avoid a name conflict with the apple one.
MacPorts gcc4x packages also include FORTRAN compilers, so this should also work:
sudo port install gcc46
Another possible MacPorts package is g95. This seems to be a valid FORTRAN90 compiler and will pass FreeCAD's cmake configuration tests, but the actual build seems to ask for gcc-specific options, so probably easier to stick to gcc4x.
Install Eigen3
Download and unzip the latest eigen3 library here: http://eigen.tuxfamily.org/index.php?title=Main_Page These are needed for solver functionality. Once unzipped, the folder named 'Eigen' can be dropped into
/usr/local/include/eigen3/
Build OpenCASCADE
Currently, the easiest way to build OpenCASCADE on OS X is from the community edition (oce). Download the source or check out the Git repository from:
Then, in terminal:
mkdir build cd build cmake .. cd .. make make install/strip
You may need cmake:
sudo port install cmake
Download and 'install' the FreeCAD.app template
The following archive contains an application bundle template for FreeCAD. This is not strictly necessary, but it makes working with FreeCAD more convenient than the default installation configuration. The recommended install location for the bundle is the /Applications folder, but you should be able to put it anywhere you want -- just remember that the bundle can't be moved after FreeCAD is complied and installed without further modifications. Running make install using the configuration in the next step will install into this bundle.
Compile
Configure, compile, and install FreeCAD using the following commands from within the root FreeCAD folder. If you put your FreeCAD.app bundle somewhere other than /Applications (or aren't using the bundle), change the 'PREFIX' argument accordingly.
./autogen.sh PREFIX=/Applications/FreeCAD.app/Contents
If you installed dependencies using Option 1 (Homebrew):
Note: this config line has not been verified and may contain errors!
./configure --with-xercesc-lib=/usr/local/lib --with-xercesc-include=/usr/local/include \ --with-boost-lib=/usr/local/lib --with-boost-include=/usr/local/include \ --with-qt4-dir=/usr/local--with-qt4-lib=/usr/local/lib --with-qt4-include=/usr/local/include \ --with-qt4-framework=/usr/local/lib --with-qt4-bin=/usr/local/bin --with-occ-lib=/usr/local/lib \ --with-occ-include=/usr/local/include/oce --with-coin=/usr/local/lib --with-soqt=/usr/local/lib \ --prefix=/Applications/FreeCAD.app/Contents --bindir=/Applications/FreeCAD.app/Contents/MacOS \ --libdir=/Applications/FreeCAD.app/Contents/Frameworks/FreeCAD \ --includedir=/Applications/FreeCAD.app/Contents/Resources/include \ --datarootdir=/Applications/FreeCAD.app/Contents/Resources/share --enable-debug=no \ --with-python-include=/System/Library/Frameworks/Python.framework/Versions/2.5/Headers
Or if you installed dependencies using Option 2 (MacPorts/Fink):
./configure --with-xercesc-lib=/opt/local/lib --with-xercesc-include=/opt/local/include \ --with-boost-lib=/opt/local/lib --with-boost-include=/opt/local/include \ --with-qt4-dir=/usr/local/Trolltech/Qt-4.8.0 --with-qt4-lib=/usr/local/Trolltech/Qt-4.8.0/lib \ --with-qt4-include=/usr/local/Trolltech/Qt-4.8.0/include --with-qt4-framework=/Library/Frameworks \ --with-qt4-bin=/usr/local/Trolltech/Qt-4.8.0/bin --with-occ-lib=/usr/local/lib \ --with-occ-include=/usr/local/include/oce --with-coin=/Library/Frameworks \ --with-soqt=/Library/Frameworks --prefix=/Applications/FreeCAD.app/Contents \ --bindir=/Applications/FreeCAD.app/Contents/MacOS --libdir=/Applications/FreeCAD.app/Contents/Frameworks/FreeCAD \ --includedir=/Applications/FreeCAD.app/Contents/Resources/include \ --datarootdir=/Applications/FreeCAD.app/Contents/Resources/share --enable-debug=no \ --with-python-include=/System/Library/Frameworks/Python.framework/Versions/2.5/Headers
Then:
make make install
Depending on your machine's processing power, the make step can take quite a while.
Run
If everything went OK, double-clicking the .app bundle should start FreeCAD. If you have any issues, post the details on the help forum.
PyQt4
Some users reported facing a "No Module named PyQt4" message on FreeCAD startup. This is a workaround to correct it:
cd /Library/Python/2.6/site-packages sudo ln -s /contrib/lib/python2.6/site-packages/PyQt4 . sudo ln -s /contrib/lib/python2.6/site-packages/sip* . cd /volatile/FreeCAD-r5443-ser/bin/pivy cp _coin.dylib _coin.so cd /volatile/FreeCAD-r5443-ser/lib for i in *.dylib; do j=`basename $i .dylib`; cp $i $j.so; done
Pivy
Some FreeCAD components won't work without Pivy. See here for partial build instructions.