Stuck compiling FreeCAD on Mac Catalina

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
doia
Posts: 251
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: Stuck compiling FreeCAD on Mac Catalina

Post by doia »

edwilliams16 wrote: Tue Jul 27, 2021 9:45 pm
ipatch wrote: Tue Jul 27, 2021 6:51 pm also something to point out, a lot of the formula file provided by the homebrew-freecad tap are keg-only which means their binaries are not located within the `/usr/local/bin/` or `$brew_prefix/bin` depending on where your homebrew installation is located.
so make sure that all the `keg-only` deps of the homebrew-freecad tap on linked into homebrew's bin dir.

Code: Select all

brew link freecad/freecad/qt5152 --force
Is this why the

Code: Select all

-DCMAKE_PREFIX_PATH= \
"/usr/local/opt/qt5152/lib/cmake/Qt5; \
couldn't find anything? I had to point to all the .cmake files one by one.

Code: Select all

-DQt5Core_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5Core" \
-DQt5Network_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5Network" \
-DQt5Xml_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5Xml" \
-DQt5XmlPatterns_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5XmlPatterns" \
-DQt5Widgets_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5Widgets" \
-DQt5Concurrent_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5Concurrent" \
-DQt5PrintSupport_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5PrintSupport" \
-DQt5OpenGL_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5OpenGL" \
-DQt5Svg_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5Svg" \
-DQt5UiTools_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5UiTools" \
-DQt5WebEngineWidgets_DIR="/usr/local/opt/qt5152/lib/cmake/Qt5WebEngineWidgets" \
This was incredibly tedious using the cmake gui - which would stop on the first error. I didn't learn about cmake -LH until later. Referring to the linux build page has useful clues.
I usually add the Cellar location of the installed packages to PREFIX_PATH, which avoids unnecessary linking into your global PATH:

Code: Select all

# export path to installed dependencies
# here additional paths to the wiki page have to be defined
export PREFIX_PATH="\
/usr/local/Cellar/qt5152/5.15.2/lib/cmake;\
/usr/local/Cellar/nglib/v6.2.2007/Contents/Resources;\
/usr/local/Cellar/vtk@8.2.0/8.2.0_1/lib/cmake/;\
/usr/local/Cellar/coin@4.0.0/4.0.0;\
/usr/local/Cellar/boost@1.75.0/1.75.0/lib/cmake;\
/usr/local/Cellar/boost-python3@1.75.0/1.75.0/lib/cmake"
and then within the make command:

Code: Select all

cmake -DCMAKE_PREFIX_PATH="$PREFIX_PATH"
User avatar
doia
Posts: 251
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: Stuck compiling FreeCAD on Mac Catalina

Post by doia »

Boy, this is a moving target. Compile did work like 10 days ago, now I get a fatal error for some not found XercesC libraries:

Code: Select all

[ 66%] Building CXX object src/Mod/Measure/App/CMakeFiles/Measure.dir/MeasurementPyImp.cpp.o
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/Mod/Measure/App/AppMeasure.cpp:32:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/Mod/Measure/App/Measurement.h:29:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/DocumentObject.h:28:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/TransactionalObject.h:27:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/ExtensionContainer.h:33:
/Users/dirkolbrich/Freecad/freecad-source/src/Base/Reader.h:32:10: fatal error: 'xercesc/framework/XMLPScanToken.hpp' file not found
#include <xercesc/framework/XMLPScanToken.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/Mod/Measure/App/Measurement.cpp:50:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/Mod/Part/App/PartFeature.h:28:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/Mod/Part/App/PropertyTopoShape.h:29:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/DocumentObject.h:28:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/TransactionalObject.h:27:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/ExtensionContainer.h:33:
/Users/dirkolbrich/Freecad/freecad-source/src/Base/Reader.h:32:10: fatal error: 'xercesc/framework/XMLPScanToken.hpp' file not found
#include <xercesc/framework/XMLPScanToken.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/Mod/Measure/App/CMakeFiles/Measure.dir/AppMeasure.cpp.o] Error 1

[ 67%] Building CXX object src/Mod/Fem/App/CMakeFiles/Fem.dir/FemConstraintPressure.cpp.o
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/Mod/Measure/App/MeasurementPyImp.cpp:28:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/Mod/Measure/App/Measurement.h:29:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/DocumentObject.h:28:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/TransactionalObject.h:27:
In file included from /Users/dirkolbrich/Freecad/freecad-source/src/App/ExtensionContainer.h:33:
/Users/dirkolbrich/Freecad/freecad-source/src/Base/Reader.h:32:10: fatal error: 'xercesc/framework/XMLPScanToken.hpp' file not found
#include <xercesc/framework/XMLPScanToken.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/Mod/Measure/App/CMakeFiles/Measure.dir/Measurement.cpp.o] Error 1
And then the build fails with:

