At first, many thanks to the authors of this great piece of software! Thanks for the effort you put in and this great community!
I recently tried to compile freecad as suggested in the CompileOnMac wiki page, which btw. seems pretty outdated.
I first tried to get it done with macports, installed all that is needed but cmake never produced a makefile. For those who are interested, this is what I did.
I got a list of dependencies from this post and from the homebrew formulae in github-repo:
Code: Select all
sudo port -N install gcc8 clang-7.0 llvm-5.0 cmake jpeg libpng tiff freetype fontconfig gmp isl mpfr libmpc gdbm swig freeimage eigen3 python27 hdf5 pkgconfig qt5 qt5-qtwebkit opencascade py-matplotlib xercesc3 py-pyside2 boost boost+python27+icu vtk openmpi openmpi-devel netgen coin
After the confusion with macports I went on with homebrew and got it managed (removed /opt/local/... from PATH and added
Code: Select all
-DHOMEBREW-PREFIX=1
The guide recommends running
Code: Select all
brew tap homebrew/science
Also I had to run
Code: Select all
brew install --only-dependencies freecad --with-packaging-utils
cmake also depends on
Code: Select all
-DPYTHON_INCLUDE_DIR=$(python -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
-DPYTHON_LIBRARY=$(python -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
Here are 2 guides I used to get a little further as the wiki wasn't helpful enough:
Building FreeCAD on MacOS X
Compiling and Installing FreeCAD
However, after 2 days of struggling I got cmake to produce a Makefile!
Only problem is that specific header files are not in the right directories:
Code: Select all
iMac:build mmaenz$ make
[ 0%] Built target Driver
[ 1%] Built target SMDS
[ 1%] Built target DriverDAT
[ 1%] Built target MEFISTO2
[ 1%] Built target SMESHDS
[ 1%] Built target DriverSTL
[ 2%] Built target DriverUNV
[ 4%] Built target SMESH
[ 6%] Built target StdMeshers
[ 6%] Building CXX object src/3rdParty/salomesmesh/CMakeFiles/NETGENPlugin.dir/src/NETGENPlugin/NETGENPlugin_Mesher.cpp.o
/Users/mmaenz/Projects/FreeCAD/FreeCAD-git/src/3rdParty/salomesmesh/src/NETGENPlugin/NETGENPlugin_Mesher.cpp:80:10: fatal error: 'occgeom.hpp' file not
found
#include <occgeom.hpp>
^
1 error generated.
make[2]: *** [src/3rdParty/salomesmesh/CMakeFiles/NETGENPlugin.dir/src/NETGENPlugin/NETGENPlugin_Mesher.cpp.o] Error 1
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/NETGENPlugin.dir/all] Error 2
make: *** [all] Error 2
Copying header files by hand is not a proper solution. Changing header files in source is neither a solution as it wouldn't run on other systems where is seems to be pretty fine the way it is.
Here are my specs: macOS 10.12.6, running gcc8/clang-7.0/llvm-5.0 along with xcode 8.3.2 (clang-802.0.42).
My original intent was to debug and repair the UnitCalculator: It is really messed up, changes units on each valueChanged all the time and produces a mess as a result of stupid string concat operations! I like to use the UnitCalculator, I try to redo old drawings from paper, which are in imperial units to decimal units. Maybe make it dockable to the UI like other components?
Any help is really appreciated! Thanks...