Open
Description
See bf32602 and input-output-hk/haskell.nix#1642
I think it is unreasonable for cabal to expect pkg-config --libs --static
to work when only dynamic libraries may be installed on a system.
To Reproduce
$ cabal --version
cabal-install version 3.9
compiled using version 3.9.0.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
$ cabal v2-install haskell-gi-base -v3
...
In setup configure
for haskell-gi-base
you will see it has both:
Running: SOME_PATH/pkg-config --libs gobject-2.0 glib-2.0
Running: SOME_PATH/pkg-config --libs --static gobject-2.0 glib-2.0
On nix you can run something like this to see the second one fail:
nix-shell -E 'let pkgs = import <nixpkgs> {}; in pkgs.mkShell { buildInputs = [ pkgs.gtk4.dev pkgs.pkgconfig ]; }' --run 'cabal v2-install haskell-gi-base -v3'
Expected behavior
Perhaps cabal could store the error and replay it when the linker arguments are actually needed.
Activity