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

macOS-only failures in CI with RDKit visualization #1215

Closed
mattwthompson opened this issue Mar 11, 2022 · 5 comments
Closed

macOS-only failures in CI with RDKit visualization #1215

mattwthompson opened this issue Mar 11, 2022 · 5 comments
Assignees

Comments

@mattwthompson
Copy link
Member

Log: https://github.com/openforcefield/openff-toolkit/runs/5504391595?check_suite_focus=true

Traceback:

________________ TestMoleculeVisualization.test_visualize_rdkit ________________
openff/toolkit/tests/test_molecule.py:3797: in test_visualize_rdkit
    assert isinstance(mol.visualize(backend="rdkit"), IPython.core.display.SVG)
openff/toolkit/topology/molecule.py:6479: in visualize
    from rdkit.Chem.Draw import (  # type: ignore[import]
../../../miniconda3/envs/test/lib/python3.9/site-packages/rdkit/Chem/Draw/__init__.py:14: in <module>
    from rdkit.Chem.Draw import rdMolDraw2D
E   ImportError: dlopen(/Users/runner/miniconda3/envs/test/lib/python3.9/site-packages/rdkit/Chem/Draw/rdMolDraw2D.so, 2): Library not loaded: @rpath/libfontconfig.1.dylib
E     Referenced from: /Users/runner/miniconda3/envs/test/lib/libcairo.2.dylib
E     Reason: Incompatible library version: libcairo.2.dylib requires version 14.0.0 or later, but libfontconfig.1.dylib provides version 13.0.0

I can't reproduce this locally (macOS, Python 3.9) with the same versions of cairo, pycairo, and rdkit, the latter of which was recently bumped to 2021.09.5. I checked the RDKit and its feedstock's issue tracker and nobody else has reported it yet.

@mattwthompson
Copy link
Member Author

A similar issue was reported and fixed by the maintainer of rdkit-pypi: kuelumbus/rdkit-pypi#33

@mattwthompson mattwthompson self-assigned this Mar 23, 2022
@mattwthompson
Copy link
Member Author

I somehow did not have the thought of looking as far as the fontconfig feedstock, where I found a familiar face already tracked this down and reported it! conda-forge/fontconfig-feedstock#54

@mattwthompson
Copy link
Member Author

Looks like everything's been fixed upstream. No changes to our code needed. I kicked the tires on it in #1225 and the import no longer causes a crash. If this causes deployment issues in the future we can deal with them in packaging.

@mattwthompson
Copy link
Member Author

I'm seeing this pop up again. It seems like the problem is when an old build of cairo is pulled down, like cairo-1.16.0-he69dfd1_1008. It looks like the version (1.16) has stayed the same for some time but is periodically rebuit, i.e. the new builds are cairo-1.16.0-something_1010. I can't figure out a way to do i.e. >=1010; as far as I can tell the build string is processed like a string, not a number/version, and may have other weird things going on.

If this continues to be an issue, perhaps other upstream changes are needed to ensure RDKit isn't installed alongside one of these builds.

mattwthompson added a commit that referenced this issue Mar 25, 2022
* Pin to cairo=*=1010 builds

* Fix pinning

* Add cached-property

* Faster test

* Pin to recent version of QCPortal

* Remove debug code
@mattwthompson
Copy link
Member Author

Seems to actually be fixed after conda-forge/conda-forge-repodata-patches-feedstock#248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant