devenv: Python language enable breaks devenv

Describe the bug When activating languages.python.enable = true devenv up returns

/nix/store/iw1vmh509hcbby8dbpsaanbri4zsq7dj-python3-3.10.10/bin/python: /nix/store/76l4v99sk83ylfwkz8wmwrm4s8h73rhd-glibc-2.35-224/lib/libc.so.6: version `GLIBC_2.36' not found (required by /nix/store/wy0incigsdz3nai26lxmn9ibchnb0qd6-libxcrypt-4.4.33/lib/libcrypt.so.2)

Installing glibc via devenv just results in a core dump.

This is probably because the python version from the languages overrides my system python.

Not sure how I could still have devenv working while having python enabled

To reproduce https://gist.github.com/jocelynthode/f97bc7a966d4e19ca50fc1ee4551d014

Version

devenv: 0.6.2

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 31 (17 by maintainers)

Commits related to this issue

Most upvoted comments

This is finally fixed in 1.0, great work everyone 😃

Similar issue happens if you add pkgs.stdenv.cc.cc.lib as a package.

Any idea on how we could fix this issue in a less hackish way?

Nice 👍 LD_LIBRARY_PATH can still be set, but you’ll have to be explicit about which package to use. Using all packages for it will quickly become problematic.

See also https://github.com/cachix/devenv/pull/507

That said, even if you explicitly define LD_LIBRARY_PATH, it can still cause trouble.

The underlying problem is that poetry (or other package managers) download prebuilt binaries. These are not always suited for your system (built against a different glibc version for instance). Building them from source is safer, but requires more buildtools to be available in the shell environment.

I’m experimenting with integrating poetry2nix into devenv. It has the right approach and builds everything from source. It however often requires more fiddling than with just poetry.