Opened 3 years ago
Closed 3 years ago
#64579 closed defect (fixed)
py310-pyobjc @7.3_2 fails to build on MacOS 10.15
Reported by: | Gandoon (Erik Hedlund) | Owned by: | danchr (Dan Villiom Podlaski Christiansen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | Cc: | ||
Port: | py-pyobjc |
Description
While attempting to upgrade py-spyder from py39-spyder to py310-spyder, the dependency py310-pyobjc fails to build on MacOS 10.15. The failure seems to happen while building pyobjc-framework-Cocoa. This makes me suspect that the failure has to do with incompatibilities between newer SDKs and the ones available on the now legacy MacOS 10.15. As py39-pyobjc builds just fine, and the build is reported as working on 10.15, I am at an impasse here. I have spent some time trying to find a workaround (a fortnight by now), but at this moment, I have yet to find one. Log attached.
Attachments (1)
Change History (9)
Changed 3 years ago by Gandoon (Erik Hedlund)
Attachment: | py310-pyobjc-main.log added |
---|
comment:1 Changed 3 years ago by reneeotten (Renee Otten)
Owner: | set to danchr |
---|---|
Port: | py-pyobjc added; py310-pyobjc removed |
Status: | new → assigned |
upstream has released version 8.2, so perhaps updating will help.
comment:2 Changed 3 years ago by Gandoon (Erik Hedlund)
Just a small update, I didn't mention it in the original submission, the failure seems to occur in the destroot phase.
The tail end of the log file reflects this:
6885 :info:destroot Building pyobjc-core... 6886 :info:destroot Installing 'pyobjc-core' using '/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10' 6887 :info:destroot Building pyobjc-framework-Cocoa... 6888 :info:destroot Installing 'pyobjc-framework-Cocoa' using '/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10' 6889 :info:destroot Traceback (most recent call last): 6890 :info:destroot File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py310-pyobjc/work/ronaldoussoren-pyobjc-4bc28cd/setup.py", line 233, in <module> 6891 :info:destroot main() 6892 :info:destroot File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py310-pyobjc/work/ronaldoussoren-pyobjc-4bc28cd/setup.py", line 229, in main 6893 :info:destroot build_project(project, sys.argv[1:]) 6894 :info:destroot File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py310-pyobjc/work/ronaldoussoren-pyobjc-4bc28cd/setup.py", line 213, in build_project 6895 :info:destroot subprocess.check_call( 6896 :info:destroot File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call 6897 :info:destroot raise CalledProcessError(retcode, cmd) 6898 :info:destroot subprocess.CalledProcessError: Command '['/opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10', 'setup.py', '--no-user-cfg', 'install', '--prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.10', '--root=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py310-pyobjc/work/destroot']' returned non-zero exit status 1. 6899 :info:destroot Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py310-pyobjc/work/pyobjc-7.3" && /opt/local/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 setup.py --no-user-cfg install --prefix=/opt/local/Library/Frameworks/Python.framework/Versions/3.10 --root=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-pyobjc/py310-pyobjc/work/destroot 6900 :info:destroot Exit code: 1 6901 :error:destroot Failed to destroot py310-pyobjc: command execution failed 6902 :debug:destroot Error code: CHILDSTATUS 93808 1 6903 :debug:destroot Backtrace: command execution failed 6904 :debug:destroot while executing 6905 :debug:destroot "system {*}$notty {*}$callback {*}$nice $fullcmdstring" 6906 :debug:destroot invoked from within 6907 :debug:destroot "command_exec -callback portprogress::target_progress_callback destroot" 6908 :debug:destroot (procedure "portdestroot::destroot_main" line 2) 6909 :debug:destroot invoked from within 6910 :debug:destroot "$procedure $targetname"
Apart from several warnings, the rest of the actual build phase seems to have been correctly executed prior to the stopped on Error. The Building pyobjc-core...
initially seemed to indicate to me that a build stage failed, but if I read the log correctly, this is indeed in the destroot phase, thus I don't think it is directly related to older closed tickets such as #63084 or #63087, as they both failed in the build phase. Please advice if I am wrong in that assumption.
As far as I understand it, the destroot phase should perform an install procedure in the build directory, after the completion of which the whole package is moved into its final positions.
Could this have something to do with which user is performing the operation? I performed the build as root (sudo), and several of the steps are indeed performed as or chowned to the user macports.
comment:3 Changed 3 years ago by Gandoon (Erik Hedlund)
Further update
A more likely culprit might be the race conditions that have been mentioned in the Qt issue tracking system e.g. here: https://bugreports.qt.io/browse/PYSIDE-1760 and here: https://codereview.qt-project.org/c/pyside/pyside-setup/+/388252. Race conditions in pyobjc have been reported, fixed, and merged in September 2021 (v8.0 or 8.2), so maybe reneeotten is correct in suggesting updating the port.
comment:4 Changed 3 years ago by Gandoon (Erik Hedlund)
Workaround found
I found a workaround now.
The issue seems to be at least related to setuptools
. By reverting to distutils
the destroot phase and install worked.
I also used the previously mentioned patch to solve the race conditions. The patch alone did not solve the issue. In the end I tested to revert the errors one by one, confirming that they passed the destroot and eventually reverted every framework component to distutils
, and the port finally built and installed.
Remains to see if it works as expected…
comment:5 Changed 3 years ago by mfacorcoran
py310-pyobjc also fails to build for me on macos 11.6.4, also apparently at the destroot stage. From the log the errors seem to be
:info:destroot import distutils.command.install_scripts as orig :info:destroot ImportError: cannot import name 'install_scripts' from 'setuptools._distutils.command' (/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/_distutils/command/__init__.py)
comment:6 Changed 3 years ago by reneeotten (Renee Otten)
the port should be updated to its latest version, which will possible/likely eliminate the issues ; see #64766. Not sure whether or not the maintainer is working on this, but if not I might take a stab at it in the next days myself.
comment:7 Changed 3 years ago by Gandoon (Erik Hedlund)
I just built the upgraded py310-pyobjc @8.4.1_0 and it built just fine on the same system used when the ticket was submitted. So, this ticket may be ok to close now.
comment:8 Changed 3 years ago by danchr (Dan Villiom Podlaski Christiansen)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Failed build of py310-pyobjc