Skip to content

pkgconfig returns -fopenmp option #4908

@vabenil

Description

@vabenil

The pkgconfig for openblas returns the -fopenmp flag for library. So that when pkg-config is run like so:

$ pkg-config --libs openblas

The returned output is: -fopenmp -lopenblas.

This should be considered as an error because -fopenmp is not a linking flag (Not something you would pass to ld). The -fopenmp flag should be returned by pkg-config --cflags instead, since -fopenmp is a C specific option.

I came across this problem when compiling a D project using dub with the openblas library. There dub tries to use pkg-config to figure out linking flags, tries to add -fopenmp which then causes an error because -fopenmpis not a linking flag and has no meaning in D.

This issue was downstreamed from https://gitlab.archlinux.org/archlinux/packaging/packages/openblas/-/issues/10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions