You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the h3a889e0_1_cpython build of Python 3.8.10 for osx-64, the package I maintain has a problem with one of our conversions between Python and C++ using Boost.Python. To reproduce the issue on an Intel Mac,
conda create -n test cctbx-base python=3.8.10=h3a889e0_1_cpython
Run these commands in an interactive shell
conda activate test
python
>>> from scitbx.array_family import flex
>>> a = flex.complex_double([None])
>>> a[0]
(4e-323+0j)
>>>
What should happen is a TypeError because None should not be converted into a number for constructing a complex number. Sometimes, the value is (5e-323+0j). Generally, the argument is a list of numbers (e.g. [1, 2, 3j, 4+5j]). I have tested this on macOS 10.14.6, 10.15.7, and 11.4. They all show the same behavior.
To get the expected behavior, you can change the Python to the earlier build by running,
conda activate test
conda install python=3.8.10=h0e5c897_0_cpython
Run the same commands in an interactive shell. The output should look like
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: No registered converter was able to produce a C++ rvalue of type std::__1::complex<double> from this Python object of type NoneType
So I thought the problem might be that the Boost.Python package is not compiled the same way as the latest Python 3.8.10 with macOS SDK 11.0 and linking to CoreFoundation. But I have rebuilt boost and cctbx-base with the latest SDK, with and without linking to CoreFoundation, but the problematic behavior persists for Python 3.8.10 (h3a889e0_1_cpython).
The normal behavior occurs in the osx-arm64 builds, which was another reason why I though boost was the issue, but Python 3.9.4 is fine even though it is built with macOS SDK 11 and links to CoreFoundation while boost is built with macOS SDK 10.9 (from looking at the build logs, but I could be misinterpreting the output).
Lastly, this different behavior is only for Python 3.8.10 (h3a889e0_1_cpython) on osx-64. The other platforms and other versions of Python behave properly. I am running nightly tests here (status badges at the bottom of the README).
Sorry for the late update. This ended up being a Python 3.8 issue as found by @isuruf. Building Python 3.8 with the newest macOS SDK is not supported when targeting an older version of macOS.
Issue:
For the
h3a889e0_1_cpython
build of Python 3.8.10 forosx-64
, the package I maintain has a problem with one of our conversions between Python and C++ using Boost.Python. To reproduce the issue on an Intel Mac,conda create -n test cctbx-base python=3.8.10=h3a889e0_1_cpython
What should happen is a
TypeError
becauseNone
should not be converted into a number for constructing a complex number. Sometimes, the value is(5e-323+0j)
. Generally, the argument is a list of numbers (e.g.[1, 2, 3j, 4+5j]
). I have tested this on macOS 10.14.6, 10.15.7, and 11.4. They all show the same behavior.To get the expected behavior, you can change the Python to the earlier build by running,
conda activate test
conda install python=3.8.10=h0e5c897_0_cpython
So I thought the problem might be that the Boost.Python package is not compiled the same way as the latest Python 3.8.10 with macOS SDK 11.0 and linking to CoreFoundation. But I have rebuilt
boost
andcctbx-base
with the latest SDK, with and without linking to CoreFoundation, but the problematic behavior persists for Python 3.8.10 (h3a889e0_1_cpython
).The normal behavior occurs in the
osx-arm64
builds, which was another reason why I thoughboost
was the issue, but Python 3.9.4 is fine even though it is built with macOS SDK 11 and links to CoreFoundation whileboost
is built with macOS SDK 10.9 (from looking at the build logs, but I could be misinterpreting the output).Lastly, this different behavior is only for Python 3.8.10 (
h3a889e0_1_cpython
) onosx-64
. The other platforms and other versions of Python behave properly. I am running nightly tests here (status badges at the bottom of the README).The issue is also discussed here
conda-forge/cctbx-base-feedstock#22
Any suggestions for debugging are welcome. Thanks!
Environment (
conda list
):Details about
conda
and system (conda info
):The text was updated successfully, but these errors were encountered: