Description
Describe the bug
Some cabal commands, e.g. cabal v2-run
take around 20 minutes on my system (on a vanilla unaltered cabal init
project).
I am using gentoo linux w/ cabal-install 3.6.2.0, ghc 9.2.7.
The reason for the huge runtime seems to be that cabal calls something like pkg-config --list-all | cut -f 1 -d ' ' | xargs pkg-config --modversion
(see related discussion in pull request #8496). Executing this command explicitly takes around the same time.
The reason for pkg-config to take so long is another matter: In this case there is a library installed with a .pc file that seems to introduce some circular dependencies (see grpc/grpc#29137) which results in much longer waiting times for each library that depends on that "malfunctioning" library, adding up to take around 20 minutes on my system.
It seems to me one should rethink the approach of using pkg-config --list-all
to retrieve ALL system library versions beforehand. Just one misconfigured system library will hinder cabal to do its job properly, resulting in this absurd situation that cabal requires a fix in an unrelated project (grpc) to work properly.
Activity