Skip to content
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

libudev: Set the pkg-config version to the real version number #23013

Merged

Conversation

jwillikers
Copy link
Contributor

The pkg-config file contains the version of the Conan package. This is problematic because it is system which causes version checks for libudev to fail. This happens in Weston I'm making for instance:

Dependency libudev found: NO found system but need: '>= 136'
Found CMake: /usr/local/bin/cmake (3.28.20240202)
Run-time dependency libudev found: NO (tried cmake)

../src/libweston/meson.build:196:2: ERROR: Dependency lookup for libudev with method 'pkgconfig' failed: Invalid version, need 'libudev' ['>= 136'] found 'system'.

I've set the version in the pkg-config file to that of the version on the system. This fixes version checks in consumers using pkg-config.

The pkg-config file contains the version of the Conan package.
This is problematic because it is `system` which causes version checks for libudev to fail.
This happens in Weston I'm making for instance:

```
Dependency libudev found: NO found system but need: '>= 136'
Found CMake: /usr/local/bin/cmake (3.28.20240202)
Run-time dependency libudev found: NO (tried cmake)

../src/libweston/meson.build:196:2: ERROR: Dependency lookup for libudev with method 'pkgconfig' failed: Invalid version, need 'libudev' ['>= 136'] found 'system'.
```

I've set the version in the pkg-config file to that of the version on the system.
This fixes version checks in consumers using pkg-config.
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 1 (72b9f7c1e377713d63fb566496d995467d780539):

  • libudev/system:
    All packages built successfully! (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 1 (72b9f7c1e377713d63fb566496d995467d780539):

  • libudev/system:
    All packages built successfully! (All logs)

@uilianries
Copy link
Member

uilianries commented Mar 14, 2024

Hello @jwillikers Could you please share your entire build log? Please, try to follow the bug package template when sending hotfix without an issue associate, so we can reproduce your error quickly, without asking for extra information.

@jwillikers
Copy link
Contributor Author

jwillikers commented Mar 14, 2024

Hello @jwillikers Could you please share your entire build log? Please, try to follow the bug package template when sending hotfix without an issue associate, so we can reproduce your error quickly, without asking for extra information.

@uilianries This currently effects two unmerged PR's: #20358 and #22938. To reproduce the one for libweston, which I placed above, you'd need to build multiple dependencies which haven't been merged like Mesa and PipeWire, and there'd be a lot of dependency version conflicts getting in the way as well. The build logs I've included contain all the pertinent information for the error. It's probably easier to look at the code here to understand what is happening:

	dependencies: [
		dep_libweston_private,
		dep_libinput,
		dependency('libudev', version: '>= 136')
	],

The dependency directive in Meson looks for a version of libudev that is greater than or equal to 136. It doesn't find it because libudev/system uses system as the version instead of a number, which results in the failure as the log above says. To reproduce, it's simple enough to look at the generated libudev.pc file for the test package. Before this PR, the Version field says system. With this PR, you can see libudev.pc file has the correct Version field. If you want to reproduce with a package, I can work on updating the libgudev PR or can walk you through all of the dependencies that need to be built locally to reproduce with the weston PR.

@uilianries
Copy link
Member

@jwillikers Thank your for the details, now I see your scenario!

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The follow-up clarifies this fix.

@conan-center-bot conan-center-bot merged commit 40c6cba into conan-io:master Mar 14, 2024
14 checks passed
@jwillikers jwillikers deleted the libudev-set-pkg-config-version branch March 14, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants