-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
dbus: with_x11=True does not mean libdbus depends on xorg/system #22134
Conversation
When dbus is built with with_x11 an extra executable `dbus-launch` will be built. Only this executable depends on x11. By adding the explicit requirement trait visible=False we avoid passing all the X11 libraries in xorg/system as link libraries to applications that link with dbus.
🤖 Beep Boop! This pull request is making changes to 'recipes/dbus//'. 👋 @jwillikers you might be interested. 😉 |
I detected other pull requests that are modifying dbus/1.x.x recipe:
This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there. |
This comment has been minimized.
This comment has been minimized.
The Conan v1 build failure is caused by this:
I looked at the affected lines ../src/dbus/dbus-sysdeps-util-win.c:1444 and ../src/dbus/dbus-sysdeps-util-win.c:1450 - they both contain DBUS_PREFIX which is a value configured by conan. Looking higher in the log I can see the prefix path that conan uses:
|
The Conan v2 build appears to fail on Windows because it uses Visual Studio 2022 and dbus doesn't build with the meson build system with that compiler - I have opened https://gitlab.freedesktop.org/dbus/dbus/-/issues/494 about this. Update: I see #19421 is about this problem. |
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.
LGTM!
Just to be clear, does |
Conan v1 pipeline ✔️All green in build 2 ( |
It is not the intention with this PR that it should indicate that you don't need the shared libraries at runtime. I only want to communicate that if you link with libdbus (shared or static) then you do not need to linx with xorg/system. If what I have done doesn't achieve that, what is the right solution to the problem then? Can I track the dependencies separately per component somehow? So dbus-launch can be listed as depending on xorg/system, but the libdbus.a/libdbus.so doesn't. If I need to do something like that can you point to one or more recipes in conan-center-index that implement this for my inspiration? |
@tsondergaard Conan does not yet have a way to model runtime-only dependencies well, unfortunately. It would not hurt to set the exported requires info for glib and other dependencies in a more exact manner either, since the recipe is probably overlinking many irrelevant libraries from the deps. This can be left for another PR, though. Anyway, I checked |
@valgur, weird, that you cannot see any X11 dependencies on dbus-launch. This is what I see on the dbus binaries from my AlmaLinux distribution:
|
@tsondergaard My comment was about the executable found in the package binary directory. It's ok for the system executable to have different behavior. |
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.
LGTM. DBus does not use the X11 libraries at all, even for the executables. It only needs X11 to be present during the build for the "X11 autolaunch" feature to be enabled.
https://gitlab.freedesktop.org/dbus/dbus/-/blob/dbus-1.15.8/meson.build?ref_type=tags#L613-629
Edit: that's incorrect. X11 is used when building tools: https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/tools/dbus-launch-x11.c#L39-40
When dbus is built with with_x11 an extra executable
dbus-launch
will be built. Only this executable depends on x11. By adding the explicit requirement trait visible=False we avoid passing all the X11 libraries in xorg/system as link libraries to applications that link with dbus.Fixes #22133