Code: Select all

[ 67%] Linking CXX shared library ../../../../Mod/Fem/Fem.so
[ 67%] Built target Fem
[ 67%] Built target FreeCADGui_autogen
make: *** [all] Error 2
ipatch wrote: Tue Jul 27, 2021 6:51 pm welcome to compiling freecad from source. where you can spend more time setting up your environment to hopefully build and install freecad than actually using freecad. if you don't have any specific reason for compiling freecad from source than i'd highly recommend using the conda prebuilt dmg's. if you have the time and you enjoy troubleshooting build, install, and runtime errors than by all means continue to try and build freecad from source, just be aware it can become a form of a time sink. best of luck.
I can completely relate to that!!!
User avatar
ipatch
Posts: 112
Joined: Wed Apr 08, 2020 3:40 pm
Location: dfw
Contact:

Re: Stuck compiling FreeCAD on Mac Catalina

Post by ipatch »

doia

yeah i noticed that a while back, and opened up an issue on the homebrew-freecad tap

https://github.com/FreeCAD/homebrew-freecad/issues/178

---

i also sent a pm to two separate site admins asking for "admin" control on the homebrew-freecad tap to help in the update duties of the tap, but have yet hear anything back.
User avatar
doia
Posts: 251
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: Stuck compiling FreeCAD on Mac Catalina

Post by doia »

@ipatch

My error is somewhat different to yours, as XercesC is installed and the path successfully found by the CMake preparation process. I opened a separate thread under https://forum.freecadweb.org/viewtopic.php?f=4&t=60663 as to not polute this thread with other things.
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Stuck compiling FreeCAD on Mac Catalina

Post by kkremitzki »

ipatch wrote: Wed Jul 28, 2021 3:31 pm i also sent a pm to two separate site admins asking for "admin" control on the homebrew-freecad tap to help in the update duties of the tap, but have yet hear anything back.
Just wanted to confirm this is on my radar, though I should mention I was only CCed on replies to you and didn't see the original message, if there's any additional detail on your request(s).
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Stuck compiling FreeCAD on Mac Catalina

Post by sgrogan »

kkremitzki wrote: Mon Aug 02, 2021 6:07 pm Just wanted to confirm this is on my radar, though I should mention I was only CCed on replies to you and didn't see the original message, if there's any additional detail on your request(s).
I forwarded the original request.
"fight the good fight"
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Stuck compiling FreeCAD on Mac Catalina

Post by kkremitzki »

sgrogan wrote: Mon Aug 02, 2021 6:11 pm
kkremitzki wrote: Mon Aug 02, 2021 6:07 pm Just wanted to confirm this is on my radar, though I should mention I was only CCed on replies to you and didn't see the original message, if there's any additional detail on your request(s).
I forwarded the original request.
Could you re-send it? I'm not seeing it.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Stuck compiling FreeCAD on Mac Catalina

Post by sgrogan »

kkremitzki wrote: Mon Aug 02, 2021 6:16 pm Could you re-send it? I'm not seeing it.
re-forwarded
"fight the good fight"
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: Stuck compiling FreeCAD on Mac Catalina

Post by kkremitzki »

ipatch wrote: Wed Jul 28, 2021 3:31 pm i also sent a pm to two separate site admins asking for "admin" control on the homebrew-freecad tap to help in the update duties of the tap, but have yet hear anything back.
I have sent you invitations for admin access to github.com/freecad/homebrew-freecad and github.com/FreeCAD/FreeCAD-ports-cache
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
ipatch
Posts: 112
Joined: Wed Apr 08, 2020 3:40 pm
Location: dfw
Contact:

Re: Stuck compiling FreeCAD on Mac Catalina

Post by ipatch »

kkremitzki wrote: Mon Aug 02, 2021 11:50 pm
ipatch wrote: Wed Jul 28, 2021 3:31 pm i also sent a pm to two separate site admins asking for "admin" control on the homebrew-freecad tap to help in the update duties of the tap, but have yet hear anything back.
I have sent you invitations for admin access to github.com/freecad/homebrew-freecad and github.com/FreeCAD/FreeCAD-ports-cache
thank you. (i'd post a thumbs up emoji, but i'd take up the whole screen.)

so i'll leave this. ✧*。٩(ˊᗜˋ*)و✧*。
Post Reply