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]_py312: update formula #590

Closed

Conversation

ipatch
Copy link
Collaborator

@ipatch ipatch commented Oct 23, 2024

brew style freecad/freecad/[NAME_OF_FORMULA_FILE] 

output from running above command should output something similiar to the below

1 file inspected, no offenses detected
  • Have you ensured your commit passed audit checks, ie.
brew audit freecad/freecad/[NAME_OF_FORMULA_FILE] --online --new-formula

Not all PRs require passing these checks ie. adding [no ci] in the commit message will prevent the CI from running but PRs that change formula files generally should run through the CI checks that way new bottles are built and uploaded to the repository thus not having to build all formula from source but rather installing from a bottle (significantly faster 🐰 ... 🐢)

For more information about this template file learn more

@ipatch
Copy link
Collaborator Author

ipatch commented Oct 23, 2024

building locally will yield the below error on macos Sequoia,

[  3%] Building CXX object sources/shiboken2/tests/libsample/CMakeFiles/libsample.dir/overloadsort.cpp.o
cd /Users/chris/tmp/homebrew/pyside2A5.15.15_py312-20241022-47162-4wqyfn/pyside-setup-opensource-src-5.15.15/build/sources/shiboken2/tests/libsample && /Users/chris/homebrew/Library/Homebrew/shims/mac/super/clang++ -DLIBSAMPLE_BUILD -Dlibsample_EXPORTS -I/Users/chris/tmp/homebrew/pyside2A5.15.15_py312-20241022-47162-4wqyfn/pyside-setup-opensource-src-5.15.15/sources/shiboken2/tests/libsample -Wall -fvisibility=hidden -Wno-strict-aliasing -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_TO_ASCII -O3 -DNDEBUG -std=gnu++11 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -fPIC   -fPIC -MD -MT sources/shiboken2/tests/libsample/CMakeFiles/libsample.dir/overloadsort.cpp.o -MF CMakeFiles/libsample.dir/overloadsort.cpp.o.d -o CMakeFiles/libsample.dir/overloadsort.cpp.o -c /Users/chris/tmp/homebrew/pyside2A5.15.15_py312-20241022-47162-4wqyfn/pyside-setup-opensource-src-5.15.15/sources/shiboken2/tests/libsample/overloadsort.cpp
/Users/chris/tmp/homebrew/pyside2A5.15.15_py312-20241022-47162-4wqyfn/pyside-setup-opensource-src-5.15.15/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp:46:10: fatal error: 'numpy/arrayobject.h' file not found
   46 | #include <numpy/arrayobject.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

i also believe upstream does not provide a bottle for llvm@15 unfortunately so will have to apply patches to make work with llvm > 15

==> Running FormulaeDetect#detect_formulae!
==> git -C /opt/homebrew/Library/Taps/freecad/homebrew-freecad fetch origin +refs/heads/master
    url               https://github.com/FreeCAD/homebrew-freecad/pull/590/checks
    tap origin/master 7c0cfbb (pybind11_py312: update 2.13.6_1 bottle.)
    HEAD              8f4ec73 (Merge 7a5ef916b9530a77fa0c78189de2ee11b12ac580 into 7c0cfbb44a8efeac11bc64cd22465f9eee9d8814)
    diff_start_sha1   7c0cfbb44a8efeac11bc64cd22465f9eee9d8814
    diff_end_sha1     8f4ec736b9016d009e4af1cc92b65e7b59c1dcd4
    testing_formulae  freecad/freecad/[email protected]_py312
    added_formulae    (none)
    modified_formulae freecad/freecad/[email protected]_py312
    deleted_formulae  (none)
    formulae_to_fetch (none)
==> Running Formulae#run!
==> Running Formulae#formula!(freecad/freecad/[email protected]_py312)
==> brew deps --tree --annotate --include-build --include-test freecad/freecad/[email protected]_py312
Warning: [email protected]_py312 has unbottled dependencies, so a bottle will not be built.
Warning: No bottle built.
==> SKIPPED freecad/freecad/[email protected]_py312

@ipatch
Copy link
Collaborator Author

ipatch commented Oct 23, 2024

got the same exact error attempting to build pyside@2 aka upstream homebrew-core formula,

[  2%] Building CXX object sources/shiboken2/tests/libsample/CMakeFiles/libsample.dir/implicitconv.cpp.o
cd /Users/chris/tmp/homebrew/pysideA2-20241022-59658-wz98tt/pyside-setup-opensource-src-5.15.15/build/sources/shiboken2/tests/libsample && /Users/chris/homebrew/Library/Homebrew/shims/mac/super/clang++ -DLIBSAMPLE_BUILD -Dlibsample_EXPORTS -I/Users/chris/tmp/homebrew/pysideA2-20241022-59658-wz98tt/pyside-setup-opensource-src-5.15.15/sources/shiboken2/tests/libsample -Wall -fvisibility=hidden -Wno-strict-aliasing -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_TO_ASCII -O3 -DNDEBUG -std=gnu++11 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk -fPIC   -fPIC -MD -MT sources/shiboken2/tests/libsample/CMakeFiles/libsample.dir/implicitconv.cpp.o -MF CMakeFiles/libsample.dir/implicitconv.cpp.o.d -o CMakeFiles/libsample.dir/implicitconv.cpp.o -c /Users/chris/tmp/homebrew/pysideA2-20241022-59658-wz98tt/pyside-setup-opensource-src-5.15.15/sources/shiboken2/tests/libsample/implicitconv.cpp
/Users/chris/tmp/homebrew/pysideA2-20241022-59658-wz98tt/pyside-setup-opensource-src-5.15.15/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp:46:10: fatal error: 'numpy/arrayobject.h' file not found
   46 | #include <numpy/arrayobject.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

@ipatch
Copy link
Collaborator Author

ipatch commented Oct 23, 2024

it looks numpy2.x changed the dir structure for the header files as seen in the upstream patch for pyside v6

https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?h=6.7.3&id=02ad0b37208bb19262326adb9a62ade3f9d6d7ec

manually patching / editing the CMakeLists.txt file that references numpy in the shiboken2 to change core to _core allows the build process to find the appropriate header file.


it also appears there are two archives for the pyside source files ie. a .zip file and a .xz file. for future me 👴 reference / use the .xz archive as the .zip archive uses mixed line endings which become problematic when attempting to patch on a unix based file system using an editor such as vim won't require adding special characters. 🥵


╰─λ export PYTHONPATH=$HOME/homebrew/opt/[email protected]_py312/lib/python3.12/site-packages/                               0 (31.711s)
╭─chris ssh mac-mini-fpa in /Users/chris/homebrew/Library/Taps/homebrew/homebrew-core (master ✔)
╰─λ bp312                                                                                                               0 (0.001s)
Python 3.12.7 (main, Oct  1 2024, 02:05:46) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.get_include()
'/Users/chris/homebrew/opt/[email protected]_py312/lib/python3.12/site-packages/numpy/_core/include'
>>>

@ipatch ipatch self-assigned this Oct 23, 2024
@ipatch ipatch added the pr-pull label Oct 23, 2024
github-actions bot pushed a commit that referenced this pull request Oct 23, 2024
@ipatch
Copy link
Collaborator Author

ipatch commented Oct 23, 2024

PR pull merged these changes, so no need to rebase and merge here.

@ipatch ipatch closed this Oct 23, 2024
@ipatch ipatch deleted the [email protected]_py312-updates branch October 23, 2024 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant