conda-forge / jcc-feedstock

A conda-smithy repository for jcc.
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Fails with dll not found on win when python is higher than 3.9.7 #57

Closed petrushy closed 2 years ago

petrushy commented 2 years ago

Issue: Currently the build fails for windows platform and python higher than 3.9.7 versions, and these has been skipped in the release version.

The reason for the fail is largely unknown, it may be related to setuptools, but also some issue in JCC. it is however strange that it works on windows for 3.9.7 and lower.

is related to this? https://github.com/pypa/setuptools/issues/2941

The error message is:


 File "D:\bld\orekit_1644156744152\_h_env\lib\site-packages\jcc\__init__.py", line 31, in <module>
    import jcc._jcc3 as _jcc3
ImportError: DLL load failed while importing _jcc3: The specified module could not be found.
petrushy commented 2 years ago

I have reproduced this outside the conda-forge build environment, running locally.

This is also for wrapped libraries such as orekit. Notable that the import works if one downgrades python (no other packages) to 3.9.7 or lower. So there seems to be something in this shift from 3.9.7 to 3.9.9+. But it does work on linux on mac for higher versions.

xhochy commented 2 years ago

If this is happening for 3.9.9+ and 3.10+, then please open a respective issue on the python-feedstock, too. We recently backported the patches from 3.10 to 3.9.9.

Can you add set CONDA_DLL_SEARCH_MODIFICATION_DEBUG=1 to the build so that we get some better debug out?

petrushy commented 2 years ago

Many thanks. Added "set CONDA_DLL_SEARCH_MODIFICATION_DEBUG=1" to the bld.bat script of https://github.com/conda-forge/jcc-feedstock/pull/58

Added relaated issue on python-feedstock https://github.com/conda-forge/python-feedstock/issues/552

petrushy commented 2 years ago

solved with https://github.com/conda-forge/jcc-feedstock/pull/58