Code: Select all
OS: macOS 12.3
Word size of FreeCAD: 64-bit
Version: 0.20.28730 (Git)
Build type: Release
Branch: master
Hash: 4358a9ba7031a61f1ade26958b74f95ff8daf1cf
Python 3.9.12, Qt 5.15.3, Coin 4.0.0, OCC 7.5.3
Locale: English/Germany (en_DE)
Code: Select all
OS: macOS 12.3
Word size of FreeCAD: 64-bit
Version: 0.20.28730 (Git)
Build type: Release
Branch: master
Hash: 4358a9ba7031a61f1ade26958b74f95ff8daf1cf
Python 3.9.12, Qt 5.15.3, Coin 4.0.0, OCC 7.5.3
Locale: English/Germany (en_DE)
Do you mind to share the full instruction of your successful build?jmplonka wrote: ↑Thu Apr 21, 2022 12:17 pm It seems to be working:Thanks to allCode: Select all
OS: macOS 12.3 Word size of FreeCAD: 64-bit Version: 0.20.28730 (Git) Build type: Release Branch: master Hash: 4358a9ba7031a61f1ade26958b74f95ff8daf1cf Python 3.9.12, Qt 5.15.3, Coin 4.0.0, OCC 7.5.3 Locale: English/Germany (en_DE)
From a new macOS (no Conda) , verify that your python3 version is something like 3.8.x.
Code: Select all
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Code: Select all
PYTHON_VERSION=3.9
HOMEBREW_PATH=/opt/homebrew/opt
PYTHON_FRAMEWORK=$HOMEBREW_PATH/python@$PYTHON_VERSION/Frameworks/Python.framework/Versions/$PYTHON_VERSION
SOURCE_DIR=freecad_sources
BUILD_DIR=freecad_build
#BUILD_TYPE="Debug"
BUILD_TYPE="Release"
# fetch the sources from GitHub
git clone https://github.com/FreeCAD/FreeCAD.git $SOURCE_DIR
# install freecad dependencies via homebrew
brew tap freecad/freecad
brew install eigen
brew install --only-dependencies freecad
# some libraries are not linked correctly by default
brew link --overwrite pyside@2 tbb@2020
# ... and switch back to python3.9!
brew unlink python@3.10 python@3.9
brew link --force python@$PYTHON_VERSION
# dive into the build folder
mkdir -p $BUILD_DIR
cd $BUILD_DIR
# export path to installed dependencies, nglib required for Salome MESH!
export PREFIX_PATH="\
$HOMEBREW_PATH/opencascade@7.5.3;\
$HOMEBREW_PATH/qt@5;\
$HOMEBREW_PATH/vtk@8.2;\
$HOMEBREW_PATH/nglib@6.2.2104/Contents/Resources;"
# on macOS ARM -DBUILD_WEB is set to OFF -> no Start-WB
cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_PREFIX_PATH="$PREFIX_PATH" \
-DFREECAD_CREATE_MAC_APP=1 \
-DCMAKE_INSTALL_PREFIX="./.." \
-DFREECAD_USE_EXTERNAL_KDL=1 \
-DBUILD_FEM_NETGEN=1 \
-DBUILD_ENABLE_CXX_STD=C++17 \
-DBUILD_WEB=OFF \
-Wno-dev \
-DPYTHON_EXECUTABLE=python$PYTHON_VERSION \
-DPYTHON_INCLUDE_DIR=$PYTHON_FRAMEWORK/include/python$PYTHON_VERSION \
-DPYTHON_LIBRARY=$PYTHON_FRAMEWORK/lib/libpython$PYTHON_VERSION.dylib \
../$SOURCE_DIR
# see https://forum.freecadweb.org/viewtopic.php?p=507588#p507588 for path to icu4c
export LIBRARY_PATH="$HOMEBREW_PATH/icu4c/lib"
# yepp - it's an MAC Studio ;)
time sh -c 'cmake --build . -j20'
time sh -c 'cmake --install .'
Code: Select all
import subprocess
def install(name):
subprocess.call(['pip', 'install', name])
install('olefile')
install('xlrd')
install('xlrt')
install('xlutils')
Thanks mate! It works flawlessly. However, when I open the application by "open FreeCAD.app". The gui will show up but the bottom "Report View" windows will show the following error messagejmplonka wrote: ↑Fri Apr 22, 2022 6:27 pmFrom a new macOS (no Conda) , verify that your python3 version is something like 3.8.x.
I created a folder ~/dev/FreeCAD and opened the terminal there.
1. install homebrew:2. build FreeCAD:Code: Select all
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Everything is quite straightforward, except the red part (yes I like variables , makes things easier to read ):I wasn't able to move the FreeCAD.app into programs folder, but copy did the trickCode: Select all
PYTHON_VERSION=3.9 HOMEBREW_PATH=/opt/homebrew/opt PYTHON_FRAMEWORK=$HOMEBREW_PATH/python@$PYTHON_VERSION/Frameworks/Python.framework/Versions/$PYTHON_VERSION SOURCE_DIR=freecad_sources BUILD_DIR=freecad_build #BUILD_TYPE="Debug" BUILD_TYPE="Release" # fetch the sources from GitHub git clone https://github.com/FreeCAD/FreeCAD.git $SOURCE_DIR # install freecad dependencies via homebrew brew tap freecad/freecad brew install eigen brew install --only-dependencies freecad # some libraries are not linked correctly by default brew link --overwrite pyside@2 tbb@2020 # ... and switch back to python3.9! brew unlink python@3.10 python@3.9 brew link --force python@$PYTHON_VERSION # dive into the build folder mkdir -p $BUILD_DIR cd $BUILD_DIR # export path to installed dependencies, nglib required for Salome MESH! export PREFIX_PATH="\ $HOMEBREW_PATH/opencascade@7.5.3;\ $HOMEBREW_PATH/qt@5;\ $HOMEBREW_PATH/vtk@8.2;\ $HOMEBREW_PATH/nglib@6.2.2104/Contents/Resources;" # on macOS ARM -DBUILD_WEB is set to OFF -> no Start-WB cmake \ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \ -DCMAKE_PREFIX_PATH="$PREFIX_PATH" \ -DFREECAD_CREATE_MAC_APP=1 \ -DCMAKE_INSTALL_PREFIX="./.." \ -DFREECAD_USE_EXTERNAL_KDL=1 \ -DBUILD_FEM_NETGEN=1 \ -DBUILD_ENABLE_CXX_STD=C++17 \ -DBUILD_WEB=OFF \ -Wno-dev \ -DPYTHON_EXECUTABLE=python$PYTHON_VERSION \ -DPYTHON_INCLUDE_DIR=$PYTHON_FRAMEWORK/include/python$PYTHON_VERSION \ -DPYTHON_LIBRARY=$PYTHON_FRAMEWORK/lib/libpython$PYTHON_VERSION.dylib \ ../$SOURCE_DIR # see https://forum.freecadweb.org/viewtopic.php?p=507588#p507588 for path to icu4c export LIBRARY_PATH="$HOMEBREW_PATH/icu4c/lib" # yepp - it's an MAC Studio ;) time sh -c 'cmake --build . -j20' time sh -c 'cmake --install .'
The olefin, xlrd, xlwt and xlutils packages where missing and I installed them in the FC's python console:Now I was able to use my plugins (InventorLoader and Importer3D).Code: Select all
import subprocess def install(name): subprocess.call(['pip', 'install', name]) install('olefile') install('xlrd') install('xlrt') install('xlutils')
Regards
Jens
Code: Select all
13:57:17 Addon Manager Warning: Could not import QtWebEngineWidgets, it seems to be missing from your system. Please use your system's package manager to install the python3-pyside2.qtwebengine* and python3-pyside2.qtwebchannel packages, and if possible alert your package creator to the missing dependency. Display of package README will be limited until this dependency is resolved.
Yes, it's because of the disabled Web-Feature.aqsss wrote: ↑Mon Apr 25, 2022 6:01 am ... However, when I open the application by "open FreeCAD.app". The gui will show up but the bottom "Report View" windows will show the following error message
Did you have the same issue before?Code: Select all
13:57:17 Addon Manager Warning: Could not import QtWebEngineWidgets, it seems to be missing from your system. Please use your system's package manager to install the python3-pyside2.qtwebengine* and python3-pyside2.qtwebchannel packages, and if possible alert your package creator to the missing dependency. Display of package README will be limited until this dependency is resolved.
Got it. Thx again for the detail instruction. I can finally run native arm64 FreeCAD on Macbook M1.jmplonka wrote: ↑Mon Apr 25, 2022 6:09 amYes, it's because of the disabled Web-Feature.aqsss wrote: ↑Mon Apr 25, 2022 6:01 am ... However, when I open the application by "open FreeCAD.app". The gui will show up but the bottom "Report View" windows will show the following error message
Did you have the same issue before?Code: Select all
13:57:17 Addon Manager Warning: Could not import QtWebEngineWidgets, it seems to be missing from your system. Please use your system's package manager to install the python3-pyside2.qtwebengine* and python3-pyside2.qtwebchannel packages, and if possible alert your package creator to the missing dependency. Display of package README will be limited until this dependency is resolved.
Code: Select all
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: for: ./FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64) option "-add_rpath ./FreeCAD/FreeCAD.app/Contents/lib" would duplicate path, file already has LC_RPATH for: ./dev/FreeCAD/FreeCAD.app/Contents/libb
Code: Select all
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: /opt/homebrew/Cellar/open-mpi/4.1.3/lib found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath /opt/homebrew/Cellar/open-mpi/4.1.3/lib"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: /opt/homebrew/opt/libevent/lib found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath /opt/homebrew/opt/libevent/lib"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: /opt/homebrew/opt/opencascade@7.5.3/lib found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath /opt/homebrew/opt/opencascade@7.5.3/lib"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: ./FreeCAD/freecad_build/Mod/PartDesign found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath ./FreeCAD/freecad_build/Mod/PartDesign"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: ./FreeCAD/freecad_build/Mod/Sketcher found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath ./FreeCAD/freecad_build/Mod/Sketcher"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: ./FreeCAD/freecad_build/Mod/Part found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath ./FreeCAD/freecad_build/Mod/Part"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: ./FreeCAD/freecad_build/lib found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath ./FreeCAD/freecad_build/lib"
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: no LC_RPATH load command with path: /opt/homebrew/lib found in: ./FreeCAD/FreeCAD.app/Contents/lib/PartDesignGui.so (for architecture arm64), required for specified option "-delete_rpath /opt/homebrew/lib"
Code: Select all
Traceback (most recent call last):
File "./FreeCAD/freecad_sources/src/Tools/MakeMacBundleRelocatable.py", line 391, in <module>
main()
File "./FreeCAD/freecad_sources/src/Tools/MakeMacBundleRelocatable.py", line 374, in main
build_deps_graph(graph, bundle_path, dir_filter, search_paths)
File "./FreeCAD/freecad_sources/src/Tools/MakeMacBundleRelocatable.py", line 241, in build_deps_graph
deps = create_dep_nodes(list_install_names(k2), s_paths)
File "./FreeCAD/freecad_sources/src/Tools/MakeMacBundleRelocatable.py", line 166, in create_dep_nodes
raise LibraryNotFound(lib_name + " not found in given search paths")
__main__.LibraryNotFound: libicudata.70.dylib not found in given search paths
libicudata errors looks relevant to https://github.com/FreeCAD/FreeCAD/pull/6784
CC @ipatch (this is related to compiling FC on Mac M1)ipatch wrote: pinged by pinger macro
Yes, I do. After completely reinstalling brew and running the first two steps of the Readme, I'm facing now the error:Kunda1 wrote: ↑Mon May 09, 2022 10:42 pmare you using https://github.com/FreeCAD/homebrew-freecad to build FC from homebrew?
Code: Select all
Unable to find LC_DYLD_LOAD entry: @rpath/libc++abi.1.dylib