8

I get a weird error when I try to build a conda package.

$ conda-build pkg2

....
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed   
....
The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__glibc==2.17=0
  - feature:|@/linux-64::__glibc==2.17=0
  - pkg1 -> __glibc[version='>=2.17,<3.0.a0']

Your installed version is: 2.17

It looks to me as if glibc 2.17 satisfies all three requirements, however conda thinks there is a conflict.

To clarify, pkg2 depends on another package that I have built locally, pkg1. pkg1 is a C++ library with a python interface, that depends on libfftw. I could not find libfftw on conda, so had to install it via yum on the build host, which runs CentOS7 with glibc 2.17, hence the dependency.

In pkg1 meta.yaml I have:

requirements:
  build:
    - sysroot_linux-64  >=2.17  [linux]

pkg2 meta.yaml:

requirements:
  host:
    - pkg1
  run:
    - pkg1

merv
  • 67,214
  • 13
  • 180
  • 245
Evgeny Tanhilevich
  • 1,119
  • 1
  • 8
  • 17
  • 2
    "*I could not find libfftw on conda*" - it's just [`fftw`](https://anaconda.org/conda-forge/fftw), but includes libs and include headers in the package. – merv Mar 20 '21 at 23:26

1 Answers1

5

Thanks @merv for the fftw tip.

I strongly suspect that the issue was caused by a mixture of packages from conda-forge and Anaconda default channels in the same environment. According to conda developers, this is considered a bad practice. Once I have changed it around to using conda-forge only, the problems went away.

Evgeny Tanhilevich
  • 1,119
  • 1
  • 8
  • 17
  • Ah yes, the channel mixing issue. Haven't seen this come up with `conda build` before, so good to know it's a possibility. – merv Mar 25 '21 at 03:56
  • @Evgeny Tanhilevich – Adam Conrad Apr 06 '21 at 23:57
  • How do you make this switch? Can you mix packages from mamba and conda? – Sky Scraper Feb 07 '23 at 18:57
  • I dont know if this is related enough, but I had issue with ```mamba install -c bioconda perl-bioperl``` after making an env with mamba (```mamba create -n foo python=3.10``` then ```conda activate foo``` then ``mamba install r-base```) where I got the error ``` - nothing provides perl >=5.22.0,<5.23.0 needed by perl-bioperl-1.6.924-1``` so I tried: ```mamba create -n foo -c bioconda python=3.10 perl-bioperl-1.6.924-1``` but this have me an almost identical error: ```- nothing provides requested perl-bioperl-1.6.924-1``` – Sky Scraper Feb 07 '23 at 19:00
  • Nevermind, the issue was that I made the environment with python version 3.10 and it is/was/seems like that is compatible. – Sky Scraper Feb 07 '23 at 19:53