Skip to content

python+tkinter in a unified environment: "Cyclic dependency detected" #37947

@flxmr

Description

@flxmr

Steps to reproduce

So, I want to create a (more or less "deterministic") unified environment including python with tkinter. Aka I put the following in a spack.yaml and create an environment:

spack:
  specs:
  - python @3.10+libxml2+tkinter %[email protected]
  view: true
  concretizer:
    unify: true

Then I concretize

Error message

Now I want to concretize:

fmm@spack>spack -e testpy concretize -f
==> Error: concretization failed for the following reasons:

   1. Cyclic dependency detected between 'xcb-proto' and 'xcb-proto' (consider changing variants to avoid the cycle)
   2. Cyclic dependency detected between 'xcb-proto' and 'tk' (consider changing variants to avoid the cycle)
   3. Cyclic dependency detected between 'xcb-proto' and 'python' (consider changing variants to avoid the cycle)
   4. Cyclic dependency detected between 'xcb-proto' and 'libxcb' (consider changing variants to avoid the cycle)
   5. Cyclic dependency detected between 'xcb-proto' and 'libx11' (consider changing variants to avoid the cycle)
   6. Cyclic dependency detected between 'tk' and 'xcb-proto' (consider changing variants to avoid the cycle)
   7. Cyclic dependency detected between 'tk' and 'tk' (consider changing variants to avoid the cycle)
   8. Cyclic dependency detected between 'tk' and 'python' (consider changing variants to avoid the cycle)
   9. Cyclic dependency detected between 'tk' and 'libxcb' (consider changing variants to avoid the cycle)
   10. Cyclic dependency detected between 'tk' and 'libx11' (consider changing variants to avoid the cycle)
   11. Cyclic dependency detected between 'python' and 'xcb-proto' (consider changing variants to avoid the cycle)
   12. Cyclic dependency detected between 'python' and 'tk' (consider changing variants to avoid the cycle)
   13. Cyclic dependency detected between 'python' and 'python' (consider changing variants to avoid the cycle)
   14. Cyclic dependency detected between 'python' and 'libxcb' (consider changing variants to avoid the cycle)
   15. Cyclic dependency detected between 'python' and 'libx11' (consider changing variants to avoid the cycle)
   16. Cyclic dependency detected between 'libxcb' and 'xcb-proto' (consider changing variants to avoid the cycle)
   17. Cyclic dependency detected between 'libxcb' and 'tk' (consider changing variants to avoid the cycle)
   18. Cyclic dependency detected between 'libxcb' and 'python' (consider changing variants to avoid the cycle)
   19. Cyclic dependency detected between 'libxcb' and 'libxcb' (consider changing variants to avoid the cycle)
   20. Cyclic dependency detected between 'libxcb' and 'libx11' (consider changing variants to avoid the cycle)
   21. Cyclic dependency detected between 'libx11' and 'xcb-proto' (consider changing variants to avoid the cycle)
   22. Cyclic dependency detected between 'libx11' and 'tk' (consider changing variants to avoid the cycle)
   23. Cyclic dependency detected between 'libx11' and 'python' (consider changing variants to avoid the cycle)
   24. Cyclic dependency detected between 'libx11' and 'libxcb' (consider changing variants to avoid the cycle)
   25. Cyclic dependency detected between 'libx11' and 'libx11' (consider changing variants to avoid the cycle)

I think this is a bug as it should be possible to build python + X11 in a "clean" fashion.

Essentially this seems to happen, because xcb-proto extends python https://github.com/spack/spack/blame/develop/var/spack/repos/builtin/packages/xcb-proto/package.py#L23, while libxcb depends on python 371a8a3

Removing the python-dependency and the extends at least leads to concretization (checking currently what happens down the road)...

Information on your system

  • Spack: 0.21.0.dev0 (2f8cea2)
  • Python: 3.11.2
  • Platform: linux-fedora38-zen3
  • Concretizer: clingo

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions