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

ValueError: Incompatible component merge: mpi_openmpi_* #4498

Open
pawelqs opened this issue Jun 6, 2022 · 12 comments
Open

ValueError: Incompatible component merge: mpi_openmpi_* #4498

pawelqs opened this issue Jun 6, 2022 · 12 comments

Comments

@pawelqs
Copy link

pawelqs commented Jun 6, 2022

Actual Behavior

Hi,
I'm trying to build R package which I would like to upload to anaconda. I am following the instructions from here: https://stackoverflow.com/questions/52061664/install-r-package-from-github-using-conda

conda skeleton cran https://github.com/pawel125/clonalityParsers works fine, although I have to correct the names of two packages:
r-genomeinfodb -> bioconductor-genomeinfodb and r-plyranges -> bioconductor-plyranges

Unfortunatelly conda build --R=4.2.0 r-clonalityparsers results in the following error:

conda build --R=4.2.0 r-clonalityparsers                                                         ─╯
No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
WARNING:conda_build.metadata:No numpy version specified in conda_build_config.yaml.  Falling back to default numpy value of 1.16
Adding in variants from internal_defaults
INFO:conda_build.variants:Adding in variants from internal_defaults
Adding in variants from config.variant
INFO:conda_build.variants:Adding in variants from config.variant
Attempting to finalize metadata for r-clonalityparsers
INFO:conda_build.metadata:Attempting to finalize metadata for r-clonalityparsers
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): repo.anaconda.com:443
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): conda.anaconda.org:80
DEBUG:urllib3.connectionpool:http://conda.anaconda.org:80 "GET /dranew/linux-64/repodata.json HTTP/1.1" 301 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): conda.anaconda.org:443
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /dranew/linux-64/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:http://conda.anaconda.org:80 "GET /dranew/noarch/repodata.json HTTP/1.1" 301 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /dranew/noarch/repodata.json HTTP/1.1" 304 0
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /t/kp-055f5a19-484f-4c40-8c02-5c8796609036/conda-forge/linux-64 HTTP/1.1" 302 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /conda-forge/linux-64/ HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/r/channeldata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://repo.anaconda.com:443 "GET /pkgs/main/channeldata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:http://conda.anaconda.org:80 "GET /dranew/channeldata.json HTTP/1.1" 301 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /dranew/channeldata.json HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /t/kp-055f5a19-484f-4c40-8c02-5c8796609036/bioconda/linux-64 HTTP/1.1" 302 None
DEBUG:urllib3.connectionpool:https://conda.anaconda.org:443 "GET /bioconda/linux-64/ HTTP/1.1" 200 None
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed
Traceback (most recent call last):
  File "/home/pkus/programs/mambaforge/bin/conda-build", line 11, in <module>
    sys.exit(main())
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/cli/main_build.py", line 488, in main
    execute(sys.argv[1:])
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/cli/main_build.py", line 477, in execute
    outputs = api.build(args.recipe, post=args.post, test_run_post=args.test_run_post,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/api.py", line 186, in build
    return build_tree(
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/build.py", line 3088, in build_tree
    packages_from_this = build(metadata, stats,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/build.py", line 2051, in build
    output_metas = expand_outputs([(m, need_source_download, need_reparse_in_env)])
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/render.py", line 788, in expand_outputs
    for (output_dict, m) in deepcopy(_m).get_output_metadata_set(permit_unsatisfiable_variants=False):
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/metadata.py", line 2121, in get_output_metadata_set
    conda_packages = finalize_outputs_pass(ref_metadata, conda_packages, pass_no=0,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/metadata.py", line 782, in finalize_outputs_pass
    fm = finalize_metadata(om, parent_metadata=parent_metadata,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/render.py", line 546, in finalize_metadata
    build_unsat, host_unsat = add_upstream_pins(m,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/render.py", line 408, in add_upstream_pins
    host_deps, host_unsat, extra_run_specs_from_host = _read_upstream_pin_files(m, 'host',
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/render.py", line 373, in _read_upstream_pin_files
    deps, actions, unsat = get_env_dependencies(m, env, m.config.variant,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/render.py", line 138, in get_env_dependencies
    actions = environ.get_install_actions(tmpdir, tuple(dependencies), env,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda_build/environ.py", line 799, in get_install_actions
    actions = install_actions(prefix, index, specs, force=True)
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/plan.py", line 474, in install_actions
    txn = solver.solve_for_transaction(prune=prune, ignore_pinned=not pinned)
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 152, in solve_for_transaction
    unlink_precs, link_precs = self.solve_for_diff(update_modifier, deps_modifier,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 195, in solve_for_diff
    final_precs = self.solve_final_state(update_modifier, deps_modifier, prune, ignore_pinned,
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 313, in solve_final_state
    ssc = self._add_specs(ssc)
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/core/solve.py", line 707, in _add_specs
    conflicts = ssc.r.get_conflicting_specs(tuple(MatchSpec(_)
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/resolve.py", line 1109, in get_conflicting_specs
    C = r2.gen_clauses()
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/common/io.py", line 88, in decorated
    return f(*args, **kwds)
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/resolve.py", line 912, in gen_clauses
    for ms in self.ms_depends(prec):
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/resolve.py", line 796, in ms_depends
    deps = [MatchSpec(d) for d in prec.combined_depends]
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/models/records.py", line 340, in combined_depends
    result = {ms.name: ms for ms in MatchSpec.merge(self.depends)}
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 478, in merge
    reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 478, in <lambda>
    reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 509, in _merge
    final = this_component.merge(that_component)
  File "/home/pkus/programs/mambaforge/lib/python3.9/site-packages/conda/models/match_spec.py", line 760, in merge
    raise ValueError("Incompatible component merge:\n  - %r\n  - %r"
ValueError: Incompatible component merge:
  - 'mpi_openmpi_*'
  - 'mpi_openmpi_tempest*'

Could you help me to solve this issue?
Thanks!

Expected Behavior

Conda builds the package.

Steps to Reproduce

conda skeleton cran https://github.com/pawel125/clonalityParsers

Replace package names in meta.yaml:
r-genomeinfodb -> bioconductor-genomeinfodb
r-plyranges -> bioconductor-plyranges

conda build --R=4.2.0 r-clonalityparsers
Output of conda info

     active environment : base
    active env location : /home/pkus/programs/mambaforge
            shell level : 1
       user config file : /home/pkus/.condarc
 populated config files : /home/pkus/programs/mambaforge/.condarc
                          /home/pkus/.condarc
          conda version : 4.12.0
    conda-build version : 3.21.9
         python version : 3.9.13.final.0
       virtual packages : __linux=5.13.0=0
                          __glibc=2.34=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/pkus/programs/mambaforge  (writable)
      conda av data dir : /home/pkus/programs/mambaforge/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          http://conda.anaconda.org/dranew/linux-64
                          http://conda.anaconda.org/dranew/noarch
          package cache : /home/pkus/programs/mambaforge/pkgs
                          /home/pkus/.conda/pkgs
       envs directories : /home/pkus/programs/mambaforge/envs
                          /home/pkus/.conda/envs
               platform : linux-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.13 Linux/5.13.0-41-generic ubuntu/21.10 glibc/2.34
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

I am using conda version 4.12.0

@mguijarr
Copy link

I had the same problem with conda build. After days of struggle, I switched to boa : problem solved using the conda mambabuild command instead of conda build. Works like a charm.

@pawelqs
Copy link
Author

pawelqs commented Jun 28, 2022

@mguijarr It's working! Thanks a lot! So many snakes to use instead of conda :)

@pawelqs pawelqs closed this as completed Jun 28, 2022
@mguijarr
Copy link

mguijarr commented Jul 1, 2022

I don't think this should be closed, since it is not solved with conda itself.

@pawelqs pawelqs reopened this Jul 1, 2022
@pawelqs
Copy link
Author

pawelqs commented Jul 1, 2022

Reopened ;)

@stefdoerr
Copy link

I was able to fix it by forcing higher numpy version (>=1.17) in my meta.yaml file.
boa actually highlighted the issue to me more clearly but after increasing numpy version I don't need to use boa anymore.

@jehturner
Copy link

See a possible workaround in conda/conda#11442 (comment).

@jehturner
Copy link

jehturner commented Mar 22, 2023

I was able to fix it by forcing higher numpy version (>=1.17) in my meta.yaml file. boa actually highlighted the issue to me more clearly but after increasing numpy version I don't need to use boa anymore.

I accidentally rediscovered this solution after running into a case that was not solved by the workaround I posted in the last comment. As of writing, it looks like building any package that has conda-forge python and numpy as build/host requirements does not work with conda-build --python=3.10 on Linux, but if the constraint is changed to numpy >=1.17 in meta.yaml it works fine. I think this bug must occur during the process of comparing available package versions, rather than due to a real dependency conflict. Specifying --numpy=<version> for conda-build makes no difference (there aren't even any numpy builds earlier than 1.21 for Python 3.10).

This issue can be reproduced by trying to build the following trivial meta.yaml with or without the numpy version uncommented:

package:
    name: test
    version: 0.1

build:
    number: '0'
    script: touch ${PREFIX}/a_file

requirements:
    build:
    - python
    - numpy # >=1.17
    run:
    - python
    - numpy # >=1.17

It seems that some change within the conda-forge channel (probably the addition of certain builds?) has broken recipes that were previously working. I think this is really a conda problem (in fact I see @minrk says so here), but it mostly shows up when using conda-build and I'm just trying to document the manifestation a bit better. This has nothing explicitly to do with MPI.

@chebee7i
Copy link

Any progress on this? I'm hitting this regularly and have to use mambabuild instead.

ValueError: Incompatible component merge:
  - '*mpich*'
  - 'mpi_mpich_*'
$ cat meta.yaml
{% set name = "bitsandbytes" %}
{% set version = "0.39.0" %}

package:
  name: "{{ name|lower }}"
  version: "{{ version }}"

build:
  number: 0

requirements:
  host:
    - pip
    - python {{ PY_VER }}*,>=3.6
    - absl-py
    - nltk
    - numpy
    - six>=1.14
  run:
    - python {{ PY_VER }}*,>=3.6
    - absl-py
    - nltk
    - numpy
    - six>=1.14
test:
  imports:
    - bitsandbytes

$ cat build.sh
pip install bitsandbytes==0.39.0

@tazimmerman
Copy link

@chebee7i Did you try using numpy >=1.17 in your recipe? I have a similar issue and that minor change actually worked for me with plain conda-build.

@chebee7i
Copy link

chebee7i commented May 30, 2023

That does indeed seem to fix the issue. Very weird that we need it, since it should be picking up something much more recent than 1.17 even.

facebook-github-bot pushed a commit to facebookresearch/faiss that referenced this issue Jun 16, 2023
Summary:
Based on comments in conda/conda-build#4498

Pull Request resolved: #2896

Reviewed By: mdouze

Differential Revision: D46802512

Pulled By: algoriddle

fbshipit-source-id: 7449b2f0db08fdd793770a44afb659d7ac28e3cd
@mooreniemi
Copy link

mooreniemi commented Sep 4, 2023

Restricting to >=1.19 did not work for me.

 14 requirements:
 15   build:
 16     - python
 17     - numpy>=1.19
 18     - setuptools
 19     - pip
 20   run:
 21     - python
 22     - numpy>=1.19

Switching to mambabuild did work for me.

@rphel
Copy link

rphel commented Sep 13, 2023

Still hitting this issue with numpy 1.22.

Thejas-bhat pushed a commit to blevesearch/faiss that referenced this issue Sep 27, 2023
Summary:
Based on comments in conda/conda-build#4498

Pull Request resolved: facebookresearch#2896

Reviewed By: mdouze

Differential Revision: D46802512

Pulled By: algoriddle

fbshipit-source-id: 7449b2f0db08fdd793770a44afb659d7ac28e3cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏁 Done
Development

No branches or pull requests

8 participants