Cannot compile FreeCad on MacOS X
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- federico.carminati
- Posts: 66
- Joined: Thu May 18, 2017 1:01 pm
- Location: Geneva, Switzerland
Cannot compile FreeCad on MacOS X
[/Users/fca] brew install --only-dependencies freecad
==> Installing freecad from freecad/freecad
All dependencies for freecad/freecad/freecad are satisfied.
[...r/local/FreeCAD/build] cd .. ; rm -rf build ; mkdir build; cd build ; cmake -DBUILD_QT5=1 -DFREECAD_USE_EXTERNAL_KDL=1 -DBUILD_FEM_NETGEN=1 -DFREECAD_CREATE_MAC_APP=1 -DCMAKE_BUILD_TYPE="Release" ../FreeCAD-git/
[...]
-- Found Eigen3: /sw/include/eigen3 (Required is at least version "2.91.0")
CMake Warning at CMakeLists.txt:772 (find_package):
By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Network", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Network" with
any of the following names:
Qt5NetworkConfig.cmake
qt5network-config.cmake
Add the installation prefix of "Qt5Network" to CMAKE_PREFIX_PATH or set
"Qt5Network_DIR" to a directory containing one of the above files. If
"Qt5Network" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:773 (find_package):
By not providing "FindQt5Xml.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Xml", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Xml" with any
of the following names:
Qt5XmlConfig.cmake
qt5xml-config.cmake
Add the installation prefix of "Qt5Xml" to CMAKE_PREFIX_PATH or set
"Qt5Xml_DIR" to a directory containing one of the above files. If "Qt5Xml"
provides a separate development package or SDK, be sure it has been
installed.
CMake Warning at CMakeLists.txt:775 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:
Qt5WidgetsConfig.cmake
qt5widgets-config.cmake
Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:776 (find_package):
By not providing "FindQt5PrintSupport.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5PrintSupport", but CMake did not find one.
Could not find a package configuration file provided by "Qt5PrintSupport"
with any of the following names:
Qt5PrintSupportConfig.cmake
qt5printsupport-config.cmake
Add the installation prefix of "Qt5PrintSupport" to CMAKE_PREFIX_PATH or
set "Qt5PrintSupport_DIR" to a directory containing one of the above files.
If "Qt5PrintSupport" provides a separate development package or SDK, be
sure it has been installed.
CMake Warning at CMakeLists.txt:777 (find_package):
By not providing "FindQt5OpenGL.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5OpenGL", but CMake did not find one.
Could not find a package configuration file provided by "Qt5OpenGL" with
any of the following names:
Qt5OpenGLConfig.cmake
qt5opengl-config.cmake
Add the installation prefix of "Qt5OpenGL" to CMAKE_PREFIX_PATH or set
"Qt5OpenGL_DIR" to a directory containing one of the above files. If
"Qt5OpenGL" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:778 (find_package):
By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Svg", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Svg" with any
of the following names:
Qt5SvgConfig.cmake
qt5svg-config.cmake
Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
"Qt5Svg_DIR" to a directory containing one of the above files. If "Qt5Svg"
provides a separate development package or SDK, be sure it has been
installed.
CMake Warning at CMakeLists.txt:779 (find_package):
By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5UiTools", but CMake did not find one.
Could not find a package configuration file provided by "Qt5UiTools" with
any of the following names:
Qt5UiToolsConfig.cmake
qt5uitools-config.cmake
Add the installation prefix of "Qt5UiTools" to CMAKE_PREFIX_PATH or set
"Qt5UiTools_DIR" to a directory containing one of the above files. If
"Qt5UiTools" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:780 (find_package):
By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Network", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Network" with
any of the following names:
Qt5NetworkConfig.cmake
qt5network-config.cmake
Add the installation prefix of "Qt5Network" to CMAKE_PREFIX_PATH or set
"Qt5Network_DIR" to a directory containing one of the above files. If
"Qt5Network" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:781 (find_package):
By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5Concurrent", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Concurrent"
with any of the following names:
Qt5ConcurrentConfig.cmake
qt5concurrent-config.cmake
Add the installation prefix of "Qt5Concurrent" to CMAKE_PREFIX_PATH or set
"Qt5Concurrent_DIR" to a directory containing one of the above files. If
"Qt5Concurrent" provides a separate development package or SDK, be sure it
has been installed.
CMake Warning at CMakeLists.txt:784 (find_package):
By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5WebKitWidgets", but CMake did not find one.
Could not find a package configuration file provided by "Qt5WebKitWidgets"
with any of the following names:
Qt5WebKitWidgetsConfig.cmake
qt5webkitwidgets-config.cmake
Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or
set "Qt5WebKitWidgets_DIR" to a directory containing one of the above
files. If "Qt5WebKitWidgets" provides a separate development package or
SDK, be sure it has been installed.
CMake Error at CMakeLists.txt:789 (MESSAGE):
========================
Qt5 libraries not found.
========================
-- Configuring incomplete, errors occurred!
See also "/usr/local/FreeCAD/build/CMakeFiles/CMakeOutput.log".
See also "/usr/local/FreeCAD/build/CMakeFiles/CMakeError.log".
[...r/local/FreeCAD/build]
==> Installing freecad from freecad/freecad
All dependencies for freecad/freecad/freecad are satisfied.
[...r/local/FreeCAD/build] cd .. ; rm -rf build ; mkdir build; cd build ; cmake -DBUILD_QT5=1 -DFREECAD_USE_EXTERNAL_KDL=1 -DBUILD_FEM_NETGEN=1 -DFREECAD_CREATE_MAC_APP=1 -DCMAKE_BUILD_TYPE="Release" ../FreeCAD-git/
[...]
-- Found Eigen3: /sw/include/eigen3 (Required is at least version "2.91.0")
CMake Warning at CMakeLists.txt:772 (find_package):
By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Network", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Network" with
any of the following names:
Qt5NetworkConfig.cmake
qt5network-config.cmake
Add the installation prefix of "Qt5Network" to CMAKE_PREFIX_PATH or set
"Qt5Network_DIR" to a directory containing one of the above files. If
"Qt5Network" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:773 (find_package):
By not providing "FindQt5Xml.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Xml", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Xml" with any
of the following names:
Qt5XmlConfig.cmake
qt5xml-config.cmake
Add the installation prefix of "Qt5Xml" to CMAKE_PREFIX_PATH or set
"Qt5Xml_DIR" to a directory containing one of the above files. If "Qt5Xml"
provides a separate development package or SDK, be sure it has been
installed.
CMake Warning at CMakeLists.txt:775 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:
Qt5WidgetsConfig.cmake
qt5widgets-config.cmake
Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:776 (find_package):
By not providing "FindQt5PrintSupport.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5PrintSupport", but CMake did not find one.
Could not find a package configuration file provided by "Qt5PrintSupport"
with any of the following names:
Qt5PrintSupportConfig.cmake
qt5printsupport-config.cmake
Add the installation prefix of "Qt5PrintSupport" to CMAKE_PREFIX_PATH or
set "Qt5PrintSupport_DIR" to a directory containing one of the above files.
If "Qt5PrintSupport" provides a separate development package or SDK, be
sure it has been installed.
CMake Warning at CMakeLists.txt:777 (find_package):
By not providing "FindQt5OpenGL.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5OpenGL", but CMake did not find one.
Could not find a package configuration file provided by "Qt5OpenGL" with
any of the following names:
Qt5OpenGLConfig.cmake
qt5opengl-config.cmake
Add the installation prefix of "Qt5OpenGL" to CMAKE_PREFIX_PATH or set
"Qt5OpenGL_DIR" to a directory containing one of the above files. If
"Qt5OpenGL" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:778 (find_package):
By not providing "FindQt5Svg.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Svg", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Svg" with any
of the following names:
Qt5SvgConfig.cmake
qt5svg-config.cmake
Add the installation prefix of "Qt5Svg" to CMAKE_PREFIX_PATH or set
"Qt5Svg_DIR" to a directory containing one of the above files. If "Qt5Svg"
provides a separate development package or SDK, be sure it has been
installed.
CMake Warning at CMakeLists.txt:779 (find_package):
By not providing "FindQt5UiTools.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5UiTools", but CMake did not find one.
Could not find a package configuration file provided by "Qt5UiTools" with
any of the following names:
Qt5UiToolsConfig.cmake
qt5uitools-config.cmake
Add the installation prefix of "Qt5UiTools" to CMAKE_PREFIX_PATH or set
"Qt5UiTools_DIR" to a directory containing one of the above files. If
"Qt5UiTools" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:780 (find_package):
By not providing "FindQt5Network.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Network", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Network" with
any of the following names:
Qt5NetworkConfig.cmake
qt5network-config.cmake
Add the installation prefix of "Qt5Network" to CMAKE_PREFIX_PATH or set
"Qt5Network_DIR" to a directory containing one of the above files. If
"Qt5Network" provides a separate development package or SDK, be sure it has
been installed.
CMake Warning at CMakeLists.txt:781 (find_package):
By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5Concurrent", but CMake did not find one.
Could not find a package configuration file provided by "Qt5Concurrent"
with any of the following names:
Qt5ConcurrentConfig.cmake
qt5concurrent-config.cmake
Add the installation prefix of "Qt5Concurrent" to CMAKE_PREFIX_PATH or set
"Qt5Concurrent_DIR" to a directory containing one of the above files. If
"Qt5Concurrent" provides a separate development package or SDK, be sure it
has been installed.
CMake Warning at CMakeLists.txt:784 (find_package):
By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5WebKitWidgets", but CMake did not find one.
Could not find a package configuration file provided by "Qt5WebKitWidgets"
with any of the following names:
Qt5WebKitWidgetsConfig.cmake
qt5webkitwidgets-config.cmake
Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or
set "Qt5WebKitWidgets_DIR" to a directory containing one of the above
files. If "Qt5WebKitWidgets" provides a separate development package or
SDK, be sure it has been installed.
CMake Error at CMakeLists.txt:789 (MESSAGE):
========================
Qt5 libraries not found.
========================
-- Configuring incomplete, errors occurred!
See also "/usr/local/FreeCAD/build/CMakeFiles/CMakeOutput.log".
See also "/usr/local/FreeCAD/build/CMakeFiles/CMakeError.log".
[...r/local/FreeCAD/build]
Federico Carminati
Co-Founder and Scientific Director of Transmutex SA
Switzerland/Suisse
Co-Founder and Scientific Director of Transmutex SA
Switzerland/Suisse
- federico.carminati
- Posts: 66
- Joined: Thu May 18, 2017 1:01 pm
- Location: Geneva, Switzerland
Re: Cannot compile FreeCad on MacOS X
Answering my own post, I found that I can make it work by the following configuration for CMAKE
cmake -DBUILD_QT5=1 -DFREECAD_USE_EXTERNAL_KDL=1 -DBUILD_FEM_NETGEN=1 -DFREECAD_CREATE_MAC_APP=1 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt\@5.6/5.6.2/ ../FreeCAD-git/
Still this is not what the doc says.
cmake -DBUILD_QT5=1 -DFREECAD_USE_EXTERNAL_KDL=1 -DBUILD_FEM_NETGEN=1 -DFREECAD_CREATE_MAC_APP=1 -DCMAKE_BUILD_TYPE="Release" -DCMAKE_PREFIX_PATH=/usr/local/Cellar/qt\@5.6/5.6.2/ ../FreeCAD-git/
Still this is not what the doc says.
Federico Carminati
Co-Founder and Scientific Director of Transmutex SA
Switzerland/Suisse
Co-Founder and Scientific Director of Transmutex SA
Switzerland/Suisse
Re: Cannot compile FreeCad on MacOS X
Hello federico,
This is off topic, are you sure you want to post your full postal address and phone numbers in your signature? Most people try to keep some measure of anonymity...
The documentation is not always up to date...federico.carminati wrote:Still this is not what the doc says.
This is off topic, are you sure you want to post your full postal address and phone numbers in your signature? Most people try to keep some measure of anonymity...
- federico.carminati
- Posts: 66
- Joined: Thu May 18, 2017 1:01 pm
- Location: Geneva, Switzerland
Re: Cannot compile FreeCad on MacOS X
It would be perhaps worth updating the doc. For the signature, thanks for the tip... I have reduced it.
Federico Carminati
Co-Founder and Scientific Director of Transmutex SA
Switzerland/Suisse
Co-Founder and Scientific Director of Transmutex SA
Switzerland/Suisse
Re: Cannot compile FreeCad on MacOS X
Maybe also open an issue on https://github.com/FreeCAD/homebrew-freecad/issues since this is homebrew related?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Cannot compile FreeCad on MacOS X
I'm a FC noob compiling on mac for the first time, minimal experience with brew, cmake, etc. I spent quite a while figuring things out, but eventually was able to build the app bundle from HEAD.
Can someone please update the wiki to provide the right command line steps?
First problem was that 'brew tap homebrew/science' was broken (Of course this is not a FC build issue per se, but still blocked me. I tracked it down to a recent bad commit on the science repo. I posted a comment and boom! somebody jumped in and fixed it within minutes.
Then I hit the Qt5 path problem. Searched the forum, found this thread, found the relevant parts in .travis.yml, and adapted my build script accordingly.
Can someone please update the wiki to provide the right command line steps?
First problem was that 'brew tap homebrew/science' was broken (Of course this is not a FC build issue per se, but still blocked me. I tracked it down to a recent bad commit on the science repo. I posted a comment and boom! somebody jumped in and fixed it within minutes.
Then I hit the Qt5 path problem. Searched the forum, found this thread, found the relevant parts in .travis.yml, and adapted my build script accordingly.
Code: Select all
#!/bin/bash
# pull latest source code from github
cd FreeCAD-git
git pull
cd ..
# Replace Qt4 in ports-cache with Qt5, if necessary
brew ls --versions cartr/qt4/qt > /dev/null && \
brew uninstall --ignore-dependencies --force cartr/qt4/shiboken@1.2 cartr/qt4/pyside@1.2 cartr/qt4/pyside-tools@1.2 cartr/qt4/qt
# ensure all dependencies are satisfied
brew install --verbose --only-dependencies freecad --with-packaging-utils
brew install --verbose --only-dependencies freecad --with-packaging-utils
# remove and recreate build output dir
if [ -d ./build ]; then
rm -rf ./build
fi
mkdir -p ./build
# provide Qt5 path for cmake
QT5_CMAKE_PREFIX=$(ls -d $(brew list -1 | grep qt | tail -1 | xargs brew --cellar)/*/lib/cmake)
cd ./build
cmake \
-DBUILD_QT5="1" \
-DFREECAD_USE_EXTERNAL_KDL="1" \
-DCMAKE_BUILD_TYPE="Release" \
-DBUILD_FEM_NETGEN=1 \
-DFREECAD_CREATE_MAC_APP="1" \
-DCMAKE_PREFIX_PATH=${QT5_CMAKE_PREFIX} \
-DCMAKE_INSTALL_PREFIX="./.." \
../FreeCAD-git/
make -j5 install
cd ..
Re: Cannot compile FreeCad on MacOS X
It would be great, if you do it yourself. You have had the problems, you solved them, and now you can share your knowledge. There is probably currently nobody here having better knowledge how to do this from a newbie's point of view.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Cannot compile FreeCad on MacOS X
Let's run it by the mac guys first as well (that's why i encouraged to open an issues on the home brew-freecad repo.
peterl94 wrote:ping
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Cannot compile FreeCad on MacOS X
Yes, the wiki instructions definitely need updating. No promises, but I might get around to doing it sometime next week.
Re: Cannot compile FreeCad on MacOS X
I recall reading somewhere in here (noob faq I think) about noobs needing a certain minimum number of posts, and some other requirements. So if the temple priests will provide their blessings, sure, I would gladly do it.