Summary: | libsystemd-login needs to link against libsystemd-label | ||
---|---|---|---|
Product: | systemd | Reporter: | Michał Górny <mgorny> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | CC: | systemd |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=479038 | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Patch fixing the issue |
As mentione on IRC already, that looks like a buildsys issue. systemd-login should not need the cg-label symbols. Any chance to find out why they are pulled-in, instead of linking the not actually needed lib against the tool? This should not print anything: $ nm -D .libs/libsystemd-login.so | grep cg The best research was done in [1]. I myself can't reproduce this so I don't think I can help you more than by relaying whatever new ideas may come up. Maybe -Wl,--whole-archive is relevant somehow? [1]:https://bugs.gentoo.org/show_bug.cgi?id=479038#c29 mgorny is Michał is correct -- cgroup-util.o is placed into libsystemd-shared.a and then linked with -Wl,--whole-archive when generating libsystemd-login.so Applied in http://cgit.freedesktop.org/systemd/systemd/commit/?id=ceadabb. > Applying the attached patch seems to fix the issue. However, I'm not entirely sure if we aren't missing something. Your analysis is definitely correct. Even if everything works most of the time, we should apply the patch anyway. If/when we restructure the code to not need this, we can remove the additional library. I reverted it. We do not want to pull-in selinux into all users of systemd-logind. We need to find the reason for the failure, or the solution to fix it, and not just work around it that way. Fixed in git. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 86850 [details] Patch fixing the issue It seems that this is hard to reproduce but few of our users are hitting this repeatedly. libsystemd-login.la uses cg_create() that currently seems to be a part of libsystemd-label.la. However, it doesn't link against that library and it seems that none of the (unconditional) libraries it uses do. In the end, people end up getting «undefined reference to `cg_create'» when trying to build e.g. dbus. Applying the attached patch seems to fix the issue. However, I'm not entirely sure if we aren't missing something.