NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.19k stars 14.19k forks source link

libxml2 overrides can result in multiple versions being in the closure leading to runtime errors #347085

Open jbedo opened 1 month ago

jbedo commented 1 month ago

Describe the bug

Due to the deprecation of HTTP support in libxml2, some packages such as libspatialite have resorted to re-enabling it through an override in their buildInputs, e.g.,: https://github.com/NixOS/nixpkgs/blob/75ed009f22af3b8439d2f426a793f26e5cd4cf77/pkgs/development/libraries/libspatialite/default.nix#L38 This results in multiple versions of libxml2 being in the closure of some packages (e.g., rPackages.icosa; there are many in the rPackages tree affected), leading to build and runtime errors.

It would be great to patch to remove http support or disable libxml usage if these are viable.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-build -A rPackages.icosa

Expected behavior

Only one version of libxml should be present in the closure and the build test should succeed.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Notify maintainers

Pinging maintainers from libspatialite and libxml2 as well as those who recently made modifications.

@kirillrdy @K900 @jtojnar @marcweber @dotlambda

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.9, NixOS, 24.11 (Vicuna), 24.11.20241002.7801f74`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/doc/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/doc/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/doc/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/doc/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/hyq63n3bzpnx9nqnm7flr7sgva79c8b1-lix-2.91.0/share`
 - nixpkgs: `/nix/store/hw0gmaq5jim6m2j8fc97byc8fbqzvs12-source`

Add a :+1: reaction to issues you find important.

jtojnar commented 1 month ago

Here is a suggestion on how to patch it: https://www.gaia-gis.it/fossil/libspatialite/info/7c452740fe

jbedo commented 1 month ago

A list of packages with an override to address: