macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by FreddyFreddy »

Leave this here, or report at FreeCAD/ homebrew-freecad repository?
Last edited by Kunda1 on Mon Mar 21, 2022 12:20 am, edited 1 time in total.
Reason: Updated the title for clarity
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Error: freecad/freecad/freecad HEAD-d6a9a94 did not build

Post by Kunda1 »

we can ping @ipatch and go from there
ipatch 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
User avatar
doia
Posts: 251
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by doia »

As I said in another post, please post your setup and a reproducible list of steps you took to build/compile FC. We would like to help you, but "FreeCAD does not build" leaves a lot room for guesswork.
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by FreddyFreddy »

doia wrote: Mon Mar 21, 2022 12:31 pm As I said in another post, please post your setup and a reproducible list of steps you took to build/compile FC. We would like to help you, but "FreeCAD does not build" leaves a lot room for guesswork.
Was seeking clarification about where to report, as brew output states

Code: Select all

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/freecad/homebrew-freecad/issues
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by FreddyFreddy »

The original fail (will give full result in next post) was from

Code: Select all

brew install freecad/freecad/freecad --build-from-source --HEAD --verbose
I tried something different:

Code: Select all

% brew install --HEAD freecad
Warning: Treating freecad as a formula. For the cask, use homebrew/cask/freecad
==> Cloning https://github.com/freecad/FreeCAD.git
Updating /Users/bernie/Library/Caches/Homebrew/freecad--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at e20afbc154 [JtReader] remove unused includes
==> Installing freecad from freecad/freecad
==> cmake -DHOMEBREW_PREFIX=/usr/local -DUSE_PYTHON3=1 -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 
Last 15 lines from /Users/bernie/Library/Logs/Homebrew/freecad/01.cmake:
  version which was used when Shiboken was built.  Consider building shiboken
  with FORCE_LIMITED_API set to '1', so that only the Python major version
  matters.

  Built with: '3.9' Detected: '3.10'
Call Stack (most recent call first):
  /usr/local/opt/pyside@2/lib/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-39-darwin.cmake:45 (shiboken_check_if_built_and_target_python_are_compatible)
  /usr/local/opt/pyside@2/lib/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake:13 (find_package)
  CMakeLists.txt:75 (SetupShibokenAndPyside)


-- Configuring incomplete, errors occurred!
See also "/tmp/freecad-20220322-8915-6f7vj2/Build/CMakeFiles/CMakeOutput.log".
See also "/tmp/freecad-20220322-8915-6f7vj2/Build/CMakeFiles/CMakeError.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/freecad/homebrew-freecad/issues

These open issues may also help:
freecad mac app bundle ie. `FreeCAD.app` runtime issue, cannot find the runtime dependency pyside2 https://github.com/FreeCAD/homebrew-freecad/issues/278
`FreeCAD.app` apple app bundle does not include necessary SSL certs required for addon manager https://github.com/FreeCAD/homebrew-freecad/issues/303
building freecad with `--with-macos-app` https://github.com/FreeCAD/homebrew-freecad/issues/142
Fix macapp build with homebrew (needs a FreeCAD fix) https://github.com/FreeCAD/homebrew-freecad/pull/172
Freecad build fails on Big Sur during Install https://github.com/FreeCAD/homebrew-freecad/issues/163
Problem with BOOST version installing `freecad --HEAD --with-macos-app` on BigSur https://github.com/FreeCAD/homebrew-freecad/issues/237
homebrew build-from-source post-install step issue with homebrew-freecad-bundle.pth check https://github.com/FreeCAD/homebrew-freecad/issues/154
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
bernie@Bernies-iMac freecad % 
and brew list:

Code: Select all

==> Formulae
aom				freetype			jansson				libtool				nglib@6.2.2104			python@3.10
apr				fribidi				jbig2dec			libunistring			nspr				python@3.9
apr-util			gcc				jemalloc			libvmaf				nss				qt@5
argon2				gd				jpeg				libvorbis			numpy				readline
aspell				gdbm				jpeg-xl				libx11				oniguruma			rtmpdump
atk				gdk-pixbuf			jsoncpp				libxau				open-mpi			shiboken2@5.15.2
autoconf			gettext				krb5				libxcb				openblas			sqlite
boost				ghostscript			libaec				libxdmcp			opencamlib			swig
boost-python3			giflib				libavif				libxext				opencascade			szip
brotli				gl2ps				libepoxy			libxrender			opencascade@7.5.3		tbb
c-ares				glew				libev				libzip				openexr				tbb@2020
ca-certificates			glib				libevent			little-cms2			openjpeg			tcl-tk
cairo				gmp				libffi				llvm				openldap			theora
cmake				gobject-introspection		libidn				llvm@11				openssl@1.1			tidy-html5
coin3d				graphite2			libidn2				lz4				orocos-kdl			unixodbc
composer			gsettings-desktop-schemas	libmetalink			lzo				pango				utf8cpp
curl				gtk+3				libmpc				m4				pcre				vtk
curl-openssl			harfbuzz			libnghttp2			matplotlib@3.4.3		pcre2				vtk@8.2
cython				hdf5				libogg				med-file@4.1.0			php				webp
double-conversion		hdf5@1.10			libpng				mkcert				pixman				xerces-c
doxygen				hicolor-icon-theme		libpq				mono				pkg-config			xorgproto
eigen				httpd				libpthread-stubs		mpdecimal			pugixml				xz
fontconfig			hwloc				libsodium			mpfr				pyqt@5				zstd
freecad				icu4c				libspnav			ncurses				pyside2
freeimage			imath				libssh2				netcdf				pyside2@5.15.2
freetds				isl				libtiff				nghttp2				pyside@2

==> Casks
vagrant			visual-studio-code
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by FreddyFreddy »

Code: Select all

brew install freecad/freecad/freecad --build-from-source --HEAD --verbose
==> Cloning https://github.com/freecad/FreeCAD.git
Updating /Users/bernie/Library/Caches/Homebrew/freecad--git
git config remote.origin.url https://github.com/freecad/FreeCAD.git
git config remote.origin.fetch \+refs/heads/master:refs/remotes/origin/master
git config remote.origin.tagOpt --no-tags
git config advice.detachedHead false
git fetch origin
From https://github.com/freecad/FreeCAD
   e20afbc154..56ced5cdd5  master     -> origin/master
==> Checking out branch master
git checkout -f master --
Already on 'master'
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
  (use "git pull" to update your local branch)
