Skip to content

Error looking up pkg-config --libs --static #1642

@hamishmack

Description

@hamishmack

Cabal 3.8 asks pkg-config for linker options for both dynamic and static linking.

See haskell/cabal@bf32602

For some derivations (glib for instance) pkg-config can fail when --static is passed. This might be because the library only has dynamic libraries. The error looks like this:

Package libpcre was not found in the pkg-config search path.
Perhaps you should add the directory containing `libpcre.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libpcre', required by 'glib-2.0', not found

This could be fixed if there was lazier failure in Cabal. It could store the message instead of the options and print it when anyone tried to use them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions