conda-forge / cctbx-base-feedstock

A conda-smithy repository for cctbx-base.
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

flex ABI broken in conda-forge package #22

Closed Anthchirp closed 2 years ago

Anthchirp commented 3 years ago

In a correctly working environment I expect the following output:

$ python
>>> from scitbx.array_family import flex                                                                                    
>>> assert (flex.complex_double() == None) is False
>>> flex.complex_double([None])
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    flex.complex_double([None])
TypeError: No registered converter was able to produce a C++ rvalue of type std::complex<double> from this Python object of type NoneType

However, with cctbx-base 2021.4 and python 3.8 in a freshly created conda environment on MacOS I get:

$ conda create -p $(pwd)/cctbx-conda-3.8 -c conda-forge --override cctbx-base python=3.8
$ conda activate $(pwd)/cctbx-conda-3.8
$ python
Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 06:39:48) 
[Clang 11.1.0 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scitbx.array_family import flex            
>>> assert (flex.complex_double() == None) is False
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AssertionError
>>> flex.complex_double() == None
<scitbx_array_family_flex_ext.bool object at 0x1140681b0>
>>> flex.complex_double([None])
<scitbx_array_family_flex_ext.complex_double object at 0x10d940040>

I added these checks to cctbx in https://github.com/cctbx/cctbx_project/pull/616. The pull request builds are currently running, but I suspect that they will pass, which is why I'm reporting this here.

Originally found in dials/dials#1001


Environment (conda list):

``` $ conda list # packages in environment at /Users/wra62962/cctbx-conda-3.8: # # Name Version Build Channel biopython 1.78 py38h96a0964_2 conda-forge boost 1.74.0 py38h692b87f_3 conda-forge boost-cpp 1.74.0 hff03dee_4 conda-forge brotlipy 0.7.0 py38h5406a74_1001 conda-forge bzip2 1.0.8 hc929b4f_4 conda-forge ca-certificates 2020.12.5 h033912b_0 conda-forge cctbx-base 2021.4 py38hfaf3399_0 conda-forge certifi 2020.12.5 py38h50d1736_1 conda-forge cffi 1.14.5 py38ha97d567_0 conda-forge chardet 4.0.0 py38h50d1736_1 conda-forge conda 4.10.1 py38h50d1736_0 conda-forge conda-package-handling 1.7.3 py38h96a0964_0 conda-forge cryptography 3.4.7 py38h1fa4640_0 conda-forge cycler 0.10.0 py_2 conda-forge freetype 2.10.4 h4cff582_1 conda-forge future 0.18.2 py38h50d1736_3 conda-forge icu 68.1 h74dc148_0 conda-forge idna 2.10 pyh9f0ad1d_0 conda-forge jbig 2.1 h0d85af4_2003 conda-forge jpeg 9d hbcb3906_0 conda-forge kiwisolver 1.3.1 py38hd9c93a9_1 conda-forge lcms2 2.12 h577c468_0 conda-forge lerc 2.2.1 h046ec9c_0 conda-forge libblas 3.9.0 9_openblas conda-forge libcblas 3.9.0 9_openblas conda-forge libcxx 11.1.0 habf9029_0 conda-forge libdeflate 1.7 h35c211d_5 conda-forge libffi 3.3 h046ec9c_2 conda-forge libgfortran 5.0.0 9_3_0_h6c81a4c_22 conda-forge libgfortran5 9.3.0 h6c81a4c_22 conda-forge liblapack 3.9.0 9_openblas conda-forge libopenblas 0.3.15 openmp_h5e1b9a4_1 conda-forge libpng 1.6.37 hb0a8c7a_2 conda-forge libsvm 325 he49afe7_0 conda-forge libtiff 4.3.0 h1167814_1 conda-forge libwebp-base 1.2.0 h0d85af4_2 conda-forge llvm-openmp 11.1.0 hda6cdc1_1 conda-forge lz4-c 1.9.3 h046ec9c_0 conda-forge matplotlib-base 3.4.2 py38h6152e83_0 conda-forge mrcfile 1.3.0 pyh44b312d_0 conda-forge ncurses 6.2 h2e338ed_4 conda-forge numpy 1.20.3 py38had91d27_1 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openjpeg 2.4.0 h6e7aa92_1 conda-forge openssl 1.1.1k h0d85af4_0 conda-forge pillow 8.2.0 py38h83525de_1 conda-forge pip 21.1.2 pyhd8ed1ab_0 conda-forge psutil 5.8.0 py38h5406a74_1 conda-forge pycosat 0.6.3 py38h5406a74_1006 conda-forge pycparser 2.20 pyh9f0ad1d_2 conda-forge pyopenssl 20.0.1 pyhd8ed1ab_0 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pysocks 1.7.1 py38h50d1736_3 conda-forge python 3.8.10 h3a889e0_1_cpython conda-forge python-dateutil 2.8.1 py_0 conda-forge python.app 1.3 py38h5406a74_4 conda-forge python_abi 3.8 1_cp38 conda-forge readline 8.1 h05e3726_0 conda-forge reportlab 3.5.67 py38hf6ac518_0 conda-forge requests 2.25.1 pyhd3deb0d_0 conda-forge ruamel_yaml 0.15.80 py38hca655e8_1004 conda-forge setuptools 49.6.0 py38h50d1736_3 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.35.5 h44b9ce1_0 conda-forge tk 8.6.10 hb0a8c7a_1 conda-forge tornado 6.1 py38h5406a74_1 conda-forge tqdm 4.61.0 pyhd8ed1ab_0 conda-forge urllib3 1.26.5 pyhd8ed1ab_0 conda-forge wheel 0.36.2 pyhd3deb0d_0 conda-forge xz 5.2.5 haf1e3a3_1 conda-forge yaml 0.2.5 haf1e3a3_0 conda-forge zlib 1.2.11 h7795811_1010 conda-forge zstd 1.5.0 h582d3a0_0 conda-forge ```


Details about conda and system ( conda info ):

``` $ conda info active environment : base active env location : /Users/wra62962/cctbx-conda-3.8 shell level : 1 user config file : /Users/wra62962/.condarc populated config files : conda version : 4.10.1 conda-build version : not installed python version : 3.8.10.final.0 virtual packages : __osx=10.14.6=0 __unix=0=0 __archspec=1=x86_64 base environment : /Users/wra62962/cctbx-conda-3.8 (writable) conda av data dir : /Users/wra62962/cctbx-conda-3.8/etc/conda conda av metadata url : https://repo.anaconda.com/pkgs/main channel URLs : https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/wra62962/cctbx-conda-3.8/pkgs /Users/wra62962/.conda/pkgs envs directories : /Users/wra62962/cctbx-conda-3.8/envs /Users/wra62962/.conda/envs platform : osx-64 user-agent : conda/4.10.1 requests/2.25.1 CPython/3.8.10 Darwin/18.7.0 OSX/10.14.6 UID:GID : 503:20 netrc file : None offline mode : False ```
bkpoon commented 3 years ago

That is odd. It works on osx-arm64 for Python 3.8.10, and it works on osx-64 with Python 3.8.8. It looks like it's just for Python 3.8.10 on osx-64.

bkpoon commented 3 years ago

Also, the first build for Python 3.8.10 seems to be fine (conda install python=3.8.10=h0e5c897_0_cpython).

ndevenish commented 3 years ago

Yes, that's what we observed in dials/dials#1001 also.

bkpoon commented 3 years ago

So the build 1 for Python 3.8.10 is now marked as broken. The tests will now pass, but the problem may pop up again later. I'm playing with the Python builds to see if the problem is there.

bkpoon commented 2 years ago

Python 3.8 does not support newest macOS SDK

https://github.com/conda-forge/python-feedstock/issues/479 https://github.com/python/cpython/pull/26474 https://github.com/conda-forge/boost-feedstock/issues/117