Code Monkey home page Code Monkey logo

Comments (15)

TristanDebrunner avatar TristanDebrunner commented on June 9, 2024 1

Ah, missed that issue. I'll wait for the fix and try again

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

try installing [email protected] instead of [email protected]

brew install [email protected]

unfortunately i haven't generated a shiboken bottle for that release/arch of macos so you'll have to build it from source for time being.

from homebrew-freecad.

TristanDebrunner avatar TristanDebrunner commented on June 9, 2024

I tried all the versions except freecad/freecad/[email protected], and they have all failed. Here's the 5.15.5 output:

==> Downloading https://ghcr.io/v2/homebrew/core/llvm/manifests/14.0.6_1
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/llvm/blobs/sha256:bb22d243ad001cd69c26ebe670684701ef03d9d3895773d30b907d90c645a744
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:bb22d243ad001cd69c26ebe670684701ef03d9d3895773d30b907d90c645a744?se=2022-07-14T19%3A15%3A00Z&sig=FHhiQXe%2B%2Fe8ex1EyKv2hmeJJ193GBsR5w3YVGGFjdz4%3D&sp=r&spr=https&sr=b&sv=2019-12-12
######################################################################## 100.0%
==> Downloading https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-5.15.5-src/pyside-setup-opensource-src-5.15.5.zip
Already downloaded: /Users/tristan/Library/Caches/Homebrew/downloads/7e478bd63671464e429850a09bc66eeda44c95ddd8ab0b66cfc8224ffd477cc9--pyside-setup-opensource-src-5.15.5.zip
==> Installing [email protected] from freecad/freecad
==> Installing dependencies for freecad/freecad/[email protected]: llvm
==> Installing freecad/freecad/[email protected] dependency: llvm
==> Pouring llvm--14.0.6_1.arm64_monterey.bottle.tar.gz
🍺  /opt/homebrew/Cellar/llvm/14.0.6_1: 5,851 files, 983.5MB
==> Installing freecad/freecad/[email protected]
==> Patching
Error: Failure while executing; `patch -g 0 -f -p1` exited with 1. Here's the output:
patching file sources/shiboken2/libshiboken/pep384impl.cpp
Hunk #1 FAILED at 707.
1 out of 1 hunk FAILED -- saving rejects to file sources/shiboken2/libshiboken/pep384impl.cpp.rej
patching file sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 116.
1 out of 1 hunk FAILED -- saving rejects to file sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp.rej

I tried to look at the files mentioned in the error message, but haven't been able to find them.

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

yes correct. there's an issue with the patch for [email protected] presently. #336

i'm working on getting that resolved at the moment.

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

try with pr #344

from homebrew-freecad.

TristanDebrunner avatar TristanDebrunner commented on June 9, 2024

That PR makes progress, I'm no longer erroring out on the patch step. The error is now in the make step, just like the original issue. I found this in the make log:

/tmp/shiboken2A5.15.5-20220715-48643-uc6jqc/pyside-setup-opensource-src-5.15.5/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp:119:22: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
        if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0)
                     ^
1 error generated.
make[2]: *** [libshiboken/CMakeFiles/libshiboken.dir/sbknumpyarrayconverter.cpp.o] Error 1

I went back and looked at the log from the 5.15.2 install, and it has the same error:

/tmp/shiboken2A5.15.2-20220713-10029-10z34xd/pyside-setup-opensource-src-5.15.2/sources/shiboken2/libshiboken/sbknumpyarrayconverter.cpp:119:22: error: use of undeclared identifier 'NPY_ARRAY_UPDATEIFCOPY'
        if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0)
                     ^
1 error generated.
make[2]: *** [libshiboken/CMakeFiles/libshiboken.dir/sbknumpyarrayconverter.cpp.o] Error 1

Is there a numpy requirement that I may not be fulfilling? Not sure if this gives you useful info about my system:

$ brew list numpy
/opt/homebrew/Cellar/numpy/1.23.1/bin/f2py
/opt/homebrew/Cellar/numpy/1.23.1/bin/f2py3
/opt/homebrew/Cellar/numpy/1.23.1/bin/f2py3.10
/opt/homebrew/Cellar/numpy/1.23.1/bin/f2py3.9
/opt/homebrew/Cellar/numpy/1.23.1/lib/python3.10/ (862 files)
/opt/homebrew/Cellar/numpy/1.23.1/lib/python3.9/ (862 files)

from homebrew-freecad.

plaes avatar plaes commented on June 9, 2024

Apparently this symbol has been dropped from Numpy since 1.23:

The UPDATEIFCOPY array flag has been removed together with the enum NPY_ARRAY_UPDATEIFCOPY. The associated (and deprecated) PyArray_XDECREF_ERR was also removed. These were all deprecated in 1.14. They are replaced by WRITEBACKIFCOPY, that requires calling PyArray_ResoveWritebackIfCopy before the array is deallocated.

https://numpy.org/doc/stable/release/1.23.0-notes.html?highlight=npy_array_updateifcopy#expired-deprecations

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

Apparently this symbol has been dropped from Numpy since 1.23:

The UPDATEIFCOPY array flag has been removed together with the enum NPY_ARRAY_UPDATEIFCOPY. The associated (and deprecated) PyArray_XDECREF_ERR was also removed. These were all deprecated in 1.14. They are replaced by WRITEBACKIFCOPY, that requires calling PyArray_ResoveWritebackIfCopy before the array is deallocated.

https://numpy.org/doc/stable/release/1.23.0-notes.html?highlight=npy_array_updateifcopy#expired-deprecations

yeah thats what the patch file aims to resolve

  • patch shiboken2 source tarball to be compatible with the numpy v1.23 api
  • theres additional patch to allow the same tarball to build against python 3.10

both patches were inlined into the [email protected]

make sure youre attempting to install that version and not an older version of shiboken2


to complicate matters apparently some formatting is lost after ci modifies the shiboken2 formula to add the bottle blocks (that was fun edge case to figure out 😭)

so attempted to move the 2 patches out into separate files with separate commits to allow the shiboken2 formula file (tarball) ref the required patches and hopefully not run into ci issue above. also i used the github provided .patch for these two required patches.

IMHO, i have never run into such an issue patching software using the patch cmd and editing the formula files. not sure if there some edge case with the shiboken2 tarball but hopefully ill figure it out later this week. presently afk 📱

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

okay #345 should fix this, will require manually building of the formula, as the inline patch with CRLF has issues with the current CI unfortunately.

from homebrew-freecad.

TristanDebrunner avatar TristanDebrunner commented on June 9, 2024

With the latest fixes, brew install [email protected] succeeds!

Unfortunately, brew install --only-dependencies freecad still tries to use 5.15.2, which fails. Is there a way to force the use of 5.15.5 instead?

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

Unfortunately, brew install --only-dependencies freecad still tries to use 5.15.2, which fails. Is there a way to force the use of 5.15.5 instead?

yeah, unfortunately until i or somebody else fixes the main freecad.rb formula file you'll have to manually build freecad using cmake or install from a pre built binary package.

from homebrew-freecad.

Vittorio1993 avatar Vittorio1993 commented on June 9, 2024

With the latest fixes, brew install [email protected] succeeds!

Unfortunately, brew install --only-dependencies freecad still tries to use 5.15.2, which fails. Is there a way to force the use of 5.15.5 instead?

Did you manage to build it manually?

from homebrew-freecad.

TristanDebrunner avatar TristanDebrunner commented on June 9, 2024

Sorry, I had some other stuff come up that slowed down this project.

I was able to take the list of packages that brew install --only-dependencies freecad would've installed, and brew install them individually, replacing 5.15.2 with 5.15.5. I got through most of the build, but ran into issues with MakeMacBundleRelocatable.py that I haven't fully resolved. That's not really a homebrew issue though.

UPDATE: Just saw #348. That seems to be the same problem I ran into

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

Sorry, I had some other stuff come up that slowed down this project.

I was able to take the list of packages that brew install --only-dependencies freecad would've installed, and brew install them individually, replacing 5.15.2 with 5.15.5. I got through most of the build, but ran into issues with MakeMacBundleRelocatable.py that I haven't fully resolved. That's not really a homebrew issue though.

UPDATE: Just saw #348. That seems to be the same problem I ran into

good to know that i'm not the only person running into that issue. 👍

from homebrew-freecad.

ipatch avatar ipatch commented on June 9, 2024

brew install --only-dependencies freecad

i believe me merging in the following commit should resolve the above mentioned issues,

addab68

if you run into any more issues feel free to comment on this issue or even open a new & separate issue.

from homebrew-freecad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.