git reset --hard origin/master --
HEAD is now at 56ced5cdd5 Gui: fix build failure with older Coin3D versions
==> Installing freecad from freecad/freecad
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.git-blame-ignore-revs /private/tmp/d20220322-11903-ps3lfg/.git-blame-ignore-revs
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/CODE_OF_CONDUCT.md /private/tmp/d20220322-11903-ps3lfg/CODE_OF_CONDUCT.md
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.arcconfig /private/tmp/d20220322-11903-ps3lfg/.arcconfig
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/tools/. /private/tmp/d20220322-11903-ps3lfg/tools
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/environment-linux.yml /private/tmp/d20220322-11903-ps3lfg/environment-linux.yml
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/rpkg.macros /private/tmp/d20220322-11903-ps3lfg/rpkg.macros
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/CMakeLists.txt /private/tmp/d20220322-11903-ps3lfg/CMakeLists.txt
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/LICENSE /private/tmp/d20220322-11903-ps3lfg/LICENSE
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/requirements.txt /private/tmp/d20220322-11903-ps3lfg/requirements.txt
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/cMake/. /private/tmp/d20220322-11903-ps3lfg/cMake
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/conda/. /private/tmp/d20220322-11903-ps3lfg/conda
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/ci/. /private/tmp/d20220322-11903-ps3lfg/ci
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/vagrant/. /private/tmp/d20220322-11903-ps3lfg/vagrant
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/config.h.cmake /private/tmp/d20220322-11903-ps3lfg/config.h.cmake
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/README.md /private/tmp/d20220322-11903-ps3lfg/README.md
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/build_unix_dev_conda.sh /private/tmp/d20220322-11903-ps3lfg/build_unix_dev_conda.sh
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/SMESH_Version.h.cmake /private/tmp/d20220322-11903-ps3lfg/SMESH_Version.h.cmake
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/appveyor.yml /private/tmp/d20220322-11903-ps3lfg/appveyor.yml
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/environment-osx.yml /private/tmp/d20220322-11903-ps3lfg/environment-osx.yml
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/BUILD_OSX.md /private/tmp/d20220322-11903-ps3lfg/BUILD_OSX.md
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.gitignore /private/tmp/d20220322-11903-ps3lfg/.gitignore
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.github/. /private/tmp/d20220322-11903-ps3lfg/.github
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.gitattributes /private/tmp/d20220322-11903-ps3lfg/.gitattributes
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/LibraryVersions.h.cmake /private/tmp/d20220322-11903-ps3lfg/LibraryVersions.h.cmake
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/ChangeLog.txt /private/tmp/d20220322-11903-ps3lfg/ChangeLog.txt
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.travis/. /private/tmp/d20220322-11903-ps3lfg/.travis
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.log_errors /private/tmp/d20220322-11903-ps3lfg/.log_errors
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.git/. /private/tmp/d20220322-11903-ps3lfg/.git
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/lgtm.yml /private/tmp/d20220322-11903-ps3lfg/lgtm.yml
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/data/. /private/tmp/d20220322-11903-ps3lfg/data
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.circleci/. /private/tmp/d20220322-11903-ps3lfg/.circleci
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/.travis.yml /private/tmp/d20220322-11903-ps3lfg/.travis.yml
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/package/. /private/tmp/d20220322-11903-ps3lfg/package
cp -pR /Users/bernie/Library/Caches/Homebrew/freecad--git/src/. /private/tmp/d20220322-11903-ps3lfg/src
cp -pR /private/tmp/d20220322-11903-ps3lfg/.git-blame-ignore-revs /private/tmp/freecad-20220322-11903-cvt33q/.git-blame-ignore-revs
cp -pR /private/tmp/d20220322-11903-ps3lfg/CODE_OF_CONDUCT.md /private/tmp/freecad-20220322-11903-cvt33q/CODE_OF_CONDUCT.md
cp -pR /private/tmp/d20220322-11903-ps3lfg/.arcconfig /private/tmp/freecad-20220322-11903-cvt33q/.arcconfig
cp -pR /private/tmp/d20220322-11903-ps3lfg/tools/. /private/tmp/freecad-20220322-11903-cvt33q/tools
cp -pR /private/tmp/d20220322-11903-ps3lfg/environment-linux.yml /private/tmp/freecad-20220322-11903-cvt33q/environment-linux.yml
cp -pR /private/tmp/d20220322-11903-ps3lfg/rpkg.macros /private/tmp/freecad-20220322-11903-cvt33q/rpkg.macros
cp -pR /private/tmp/d20220322-11903-ps3lfg/CMakeLists.txt /private/tmp/freecad-20220322-11903-cvt33q/CMakeLists.txt
cp -pR /private/tmp/d20220322-11903-ps3lfg/LICENSE /private/tmp/freecad-20220322-11903-cvt33q/LICENSE
cp -pR /private/tmp/d20220322-11903-ps3lfg/requirements.txt /private/tmp/freecad-20220322-11903-cvt33q/requirements.txt
cp -pR /private/tmp/d20220322-11903-ps3lfg/cMake/. /private/tmp/freecad-20220322-11903-cvt33q/cMake
cp -pR /private/tmp/d20220322-11903-ps3lfg/conda/. /private/tmp/freecad-20220322-11903-cvt33q/conda
cp -pR /private/tmp/d20220322-11903-ps3lfg/ci/. /private/tmp/freecad-20220322-11903-cvt33q/ci
cp -pR /private/tmp/d20220322-11903-ps3lfg/vagrant/. /private/tmp/freecad-20220322-11903-cvt33q/vagrant
cp -pR /private/tmp/d20220322-11903-ps3lfg/config.h.cmake /private/tmp/freecad-20220322-11903-cvt33q/config.h.cmake
cp -pR /private/tmp/d20220322-11903-ps3lfg/README.md /private/tmp/freecad-20220322-11903-cvt33q/README.md
cp -pR /private/tmp/d20220322-11903-ps3lfg/build_unix_dev_conda.sh /private/tmp/freecad-20220322-11903-cvt33q/build_unix_dev_conda.sh
cp -pR /private/tmp/d20220322-11903-ps3lfg/SMESH_Version.h.cmake /private/tmp/freecad-20220322-11903-cvt33q/SMESH_Version.h.cmake
cp -pR /private/tmp/d20220322-11903-ps3lfg/appveyor.yml /private/tmp/freecad-20220322-11903-cvt33q/appveyor.yml
cp -pR /private/tmp/d20220322-11903-ps3lfg/environment-osx.yml /private/tmp/freecad-20220322-11903-cvt33q/environment-osx.yml
cp -pR /private/tmp/d20220322-11903-ps3lfg/BUILD_OSX.md /private/tmp/freecad-20220322-11903-cvt33q/BUILD_OSX.md
cp -pR /private/tmp/d20220322-11903-ps3lfg/.gitignore /private/tmp/freecad-20220322-11903-cvt33q/.gitignore
cp -pR /private/tmp/d20220322-11903-ps3lfg/.github/. /private/tmp/freecad-20220322-11903-cvt33q/.github
cp -pR /private/tmp/d20220322-11903-ps3lfg/.gitattributes /private/tmp/freecad-20220322-11903-cvt33q/.gitattributes
cp -pR /private/tmp/d20220322-11903-ps3lfg/LibraryVersions.h.cmake /private/tmp/freecad-20220322-11903-cvt33q/LibraryVersions.h.cmake
cp -pR /private/tmp/d20220322-11903-ps3lfg/ChangeLog.txt /private/tmp/freecad-20220322-11903-cvt33q/ChangeLog.txt
cp -pR /private/tmp/d20220322-11903-ps3lfg/.travis/. /private/tmp/freecad-20220322-11903-cvt33q/.travis
cp -pR /private/tmp/d20220322-11903-ps3lfg/.log_errors /private/tmp/freecad-20220322-11903-cvt33q/.log_errors
cp -pR /private/tmp/d20220322-11903-ps3lfg/.git/. /private/tmp/freecad-20220322-11903-cvt33q/.git
cp -pR /private/tmp/d20220322-11903-ps3lfg/lgtm.yml /private/tmp/freecad-20220322-11903-cvt33q/lgtm.yml
cp -pR /private/tmp/d20220322-11903-ps3lfg/data/. /private/tmp/freecad-20220322-11903-cvt33q/data
cp -pR /private/tmp/d20220322-11903-ps3lfg/.circleci/. /private/tmp/freecad-20220322-11903-cvt33q/.circleci
cp -pR /private/tmp/d20220322-11903-ps3lfg/.travis.yml /private/tmp/freecad-20220322-11903-cvt33q/.travis.yml
cp -pR /private/tmp/d20220322-11903-ps3lfg/package/. /private/tmp/freecad-20220322-11903-cvt33q/package
cp -pR /private/tmp/d20220322-11903-ps3lfg/src/. /private/tmp/freecad-20220322-11903-cvt33q/src
chmod -Rf +w /private/tmp/d20220322-11903-ps3lfg
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/freecad/HEAD-56ced5c -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DBUILD_TESTING=OFF -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DHOMEBREW_PREFIX=/usr/local -DUSE_PYTHON3=1 -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DPYTHON_INCLUDE_DIR=/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -DPYTHON_LIBRARY=/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib -DBUILD_SMESH=1 -DBUILD_WEB=ON -DBUILD_QT5=1 -DFREECAD_USE_EXTERNAL_KDL=1 -DBUILD_FEM=1 -DBUILD_FEM_NETGEN=0 -DBUILD_ENABLE_CXX_STD=C++17 -DCMAKE_PREFIX_PATH="/usr/local/opt/xerces-c;/usr/local/opt/opencascade@7.5.3;/usr/local/opt/hdf5@1.10;/usr/local/opt/coin3d;/usr/local/opt/qt@5;/usr/local/opt/vtk@8.2;/usr/local/opt/pyside2@5.15.2;" -DFREECAD_CREATE_MAC_APP=1 ..
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiler: AppleClang, version: 13.1.6.13160021
-- Looking for GL/gl.h
-- Looking for GL/gl.h - not found
-- Looking for C++ include istream
-- Looking for C++ include istream - found
-- Looking for C++ include ostream
-- Looking for C++ include ostream - found
-- Looking for C++ include fstream
-- Looking for C++ include fstream - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for C++ include ios
-- Looking for C++ include ios - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Looking for C++ include iomanip
-- Looking for C++ include iomanip - found
-- Looking for C++ include iostream
-- Looking for C++ include iostream - found
-- Check for STD namespace
-- Check for STD namespace - found
-- Force BOOST_PP_VARIADICS=1 for clang
-- prefix: /usr/local/Cellar/freecad/HEAD-56ced5c
-- bindir: bin
-- datadir: share
-- docdir: share/doc/FreeCAD
-- includedir: include
-- libdir: lib
-- cmake: 3.22.3
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.3") found components: doxygen missing components: dot
-- Found Python3: /usr/local/opt/python@3.10/bin/python3.10 (found version "3.10.2") found components: Interpreter Development Development.Module Development.Embed 
-- Found XercesC: /usr/local/lib/libxerces-c.dylib (found version "3.2.3") 
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libz.tbd (found version "1.2.11") 
-- PyCXX found:
--   Headers:  /tmp/freecad-20220322-11903-cvt33q/src
--   Sources:  /tmp/freecad-20220322-11903-cvt33q/src/CXX
--   Version:  6.2.8
-- Found OCC: /usr/local/opt/opencascade@7.5.3/include/opencascade (found version "7.5.3") 
-- -- Found OCE/OpenCASCADE version: 7.5.3
-- -- OCE/OpenCASCADE include directory: /usr/local/opt/opencascade@7.5.3/include/opencascade
-- -- OCE/OpenCASCADE shared libraries directory: /usr/local/opt/opencascade@7.5.3/lib
-- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/OpenGL.framework   
-- Found OpenGLU: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/OpenGL.framework
-- VTK components: vtkCommonCore;vtkCommonDataModel;vtkFiltersVerdict;vtkIOXML;vtkFiltersCore;vtkFiltersGeneral;vtkIOLegacy;vtkFiltersExtraction;vtkFiltersSources;vtkFiltersGeometry;vtkhdf5;vtkRenderingCore;vtkInteractionStyle;vtkRenderingFreeType;vtkRenderingOpenGL2
-- Check for medfile (libmed and libmedc) ...
-- Found MEDFile: /usr/local/include  
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- We guess that libmed was built using hdf5-serial version
-- Checking for one of the modules 'hdf5-serial'
-- Found HDF5: /usr/local/opt/hdf5@1.10/lib/libhdf5.dylib;/usr/local/opt/szip/lib/libsz.dylib;/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libz.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libdl.tbd;/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/lib/libm.tbd (found version "1.10.8")  
-- Checking for one of the modules 'ompi-cxx'
-- Found Boost: /usr/local/lib/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.55") found components: filesystem program_options regex system thread date_time 
-- Found SWIG: /usr/local/bin/swig (found version "4.0.2")  
-- Found Eigen3: /usr/local/include/eigen3 (found suitable version "3.4.0", minimum required is "2.91.0") 
-- 1. imported_location: /usr/local/opt/qt@5/bin/qmake
-- 2. imported_location: /usr/local/opt/qt@5/bin/moc
-- 3. imported_location: /usr/local/opt/qt@5/bin/rcc
-- 4. dir: /usr/local/opt/qt@5/.//mkspecs/macx-clang
-- 5. _Qt5CTestMacros: /usr/local/opt/qt@5/lib/cmake/Qt5Core/Qt5CTestMacros.cmake
-- Found Freetype: /usr/local/lib/libfreetype.dylib (found version "2.11.1") 
-- Coin3D libraries found
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pivy'
-- Found Spnav: /usr/local/lib/libspnav.dylib  
-- Shiboken2Config: Using default python: .cpython-39-darwin
-- Found PythonInterp: /usr/local/opt/python@3.10/bin/python3.10 (found suitable version "3.10.2", minimum required is "3") 
-- Found PythonLibs: /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable version "3.9.10", minimum required is "3") 
CMake Error at /usr/local/opt/pyside@2/lib/cmake/Shiboken2-5.15.2/shiboken_helpers.cmake:468 (message):
  The detected Python minor version is not compatible with the Python minor
  version which was used when Shiboken was built.  Consider building shiboken
  with FORCE_LIMITED_API set to '1', so that only the Python major version
  matters.

  Built with: '3.9' Detected: '3.10'
Call Stack (most recent call first):
  /usr/local/opt/pyside@2/lib/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-39-darwin.cmake:45 (shiboken_check_if_built_and_target_python_are_compatible)
  /usr/local/opt/pyside@2/lib/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake:13 (find_package)
  CMakeLists.txt:75 (SetupShibokenAndPyside)


-- Configuring incomplete, errors occurred!
See also "/tmp/freecad-20220322-11903-cvt33q/Build/CMakeFiles/CMakeOutput.log".
See also "/tmp/freecad-20220322-11903-cvt33q/Build/CMakeFiles/CMakeError.log".

==> Formula
Tap: freecad/freecad
Path: /usr/local/Homebrew/Library/Taps/freecad/homebrew-freecad/Formula/freecad.rb
==> Configuration
HOMEBREW_VERSION: 3.4.3-10-g54a994a
ORIGIN: https://github.com/Homebrew/brew
HEAD: 54a994a3446a98b87a472297c21538a821900149
Last commit: 15 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 7421f11096780fc4f905cc27b4449606ec039176
Core tap last commit: 51 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit skylake
Clang: 13.1.6 build 1316
Git: 2.23.0 => /usr/local/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3-x86_64
CLT: 13.3.0.0.1.1645755326
Xcode: N/A
==> ENV
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local/opt/hdf5@1.10:/usr/local/opt/tbb@2020:/usr/local/opt/icu4c:/usr/local/opt/openssl@1.1:/usr/local/opt/readline:/usr/local/opt/sqlite:/usr/local/opt/python@3.10:/usr/local/opt/llvm:/usr/local/opt/qt@5:/usr/local/opt/pyside@2:/usr/local/opt/cython:/usr/local/opt/libffi:/usr/local/opt/openblas:/usr/local/opt/tcl-tk:/usr/local/opt/opencascade@7.5.3:/usr/local/opt/shiboken2@5.15.2:/usr/local/opt/pyside2@5.15.2:/usr/local/opt/llvm@11:/usr/local/opt/szip:/usr/local/opt/vtk@8.2:/usr/local
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
CMAKE_FRAMEWORK_PATH: /usr/local/opt/python@3.9/Frameworks:/usr/local/opt/python@3.10/Frameworks:/usr/local/opt/qt@5/Frameworks
PKG_CONFIG_PATH: /usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/readline/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:/usr/local/opt/xz/lib/pkgconfig:/usr/local/opt/python@3.9/lib/pkgconfig:/usr/local/opt/python@3.10/lib/pkgconfig:/usr/local/opt/qt@5/lib/pkgconfig:/usr/local/opt/pyside@2/lib/pkgconfig:/usr/local/opt/coin3d/lib/pkgconfig:/usr/local/opt/libpng/lib/pkgconfig:/usr/local/opt/freetype/lib/pkgconfig:/usr/local/opt/fontconfig/lib/pkgconfig:/usr/local/opt/jbig2dec/lib/pkgconfig:/usr/local/opt/jpeg/lib/pkgconfig:/usr/local/opt/libidn/lib/pkgconfig:/usr/local/opt/libtiff/lib/pkgconfig:/usr/local/opt/little-cms2/lib/pkgconfig:/usr/local/opt/openjpeg/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/pcre/lib/pkgconfig:/usr/local/opt/glib/lib/pkgconfig:/usr/local/opt/atk/lib/pkgconfig:/usr/local/opt/gdk-pixbuf/lib/pkgconfig:/usr/local/opt/libepoxy/lib/pkgconfig:/usr/local/opt/libpthread-stubs/lib/pkgconfig:/usr/local/opt/libxau/lib/pkgconfig:/usr/local/opt/libxdmcp/lib/pkgconfig:/usr/local/opt/libxcb/lib/pkgconfig:/usr/local/opt/libx11/lib/pkgconfig:/usr/local/opt/libxext/lib/pkgconfig:/usr/local/opt/libxrender/lib/pkgconfig:/usr/local/opt/lzo/lib/pkgconfig:/usr/local/opt/pixman/lib/pkgconfig:/usr/local/opt/cairo/lib/pkgconfig:/usr/local/opt/fribidi/lib/pkgconfig:/usr/local/opt/gobject-introspection/lib/pkgconfig:/usr/local/opt/graphite2/lib/pkgconfig:/usr/local/opt/harfbuzz/lib/pkgconfig:/usr/local/opt/pango/lib/pkgconfig:/usr/local/opt/gtk+3/lib/pkgconfig:/usr/local/opt/gmp/lib/pkgconfig:/usr/local/opt/isl/lib/pkgconfig:/usr/local/opt/mpfr/lib/pkgconfig:/usr/local/opt/zstd/lib/pkgconfig:/usr/local/opt/openblas/lib/pkgconfig:/usr/local/opt/tcl-tk/lib/pkgconfig:/usr/local/opt/shiboken2@5.15.2/lib/pkgconfig:/usr/local/opt/pyside2@5.15.2/lib/pkgconfig:/usr/local/opt/orocos-kdl/lib/pkgconfig:/usr/local/opt/netcdf/lib/pkgconfig:/usr/local/opt/webp/lib/pkgconfig:/usr/local/opt/xerces-c/lib/pkgconfig:/usr/local/opt/gsettings-desktop-schemas/share/pkgconfig:/usr/local/opt/xorgproto/share/pkgconfig:/usr/local/opt/eigen/share/pkgconfig
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/12
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/cmake/bin:/usr/local/opt/hdf5@1.10/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/swig/bin:/usr/local/opt/icu4c/bin:/usr/local/opt/gdbm/bin:/usr/local/opt/openssl@1.1/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/xz/bin:/usr/local/opt/python@3.9/bin:/usr/local/opt/python@3.10/bin:/usr/local/opt/llvm/bin:/usr/local/opt/qt@5/bin:/usr/local/opt/pyside@2/bin:/usr/local/opt/coin3d/bin:/usr/local/opt/cython/bin:/usr/local/opt/doxygen/bin:/usr/local/opt/libpng/bin:/usr/local/opt/freetype/bin:/usr/local/opt/fontconfig/bin:/usr/local/opt/jbig2dec/bin:/usr/local/opt/jpeg/bin:/usr/local/opt/libidn/bin:/usr/local/opt/libtiff/bin:/usr/local/opt/little-cms2/bin:/usr/local/opt/openjpeg/bin:/usr/local/opt/ghostscript/bin:/usr/local/opt/gettext/bin:/usr/local/opt/pcre/bin:/usr/local/opt/glib/bin:/usr/local/opt/gdk-pixbuf/bin:/usr/local/opt/cairo/bin:/usr/local/opt/fribidi/bin:/usr/local/opt/gobject-introspection/bin:/usr/local/opt/graphite2/bin:/usr/local/opt/harfbuzz/bin:/usr/local/opt/pango/bin:/usr/local/opt/gtk+3/bin:/usr/local/opt/zstd/bin:/usr/local/opt/gcc/bin:/usr/local/opt/numpy/bin:/usr/local/opt/tcl-tk/bin:/usr/local/opt/med-file@4.1.0/bin:/usr/local/opt/opencascade@7.5.3/bin:/usr/local/opt/shiboken2@5.15.2/bin:/usr/local/opt/llvm@11/bin:/usr/local/opt/hdf5/bin:/usr/local/opt/netcdf/bin:/usr/local/opt/pyqt@5/bin:/usr/local/opt/vtk@8.2/bin:/usr/local/opt/giflib/bin:/usr/local/opt/webp/bin:/usr/local/opt/xerces-c/bin:/usr/bin:/bin:/usr/sbin:/sbin

Error: freecad/freecad/freecad HEAD-56ced5c did not build
Logs:
     /Users/bernie/Library/Logs/Homebrew/freecad/00.options.out
     /Users/bernie/Library/Logs/Homebrew/freecad/01.cmake.cc
     /Users/bernie/Library/Logs/Homebrew/freecad/01.cmake
     /Users/bernie/Library/Logs/Homebrew/freecad/Build
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/freecad/homebrew-freecad/issues

These open issues may also help:
freecad mac app bundle ie. `FreeCAD.app` runtime issue, cannot find the runtime dependency pyside2 https://github.com/FreeCAD/homebrew-freecad/issues/278
`FreeCAD.app` apple app bundle does not include necessary SSL certs required for addon manager https://github.com/FreeCAD/homebrew-freecad/issues/303
building freecad with `--with-macos-app` https://github.com/FreeCAD/homebrew-freecad/issues/142
Fix macapp build with homebrew (needs a FreeCAD fix) https://github.com/FreeCAD/homebrew-freecad/pull/172
Freecad build fails on Big Sur during Install https://github.com/FreeCAD/homebrew-freecad/issues/163
Problem with BOOST version installing `freecad --HEAD --with-macos-app` on BigSur https://github.com/FreeCAD/homebrew-freecad/issues/237
homebrew build-from-source post-install step issue with homebrew-freecad-bundle.pth check https://github.com/FreeCAD/homebrew-freecad/issues/154
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels.
bernie@Bernies-iMac freecad % 
User avatar
doia
Posts: 251
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by doia »

The best is to post the initial errors here in the forum, as this is the place most users will notice first. If the error with the homebrew-freecad formulae is confirmed, open an issue at https://github.com/freecad/homebrew-freecad/issues.

---

From your error/log messages I would suspect that you have Python v3.10 installed via Homebrew and linked as your main version. Please check:

Code: Select all

$ which python3 && python3 --version
# this should return something along the line of (in case of being an a Mac Intel machine, on macOS arm64 Homebrew uses another path)
/usr/local/bin/python3
Python 3.10.2
# now check which installed python you actually use as Homebrew uses symbolic links for the installed bottle
$ ls -al /usr/local/bin/python3
# this should return something along the line of
/usr/local/bin/python3 -> ../Cellar/python@3.10/3.10.2/bin/python3
The problems is, AFAIK the current homebrew-freecad formulae installs and builds FreeCAD from source, but depends on python3.9. Any dependent package like pyside2 also looks for python3.9. The official Homebrew Python3 package, installed with homebrew install python3 also uses the python v3.9 version by default. I suspect because python3.10 is fairly new and not all commonly used Python packages work with python3.10 yet.

If you want to use Python3.10 to build FreeCAD, you need to install and build most of the dependencies manually and do not use the homebrew-freecad formulae. @ipatch Please correct me if I'm wrong.

If you want to use the homebrew-freecad bottle you need to unlink python3.10 and link python3.9 into your path (or use pyenv environments, but this is another story)

Code: Select all

brew unlink python3 && brew link python@3.9
---

As for the homebrew-freecad formulae, yes this is a bug. The formulae should be able to detect which Python version is actually symlinked and use the libraries and include_dirs accordingly. Instead it uses the currently linked Python version (could be v3.9 or v3.10) but is hardcoded to use the v3.9 libraries, see https://github.com/FreeCAD/homebrew-fre ... #L104-L106

Code: Select all

      -DPYTHON_EXECUTABLE=#{hbp}/bin/python3
      -DPYTHON_INCLUDE_DIR=#{hbp}/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9
      -DPYTHON_LIBRARY=#{hbp}/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib
I think that is where your error comes from:

Code: Select all

-- Shiboken2Config: Using default python: .cpython-39-darwin
-- Found PythonInterp: /usr/local/opt/python@3.10/bin/python3.10 (found suitable version "3.10.2", minimum required is "3") 
-- Found PythonLibs: /usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/lib/libpython3.9.dylib (found suitable version "3.9.10", minimum required is "3") 
CMake Error at /usr/local/opt/pyside@2/lib/cmake/Shiboken2-5.15.2/shiboken_helpers.cmake:468 (message):
  The detected Python minor version is not compatible with the Python minor
  version which was used when Shiboken was built.  Consider building shiboken
  with FORCE_LIMITED_API set to '1', so that only the Python major version
  matters.

  Built with: '3.9' Detected: '3.10'
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by FreddyFreddy »

