Setting LD_LIBRARY_PATH for Nix dev shells might be bad advice

Đang mở
#6,331 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
28/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
haskell, nixos
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với phần Supporting both Nix and non-Nix developers trên trang tài liệu được liên kết, sau đó tái hiện tương tác devShell, nix develop và direnv đã được báo cáo. Điều tra hướng dẫn về LD_LIBRARY_PATH và cách tiếp cận được đề xuất với --extra-lib-dirs và --extra-include-dirs; được xem là hoàn tất khi tài liệu không còn khuyến nghị một thiết lập làm hỏng các công cụ không liên quan và giải thích một phương án thay thế đã được xác minh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

component: nix
Location of the documentation

https://docs.haskellstack.org/en/stable/nix_integration/#supporting-both-nix-and-non-nix-developers

Is it inaccurate?

I currently have a devShell in a flake.nix defined along the lines of the docs linked above. This works well for building and running the project, but interacts poorly with nix develop and direnv: tools not specified in the devshell will break because of libc version mismatches. For example, the devshell puts openssl in LD_LIBRARY_PATH, but this breaks tools which (indirectly) depend on it like git fetch, which will fail with a dynamic linking error like

/home/${USER}/.nix-profile/bin/ssh: /nix/store/vq3sdi8l15rzfl5zvmwpafrzis4sm6xf-glibc-2.37-8/lib/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/vzajrlhsdv2d39s7v6zv09ggajs05gwj-openssl-3.0.11/lib/libcrypto.so.3)

(My ssh happens to be installed via Nix, but I've also seen it happen with Ubuntu's own /usr/bin/ssh.)

Is it incomplete?

There's probably a better way to do things. I don't know if the old-fashioned approach using haskell.lib.buildStackProject has the same issue. It ought to be possible to set up things with --extra-lib-dirs and --extra-include-dirs instead, but I haven't gotten this to work myself yet and I suspect that would actually just be duplicating the functionality of buildStackProject.

Ngôn ngữ chính
Haskell
Star
4.1k
Fork
857
Merge trung bình
17 giờ 32 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của commercialhaskell/stack

Tất cả issue của commercialhaskell/stack

Issue tương tự

Thêm issue về Haskell

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.