conda-forge / conda-forge.github.io

The conda-forge website.
https://conda-forge.org
BSD 3-Clause "New" or "Revised" License
131 stars 274 forks source link

Library and compiler conflicts for packages using Fortran on Windows #2040

Closed gbarter closed 10 months ago

gbarter commented 10 months ago

Conda-forge documentation

Installed packages

C:\Windows\system32\cmd.exe /D /S /C "C:\Miniconda3\condabin\mamba.bat env update --name test --file D:\a\WEIS\WEIS\setup-miniconda-patched-environment.yml"

  Looking for: ['alabaster', 'babel', 'cmake', 'control', 'coveralls', 'cython', 'dill', 'docutils', 'et-xmlfile', 'fatpack', 'future', 'git', 'gdown', 'imagesize', 'jinja2', 'jsonmerge', 'jsonschema', 'make', 'markupsafe', 'matplotlib-base', 'meson', 'moorpy', 'ninja', 'nlopt', "numpy[version='>=1.26']", 'numpydoc', 'openfast', "openmdao[version='<3.28']", 'openraft', 'openpyxl', 'pandas', 'patsy', 'pcrunch', 'pip', 'pygments', 'pyhams', 'pyoptsparse', 'pytest', 'pytest-cov', 'python-benedict', 'pyyaml', 'pyzmq', 'qdldl-python', 'ruamel.yaml', 'scipy', 'seaborn', 'setuptools', 'simpy', 'slycot', 'sortedcontainers', 'sphinx', 'sphinxcontrib-applehelp', 'sphinxcontrib-devhelp', 'sphinxcontrib-htmlhelp', 'sphinxcontrib-jsmath', 'sphinxcontrib-qthelp', 'sphinxcontrib-serializinghtml', 'statsmodels', 'swig', 'treon', 'pyzmq', 'wisdem', 'python=3.10']

Environment info

The above was taken off of a Github "windows-latest" runner as I don't have an easy way to test on Windows otherwise.

Issue

Upon trying to solve the above environment, I received the error:

Could not solve for environment specs
  The following packages are incompatible
  ├─ openfast   is installable and it requires
  │  └─ libgomp  , which requires
  │     └─ msys2-conda-epoch <0.0a0 , which can be installed;
  └─ openraft   is uninstallable because it requires
     └─ pyhams  , which requires
        └─ m2w64-gcc-libs-core  , which requires
           └─ msys2-conda-epoch [20160418 |>=20160418 ], which conflicts with any installable versions previously reported.

The packages openfast and pyhams are my creation. Both use Fortran and I appreciate being able to deliver them via conda-forge. However, openfast uses more modern Fortran standards and cannot build with gfortran v5.3 available in the standard m2w64-toolchain package, so it is built with the local MinGW distribution on the conda-forge Windows runners (with static libraries). This seems to conflict with pyhams (and a handful of my other packages) that are built with the m2w64-toolchain packages.

I was hoping that the two packages built with the two different fortran compilers could still live side-by-side in the same environment, but that doesn't seem to be the case. Am I missing anything? Do I have to update the feedstocks on all of my Fortran packages to be built on Windows with the local MinGW installation and not the conda-forge m2w64-gfortran?

hmaarrfk commented 10 months ago

it seems like you have something off in your recipe for : https://github.com/conda-forge/openfast-feedstock/pull/39

lets discuss there.

hmaarrfk commented 10 months ago

can you point me to the file setup-miniconda-patched-environment.yml?

gbarter commented 10 months ago

@hmaarrfk Many thanks for your help over the weekend.