doia wrote: Tue Mar 22, 2022 8:45 am
Thank you for such a detailed answer. Much appreciated.

Code: Select all

% brew unlink python3 && brew link python@3.9

% which python3 && python3 --version
/usr/local/bin/python3
Python 3.9.10

%  ls -al /usr/local/bin/python3
lrwxr-xr-x  1 bernie  staff  39 22 Mar 22:28 /usr/local/bin/python3 -> ../Cellar/python@3.9/3.9.10/bin/python3
Its confusing that there is 3.9.10 and also 3.10 !
I have no special reason to have 3.10, somehow it just got in there, maybe its the latest and default. Brew python doc: .. defaults to the macOS system Python. I think 3.10.2 is the latest mac default?
I hear you re current limitations, but it would appear to make a lot of sense to support 3.10 (if that is not too difficult).
I considered uninstalling 3.10, to make things simpler:

Code: Select all

% brew uninstall python@3.10
Error: Refusing to uninstall /usr/local/Cellar/python@3.10/3.10.2
because it is required by coin3d, freecad, llvm, llvm@11, mono, pyside2, pyside2@5.15.2, pyside@2 and shiboken2@5.15.2, which are currently installed.
You can override this and force removal with:
  brew uninstall --ignore-dependencies python@3.10
.. so left it alone for now. Would it be a good idea?
and link python3.9 into your path
Perhaps worthy of a documentation note?
Without that last step I still get Built with: '3.9' Detected: '3.10'
I tried a couple of variants of export PATH pointing to python@3.9 stuff, but still the same result
User avatar
doia
Posts: 251
Joined: Sat May 29, 2021 5:47 am
Location: Düsseldorf

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by doia »

No need to uninstall Python 3.10. Just brew unlink python3 which unlinks this version whichever it is and brew link pyhton@3.9 to make python3.9 the default one on your system.
FreddyFreddy
Posts: 176
Joined: Wed Mar 09, 2022 3:15 am
Location: Oz

Re: macOS homebrew Error: freecad/freecad HEAD-d6a9a94 did not build

Post by FreddyFreddy »

doia wrote: Tue Mar 22, 2022 1:36 pm No need to uninstall Python 3.10. Just brew unlink python3 which unlinks this version whichever it is and brew link pyhton@3.9 to make python3.9 the default one on your system.
Unfortunately, still the same. I had done those steps per your prev suggestion.
Post Reply