Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected]_py310: remove ref to broken shiboken2 formula #605

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 42 additions & 34 deletions Formula/[email protected]_py310.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class FreecadAT0212Py310 < Formula

Check warning on line 1 in Formula/[email protected]_py310.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-15)

No bottle built for [email protected]_py310!

[email protected]_py310 has unbottled dependencies, so a bottle will not be built.

Check warning on line 1 in Formula/[email protected]_py310.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

`brew linkage --cached --test --strict freecad/freecad/[email protected]_py310` failed on macOS Sonoma (14) on Apple Silicon!

tbb

Check warning on line 1 in Formula/[email protected]_py310.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew linkage --cached --test --strict freecad/freecad/[email protected]_py310` failed on macOS Ventura (13)!

tbb
desc "Parametric 3D modeler"
homepage "https://www.freecadweb.org"
license "GPL-2.0-only"
Expand All @@ -9,6 +9,11 @@
url "https://github.com/FreeCAD/FreeCAD/archive/refs/tags/0.21.2.tar.gz"
sha256 "ceaf77cd12e8ad533d1535cc27ae4ca2a6e80778502dc9cdec906415d674b674"

patch do
url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/844db5e2847b262d95cc0bece1628c0adf913905/patches/freecad%400.21.2_py310-backport-xercesc-tests-updates.patch"
sha256 "fce55c5179756c3a89d1a3e9b6c01e81a82bee21f876c1485044b7fe1b7c822a"
end

patch do
url "https://raw.githubusercontent.com/FreeCAD/homebrew-freecad/95e5aa838ae8b5e7d4fd6ddd710bc53c8caedddc/patches/freecad-0.20.2-cmake-find-hdf5.patch"
sha256 "99d115426cb3e8d7e5ab070e1d726e51eda181ac08768866c6e0fd68cda97f20"
Expand Down Expand Up @@ -90,9 +95,9 @@
depends_on "freecad/freecad/[email protected]"
depends_on "freecad/freecad/pybind11_py310"
depends_on "freecad/freecad/[email protected]_py310"
depends_on "freecad/freecad/[email protected]_py310"
depends_on "freetype"
depends_on "glew"
depends_on "googletest"
depends_on "icu4c"
depends_on macos: :high_sierra # no access to sierra test box
depends_on "mesa-glu" if OS.linux?
Expand All @@ -112,13 +117,17 @@
# sha256 "ce9f4b2afb2c621274e74208a563616eeeee54369f295b6c5f6f4f3112923135"
# end

def install

Check warning on line 120 in Formula/[email protected]_py310.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

`brew install --verbose --formula --build-bottle freecad/freecad/[email protected]_py310` failed on Linux!

| ^ 2 warnings generated. [824/4963] /home/linuxbrew/.linuxbrew/opt/llvm/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PP_VARIADICS=1 -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DBUILD_ADDONMGR -DCMAKE_BUILD_TYPE=\"RelWithDebInfo\" -DFreeCADGui_EXPORTS -DHAVE_CONFIG_H -DHAVE_PYSIDE2 -DHAVE_SHIBOKEN2 -DNDEBUG -DPYCXX_6_2_COMPATIBILITY -DPYSIDE_QML_SUPPORT=1 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_OCC64 -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui/FreeCADGui_autogen/include -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/FreeCAD-0.21.2/src -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/FreeCAD-0.21.2/src/Gui -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/FreeCAD-0.21.2/src/Gui/Quarter -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/FreeCAD-0.21.2/src/Gui/.. -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui/.. -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui/Language -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui/propertyeditor -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui/TaskView -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui/Quarter -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/src/Gui/DAGView -I/home/linuxbrew/.linuxbrew/opt/eigen/include/eigen3 -I/home/linuxbrew/.linuxbrew/opt/coin3d_py310/include -I/home/linuxbrew/.linuxbrew/opt/xerces-c/include -I/home/linuxbrew/.linuxbrew/opt/zlib/include -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtCore -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtGui -I/home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2/QtWidgets -I/tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/build/_deps/fmt-src/include -isystem /home/linuxbrew/.linuxbrew/Cellar/boost/1.86.0_1/include -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.10 -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtCore -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/./mkspecs/linux-g++ -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtWidgets -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtGui -isystem /home/linuxbrew/.linuxbrew/opt/mesa/include -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtOpenGL -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtPrintSupport -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtSvg -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtNetwork -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtUiTools -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/shiboken2 -isystem /home/linuxbrew/.linuxbrew/opt/[email protected]_py310/include/PySide2 -isystem /home/linuxbrew/.linuxbrew/opt/qt@5/include/QtXml -Wall -Wextra -Wpedantic -Wno-write-strings -Wno-undefined-var-template -O2 -g -DNDEBUG -std=gnu++17 -fPIC -I/home/linuxbrew/.linuxbrew/opt/open-mpi/include -fPIC -MD -MT src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o -MF src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o.d -o src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o -c /tmp/freecadA0.21.2_py310-20241029-24025-18hfuz/FreeCAD-0.21.2/src/Gui/SoFCOffscreenRenderer.cpp FAILED: src/Gui/CMakeFiles/FreeCADGui.dir/SoFCOffscreenRenderer.cpp.o /home/linuxbrew/.linuxbrew/opt/llvm/bin/clang++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOS
hbp = HOMEBREW_PREFIX

# NOTE: `which` cmd is not installed by default on some OSes
# NOTE: `which` cmd is not installed by default on every OS
# ENV["PYTHON"] = which("python3.10")
ENV["PYTHON"] = Formula["[email protected]"].opt_bin/"python3.10"

# NOTE: ipatch, taken from the pyside@2 test block
# pyincludes = shell_output("#{python}-config --includes").chomp.split
# pylib = shell_output("#{python}-config --ldflags --embed").chomp.split

# Get the Python includes directory without duplicates
py_inc_output = `python3.10-config --includes`
py_inc_dirs = py_inc_output.scan(/-I([^\s]+)/).flatten.uniq
Expand Down Expand Up @@ -152,40 +161,41 @@

ENV.remove "PATH", Formula["qt"].opt_prefix/"bin"
ENV.remove "PATH", Formula["pyqt"].opt_prefix/"bin"
# TODO: put each path entry on a separate line
puts "PATH=#{ENV["PATH"]}"

cmake_prefix_paths = []
cmake_prefix_paths << Formula["pybind11_py310"].prefix
# cmake_prefix_paths << Formula["open-mpi"].prefix
# cmake_prefix_paths << Formula["llvm"].prefix
cmake_prefix_paths << Formula["boost"].prefix
cmake_prefix_paths << Formula["coin3d_py310"].prefix
cmake_prefix_paths << Formula["double-conversion"].prefix
cmake_prefix_paths << Formula["doxygen"].prefix
cmake_prefix_paths << Formula["xerces-c"].prefix
cmake_prefix_paths << Formula["zlib"].prefix
cmake_prefix_paths << Formula["[email protected]"].prefix
cmake_prefix_paths << Formula["vtk"].prefix
cmake_prefix_paths << Formula["utf8cpp"].prefix
cmake_prefix_paths << Formula["glew"].prefix
cmake_prefix_paths << Formula["hdf5"].prefix
cmake_prefix_paths << Formula["libpng"].prefix
cmake_prefix_paths << Formula["pugixml"].prefix
cmake_prefix_paths << Formula["eigen"].prefix
cmake_prefix_paths << Formula["expat"].prefix
cmake_prefix_paths << Formula["double-conversion"].prefix
cmake_prefix_paths << Formula["lz4"].prefix
cmake_prefix_paths << Formula["xz"].prefix
cmake_prefix_paths << Formula["freetype"].prefix
cmake_prefix_paths << Formula["glew"].prefix
cmake_prefix_paths << Formula["googletest"].prefix
cmake_prefix_paths << Formula["hdf5"].prefix
cmake_prefix_paths << Formula["icu4c"].prefix
cmake_prefix_paths << Formula["libjpeg-turbo"].prefix
cmake_prefix_paths << Formula["libpng"].prefix
cmake_prefix_paths << Formula["libtiff"].prefix
cmake_prefix_paths << Formula["lz4"].prefix
cmake_prefix_paths << Formula["medfile"].prefix
cmake_prefix_paths << Formula["[email protected]"].prefix
cmake_prefix_paths << Formula["pkg-config"].prefix
cmake_prefix_paths << Formula["boost"].prefix
cmake_prefix_paths << Formula["[email protected]"].prefix
cmake_prefix_paths << Formula["freetype"].prefix
cmake_prefix_paths << Formula["coin3d_py310"].prefix
cmake_prefix_paths << Formula["qt@5"].prefix
# cmake_prefix_paths << Formula["open-mpi"].prefix
cmake_prefix_paths << Formula["[email protected]_py310"].prefix
cmake_prefix_paths << Formula["pugixml"].prefix
cmake_prefix_paths << Formula["pybind11_py310"].prefix
cmake_prefix_paths << Formula["[email protected]_py310"].prefix
# cmake_prefix_paths << Formula["llvm"].prefix
cmake_prefix_paths << Formula["qt@5"].prefix
cmake_prefix_paths << Formula["[email protected]"].prefix
cmake_prefix_paths << Formula["tbb"].prefix
cmake_prefix_paths << Formula["icu4c"].prefix
cmake_prefix_paths << Formula["utf8cpp"].prefix
cmake_prefix_paths << Formula["vtk"].prefix
cmake_prefix_paths << Formula["xerces-c"].prefix
cmake_prefix_paths << Formula["xz"].prefix
cmake_prefix_paths << Formula["zlib"].prefix

if OS.linux?
cmake_prefix_paths << Formula["mesa-glu"].prefix
Expand Down Expand Up @@ -353,16 +363,14 @@
is built for CLI by default now.

2. if freecad launches with runtime errors a common fix
i use is to force link [email protected] and
[email protected] so workbenches such Draft and Arch
have the necessary runtime deps, see brew documenation
about force linking the above packages

4. upstream homebrew/core has begun to introduce python 3.11
with that said, testing the formula manually on my local
catalina box i ran into issues with regard to boost.
the quick fix, unlink python 3.11 and cmake is able to
finish its checks and the build process can begin
i use is to force link [email protected] so workbenches
such Draft and Arch have the necessary runtime deps,
see brew documenation about force linking the above packages

3. use the absolute path to launch freecad ie.
#{HOMEBREW_PREFIX}/bin/freecad
using the above to launch freecad may resolve runtime
issues related to proxy PySide python module
EOS
end

Expand Down
Loading