-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dependencies/factory: Skip PkgConfig if pkg-config is not available #13909
base: master
Are you sure you want to change the base?
Conversation
@@ -12,7 +12,7 @@ | |||
from .base import BuiltinDependency, SystemDependency | |||
from .cmake import CMakeDependency | |||
from .framework import ExtraFrameworkDependency | |||
from .pkgconfig import PkgConfigDependency | |||
from .pkgconfig import PkgConfigDependency, PkgConfigInterface |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigDependency' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigDependency' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigDependency' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigDependency' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigDependency' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigDependency' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigDependency' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
@@ -12,7 +12,7 @@ | |||
from .base import BuiltinDependency, SystemDependency | |||
from .cmake import CMakeDependency | |||
from .framework import ExtraFrameworkDependency | |||
from .pkgconfig import PkgConfigDependency | |||
from .pkgconfig import PkgConfigDependency, PkgConfigInterface |
Check failure
Code scanning / CodeQL
Module-level cyclic import Error
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigInterface' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigInterface' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigInterface' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigInterface' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigInterface' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigInterface' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
'PkgConfigInterface' may not be defined if module
mesonbuild.dependencies.pkgconfig
mesonbuild.dependencies.factory
definition
import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise you might end up with slightly confusing error messages when using the dependency factory:
ERROR: Dependency lookup for vulkan with method 'pkgconfig' failed: Pkg-config for machine host machine not found. Giving up.
What in particular is confusing about that? e.g. you could have a package installed (along with its .pc files!), but not have pkg-config installed, and as a result be unable to find a dependency that you KNOW is available, for which the crucial information that you need to know is "ah, it cannot be found because pkg-config could not be found".
Simply removing this information is what I'd call the exact opposite of "make the error message less confusing"?
@eli-schwartz The issue I've encountered in GNOME/gtk!7903 was that @xclaesse suggested that I don't actually need to use pkg-config in order to resolve vulkan as meson as its own internal resolver mechanism for it. Specifically in my case both pkg-config and the system dependency failed but the error message was the one that pkg-config was not installed, even tho I'd have been far more interesting in the second failure message from the system dependency which wasn't shown. |
Ok? And obviously that's entirely wrong for packages that don't have a system dependency, or which do have one but the dependency isn't installed anyway. Your argument, I guess, is that you want meson to report multiple error messages here. But you cannot really solve that by taking one highly specific source of error messages and excluding it! Note that meson also prints the path to a "full build log", which does contain information about the other dependency detectors as debug statements. The "most preferred" dependency detector is re-raised as the "main error" for console logging, but the full details have more information. I would not be averse to providing more or better-formatted information here but simply deleting pkg-config feels like it won't have the correct results. |
Otherwise you might end up with slightly confusing error messages when using the dependency factory:
ERROR: Dependency lookup for vulkan with method 'pkgconfig' failed: Pkg-config for machine host machine not found. Giving up.